Zero-permission verification code automatic filling method and device based on end-side AI semantic recognition

By using edge AI semantic recognition technology, mobile terminal data is intercepted and stored in a secure sandbox. A lightweight model is then used to identify and fill in the CAPTCHA, solving the privacy leakage and compatibility issues in the automatic filling of CAPTCHAs on mobile terminals, and achieving secure and efficient automatic filling of CAPTCHAs.

CN123177933APending Publication Date: 2026-11-27LETV NEW GENERATION (BEIJING) CULTURE MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611030855.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing mobile terminal verification code autofill technology poses risks of privacy information leakage, disrupts user interaction experience, has poor compatibility, and lacks system-level security verification and instant destruction mechanisms.

Method used

A zero-permission CAPTCHA autofill method based on edge AI semantic recognition is adopted. The target data is intercepted by the underlying system service, stored in a secure memory sandbox, and semantic recognition is performed using a lightweight natural language processing model to judge and extract the CAPTCHA string. The CAPTCHA is then filled in by combining window management and input management services.

Benefits of technology

It enables automatic filling of verification codes without requiring third-party application permissions, eliminating the risk of privacy data theft, improving recognition and filling accuracy, avoiding misfilling, reducing power consumption, providing a seamless user experience, shortening the retention time of privacy data, and balancing convenience and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123177933A_ABST
    Figure CN123177933A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a zero-privilege verification code automatic filling method and device based on end-side AI semantic recognition, which are applied to the technical field of security; the method comprises the following steps: intercepting target data, suspending the broadcast distribution of the target data, and storing the target data into a secure memory sandbox at the bottom layer of a system; performing semantic recognition on the target data based on a lightweight natural language processing model, and judging whether the target data belongs to verification code data; if yes, extracting a verification code string; scanning a window in an active state in a current foreground, obtaining a control attribute of an input control currently having a user focus, and judging whether the control attribute meets a preset injection condition; if yes, obtaining an input connection handle of the input control, and calling a text submission interface of the input connection handle to write the verification code string into the input control to complete the verification code filling; in this way, the risk of privacy border crossing theft is eliminated, system compatibility is improved, verification code recognition and filling accuracy are improved, and false filling is avoided, and the user is not aware of the whole process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of security technology, and further to the field of mobile terminal security technology, and particularly to a method and apparatus for automatic filling of zero-permission CAPTCHAs based on edge AI semantic recognition. Background Technology

[0002] In current mobile terminal scenarios, third-party applications generally need to request READ_SMS SMS reading permissions or notification bar listening permissions to implement automatic verification code filling functionality. After user authorization, the application can read all historical SMS messages in the background, which can easily lead to the leakage of user privacy information. Existing optimization and compromise solutions such as single authorization and clipboard relay still have obvious defects. The single authorization mode requires users to manually confirm frequently, resulting in a fragmented interactive experience. The clipboard relay solution brings the security risks of clipboard content being eavesdropped on by other background applications and secondary leakage of verification code data. There is a lack of automatic verification code filling implementation solutions in the industry that do not require granting any SMS or notification reading permissions to third-party applications, while balancing privacy and security with convenient operation. Summary of the Invention

[0003] This disclosure provides a zero-permission CAPTCHA autofill method and device based on edge AI semantic recognition, which solves the technical problems of existing CAPTCHA autofill technology, such as serious information leakage risks, the need for users to repeatedly confirm through pop-up windows, the fragmented interactive experience, the global sharing of the clipboard which makes it easy for malicious applications in the background to eavesdrop on CAPTCHAs and cause secondary leakage, the lack of system-level security verification mechanism, the lack of an immediate destruction mechanism, the susceptibility to being blocked by anti-cheating mechanisms, and poor compatibility.

[0004] According to a first aspect of this disclosure, a zero-permission CAPTCHA autofill method based on edge AI semantic recognition is provided, applied to the operating system of a mobile terminal. The method includes: intercepting target data based on underlying system services and suspending the broadcast distribution of the target data; storing the suspended target data in a secure memory sandbox at the underlying system level; the target data includes SMS messages and notification messages. The target data is semantically recognized based on a lightweight natural language processing model, and it is determined whether the target data belongs to CAPTCHA data; if so, the CAPTCHA string is extracted from the target data. Based on the window management service, scan the windows that are currently active in the foreground, obtain the control properties of the input control that currently has user focus, and determine whether the control properties meet the preset injection conditions. If so, the input connection handle of the input control is obtained based on the input management service, and the text submission interface of the input connection handle is called to write the verification code string into the input control to complete the verification code filling.

[0005] In addition to the aspects and any possible implementations described above, a further implementation is provided, wherein the step of performing semantic recognition on the target data based on a lightweight natural language processing model and determining whether the target data belongs to CAPTCHA data includes: The text content of the target data is semantically recognized and parsed based on a lightweight natural language processing model to extract key semantic features from the text content. The key semantic features include scene feature words and code value features. The scene feature words are used to represent the relevant scene of the target data, and the code value features are used to represent the combination of numbers and / or letters in the text content. Based on the scene feature words, determine whether the target data belongs to the CAPTCHA-related scene category; if so, determine that the target data belongs to CAPTCHA data.

[0006] In addition to the aspects and any possible implementations described above, a further implementation is provided in which the extraction of the verification code string from the target data includes: Based on the code value features, identify consecutive combinations of numeric characters and / or alphanumeric characters from the text content of the target data; The identified character combinations are filtered based on a preset length range, and the character combinations that conform to the preset length range are used as candidate verification code strings. Obtain the position of the character combination in the candidate verification code string within the text content; The character combinations whose relative distance between the occurrence location and the preset scene keyword is less than a preset threshold are determined as the final verification code string.

[0007] In addition to the aspects and any possible implementations described above, a further implementation is provided, wherein the step of scanning the currently active windows in the foreground based on the window management service to obtain the control properties of the input control currently having user focus includes: The window management service scans the currently active windows in the foreground to obtain window identifiers; Based on the window identifier, obtain the control identifier of the input control that has user focus in the active window in the foreground; Based on the control identifier, the control properties of the input control are queried, and the control properties include class name property and input type property.

[0008] As described above and in any possible implementation, a further implementation is provided, wherein the preset injection conditions include: The control attribute is deemed to satisfy the preset injection condition only when the class name attribute is a preset edit box class and the input type attribute is a preset text input type; Otherwise, clear the target data stored in the secure memory sandbox.

[0009] In addition to the aspects and any possible implementations described above, a further implementation is provided, wherein if so, extracting the verification code string from the target data further includes: If the target data does not belong to the CAPTCHA data, then the target data stored in the secure memory sandbox is cleared.

[0010] In addition to the aspects and any possible implementations described above, a further implementation is provided in which, after writing the verification code string into the input control to complete the verification code filling, the method further includes: Clear the target data stored in the secure memory sandbox.

[0011] According to a second aspect of this disclosure, a zero-permission CAPTCHA autofill device based on edge AI semantic recognition is provided. The device includes: a receiving module, configured to intercept target data based on underlying system services and suspend the broadcast distribution of the target data; store the suspended target data in a secure memory sandbox at the system's underlying layer; the target data includes SMS messages and notification messages; The recognition module is used to perform semantic recognition on the target data based on a lightweight natural language processing model, and determine whether the target data belongs to CAPTCHA data; if so, the CAPTCHA string is extracted from the target data. The judgment module is used to scan the windows that are currently active in the foreground based on the window management service, obtain the control properties of the input control that currently has user focus, and determine whether the control properties meet the preset injection conditions. The filling module is used to, if yes, obtain the input connection handle of the input control based on the input management service, and call the text submission interface of the input connection handle to write the verification code string into the input control to complete the verification code filling.

[0012] According to a third aspect of this disclosure, an electronic device is provided. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the program to implement the method described above.

[0013] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the methods according to the first and / or second aspects of this disclosure.

[0014] In this disclosure, target data is intercepted based on the underlying system services, and the broadcast distribution of the target data is suspended. The suspended target data is stored in a secure memory sandbox at the system's underlying level. The target data includes SMS messages and notification messages. The target data is semantically recognized based on a lightweight natural language processing model, and it is determined whether the target data belongs to CAPTCHA data. If so, the CAPTCHA string is extracted from the target data. The window management service scans the currently active windows in the foreground, obtains the control attributes of the input control currently having user focus, and determines whether the control attributes meet the preset injection conditions. If so, the input connection handle of the input control is obtained based on the input management service, and the text submission interface of the input connection handle is called to write the CAPTCHA string into the input control to complete the CAPTCHA filling. In this way, the third-party application has zero sensitive permissions throughout the process and cannot access any original privacy data of SMS messages and notifications, eliminating the risk of privacy overstepping and theft, eliminating the hidden danger of secondary leakage, improving system compatibility, improving the accuracy of CAPTCHA recognition and filling, avoiding misfilling, with no cloud data upload, extremely low power consumption, and no user experience, shortening the privacy data retention time, and balancing the ease of operation of automatic CAPTCHA filling, terminal privacy security, and terminal performance.

[0015] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0016] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 A flowchart of an automatic zero-permission CAPTCHA filling method based on edge AI semantic recognition according to an embodiment of the present disclosure is shown; Figure 2 A block diagram of an automatic zero-permission CAPTCHA filling device based on edge AI semantic recognition according to an embodiment of the present disclosure is shown; Figure 3 A block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0018] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0019] In this disclosure, target data is intercepted based on the underlying system services, and the broadcast distribution of the target data is suspended. The suspended target data is stored in a secure memory sandbox at the underlying system level. The target data includes SMS messages and notification messages. The target data is semantically recognized based on a lightweight natural language processing model, and it is determined whether the target data belongs to CAPTCHA data. If so, the CAPTCHA string is extracted from the target data. The window management service scans the currently active windows in the foreground, obtains the control properties of the input control currently having user focus, and determines whether the control properties meet the preset injection conditions. If so, the input connection handle of the input control is obtained based on the input management service, and the text submission interface of the input connection handle is called to write the CAPTCHA string into the input control to complete the CAPTCHA filling. In this way, the risk of privacy theft is eliminated, the global data eavesdropping vulnerability caused by clipboard relay is avoided, and the user experience is improved.

[0020] Figure 1 A flowchart of a zero-permission CAPTCHA autofill method 100 based on edge AI semantic recognition according to an embodiment of this disclosure is shown. Figure 1 As shown, method 100 includes: S101 intercepts target data based on the underlying system services and suspends the broadcast distribution of the target data; the suspended target data is stored in the underlying system's secure memory sandbox; the target data includes SMS messages and notification messages; For example, by intercepting two types of target data, SMS and system notification, through the terminal operating system's underlying communication services and notification management services, the original application layer broadcast distribution link is blocked and the broadcast event is temporarily suspended, and the original target data is isolated and stored in a secure memory sandbox managed by the operating system kernel.

[0021] For example, the terminal's TelephonyRegistry underlying communication service listens for cellular SMS reception events, while the system's NotificationManager service listens for application push notifications and system notification pop-up events. When the terminal receives any SMS message or application notification message, the system's underlying hook function prioritizes capturing the original data of the message, preempting the message distribution process. After capturing the target data, the system's underlying service immediately suspends the system-wide broadcast corresponding to the message, stopping the intention to send SMS / notification broadcasts to all third-party application processes. This completely cuts off all channels for third-party applications to listen for broadcasts and read the original content of SMS messages and notifications via callbacks, preventing third-party applications from perceiving or obtaining the original message text.

[0022] For example, an independent memory sandbox is created, which only has read and write permissions for the underlying operating system services and no access permissions for third-party applications. The sandbox memory space is completely isolated from the user-mode memory of the application process. The full text of the suspended SMS message and the notification text are completely written to this protected temporary memory sandbox without being written to the local disk, clipboard, or forwarded to any application process. Only the system kernel-mode services can read the data in the sandbox throughout the process. The sandbox is only allocated a short lifespan and has no persistent storage logic, thus avoiding the risk of message leakage due to long-term plaintext retention.

[0023] For example, the intercepted and stored target data includes: SMS text messages sent by operators; notification messages pushed to the terminal notification bar by various third-party applications; the target data is uniformly captured by the underlying service and isolated and cached, covering all verification code distribution channels.

[0024] In one possible implementation, a three-layer isolation design—including underlying service pre-interception, broadcast suspension blocking, and kernel-level security sandbox—is used to isolate third-party applications from accessing SMS and notification raw data at the data source. Compared to existing solutions where messages are directly distributed to the application layer and stored in the clipboard, this completely eliminates the privacy and security risks of third-party applications reading historical SMS messages in batches and stealing plaintext verification codes in the background. At the same time, it provides an isolated and secure raw text data source for subsequent edge AI semantic parsing.

[0025] S102, based on a lightweight natural language processing model, perform semantic recognition on the target data and determine whether the target data belongs to CAPTCHA data; if so, extract the CAPTCHA string from the target data; In one possible implementation, a lightweight natural language processing model is used to perform semantic recognition and parsing on the text content of the target data, extracting key semantic features from the text content. The key semantic features include scene feature words and code value features. Scene feature words are used to characterize the relevant scene of the target data, and code value features are used to characterize the combination of numbers and / or letters in the text content. Based on the scene feature words, it is determined whether the target data belongs to the CAPTCHA-related scene category. If so, the target data is determined to be CAPTCHA data.

[0026] In one possible implementation, if the target data does not belong to the CAPTCHA data, the target data stored in the secure memory sandbox is cleared.

[0027] In one possible implementation, based on code value characteristics, consecutive combinations of numeric characters and / or alphanumeric characters are identified from the text content of the target data; the identified character combinations are filtered based on a preset length range, and character combinations that meet the preset length range are selected as candidate verification code strings; the occurrence positions of character combinations in the candidate verification code strings in the text content are obtained; and character combinations whose occurrence positions are relatively far from preset scene keywords are determined as the final verification code strings.

[0028] For example, the operating system's built-in lightweight NLP model is invoked to perform local end-side semantic parsing on the target data of SMS messages and notifications stored in the secure memory sandbox, extract key semantic features of the text and complete the CAPTCHA scenario identification; if the message is determined to be CAPTCHA data, a unique valid CAPTCHA string is filtered and output based on the code value features and keyword positional relationships; if it is determined to be a non-CAPTCHA message, a security circuit breaker mechanism is immediately triggered to clear all target data in the sandbox.

[0029] For example, the model is a miniaturized and lightweight NLP neural network on the edge, pre-compiled and built into the underlying layer of the terminal system, deployed in the system kernel mode, does not occupy the resources of third-party application processes, performs offline local computation throughout, does not require network connection to upload text to the cloud, and there is no risk of data leakage.

[0030] For example, the number of model parameters and computational load have been pruned and optimized, the inference time for a single text is controlled in the millisecond level, and the CPU and memory power consumption is extremely low, so as not to cause terminal lag or increased power consumption.

[0031] For example, only the underlying system services can read the target text in the secure memory sandbox, while third-party applications and foreground processes have no right to access the model's input and output data streams.

[0032] For example, the complete message text in the sandbox is read, the text is cleaned, and invalid interference characters such as spaces, special symbols, and newlines are removed to generate standardized text to be parsed. The model has a built-in CAPTCHA scenario vocabulary library, which includes scenario feature words such as "CAPTCHA, verification code, login, registration, verification, security code, validity period". The text is traversed to match and mark all matched scenario feature words to determine the message business scenario. Through regular expression matching rules, continuous number and number + letter combination character segments in the text are identified and all are marked as candidate code value features. The start and end positions and character length of each character combination are recorded.

[0033] For example, the system checks whether there is at least one valid scene feature word in the standardized text; if it exists, the target data is determined to be CAPTCHA data and the CAPTCHA extraction process is initiated; if no scene feature word is matched, it is determined to be a regular SMS / notification, a circuit breaker operation is executed, the system underlying layer forcibly clears all target data stored in the security memory sandbox, and the process terminates.

[0034] For example, based on a preset verification code length threshold, code value features exceeding the length range are filtered out, and character combinations that conform to the length specification are retained as candidate verification code strings; the relative distance between each candidate verification code string and the scene feature words in the text is calculated; candidate character combinations whose relative distance to the scene feature words is less than a preset distance threshold are selected; if there are multiple combinations that meet the conditions, the one with the closest distance is selected as the final verification code string; the extracted verification code string is temporarily stored separately in an independent sandbox partition, while the original complete message text is still kept in the sandbox and will be destroyed uniformly after the subsequent focus control verification is completed.

[0035] In one possible implementation, local semantic recognition is performed based on an offline, lightweight, on-device NLP model, without transmitting user SMS messages or notification texts to external systems, thus mitigating the risk of cloud data leakage at the source. Through a triple filtering rule of scene feature words, code value length, and keyword relative distance, ordinary messages and verification code messages can be accurately distinguished, while irrelevant numeric strings such as card numbers, phone numbers, and order numbers are filtered out to avoid extracting incorrect characters. For non-verification code messages, the sandbox cache is cleared immediately to reduce the retention time of plaintext. Furthermore, the lightweight model design ensures low latency and low power consumption during parsing, enabling seamless processing for users, while completely avoiding exposing any original message text to third-party applications, continuously maintaining a zero-permission privacy isolation effect.

[0036] S103, based on the window management service, scan the windows that are currently active in the foreground, obtain the control properties of the input control that currently has user focus, and determine whether the control properties meet the preset injection conditions; In one possible implementation, the window management service scans the currently active windows in the foreground to obtain window identifiers; based on the window identifiers, the control identifiers of the input controls with user focus in the active windows in the foreground are obtained; based on the control identifiers, the control properties of the input controls are queried, including class name properties and input type properties.

[0037] In one possible implementation, the preset injection conditions include: determining that the control property meets the preset injection conditions only if the class name attribute is a preset edit box class and the input type attribute is a preset text input type; otherwise, clearing the target data stored in the safe memory sandbox.

[0038] For example, the operating system's underlying WindowManagerService window management core service is called to traverse the active window at the top level of the terminal's foreground, retrieve the UI input control that currently holds the input focus, read the complete control properties corresponding to the control, and perform multi-dimensional compliance verification according to preset injection conditions. If the verification does not meet the preset injection conditions, the security circuit breaker logic is immediately triggered to clear the target data and verification code string cached in the security memory sandbox and terminate the autofill process.

[0039] For example, after the lightweight NLP model on the client side successfully extracts the verification code string, the system automatically initiates window probing logic. The WindowManagerService exclusively controls the window view query permissions, and third-party applications cannot intercept or interfere with this view scanning behavior. The WindowManagerService traverses the entire application window stack of the system, selects the TopActivity window with the highest Z-axis hierarchy, visible in the foreground, and in a user-interactive active state, and obtains the unique window identifier WindowID of the window. It filters out non-business interactive windows such as background dormant windows, pop-up overlays, and system prompts. Based on the obtained window identifier, it performs a deep traversal of all View trees inside the window, queries the control currently receiving system input focus in real time, and generates the corresponding unique control identifier ViewID. If there is no input control receiving focus in the current window, it is directly determined that the injection conditions are not met, and sandbox data destruction is performed.

[0040] For example, only the underlying system services can read the underlying native properties of controls across processes via ViewID. Third-party applications have no right to read the parameters of other page controls, so there is no risk of view information leakage.

[0041] For example, the class name attribute retrieves the complete class name of the control, distinguishing between different control types such as the native edit box control EditText, TextView, Button, and ImageView; the input type attribute reads the inputType parameter of the control, distinguishing between input modes such as numeric input, text input, password input, multiline text, and telephone input.

[0042] For example, the read class name and input type attributes are only temporarily stored in the system kernel temporary register, and are not written to the sandbox or forwarded to any third-party application process.

[0043] For example, the system sets up a dual hard validation rule. Only when both conditions are met simultaneously will the control properties be determined to meet the preset injection conditions. The control class name must be the system's preset edit box class EditText, excluding non-input controls such as buttons, text display boxes, and images, to prevent the verification code from being mistakenly filled into the display text. The control input type is the preset text / number input type, which is suitable for verification code pure number and mixed number and letter input scenarios.

[0044] For example, if the class name is not EditText or the input type does not conform to the verification code input specification, the injection condition is determined not to be met. The system immediately clears the original SMS / notification data and the extracted verification code string stored in the secure memory sandbox, releases the sandbox memory resources, and the entire filling process is terminated directly without executing subsequent injection steps.

[0045] In one possible implementation, WindowManagerService system-level view scanning enables precise location of foreground focus controls across applications and without permission dependencies, without requiring any page view interfaces from third-party applications. A dual validation mechanism based on control class name and input type avoids incorrect CAPTCHA filling into non-input controls, password fields, phone number fields, and other abnormal scenarios from a business logic perspective, significantly improving filling accuracy. A circuit breaker mechanism for immediate destruction of sandbox data in validation failure scenarios shortens the plaintext CAPTCHA retention time in memory, further strengthening privacy and security protection. All control attribute reading operations are completed only in kernel mode, so third-party applications cannot perceive the view detection process, and the original page logic of the application is not altered, resulting in strong application compatibility.

[0046] S104, if so, then obtain the input connection handle of the input control based on the input management service, and call the text submission interface of the input connection handle to write the verification code string into the input control to complete the verification code filling.

[0047] In one possible implementation, the target data stored in the secure memory sandbox is cleared.

[0048] For example, when the verification determines that the currently focused input control meets all the preset injection conditions, the underlying InputManagerService input management core service of the operating system is called to take over the underlying InputConnection input connection handle of the target EditText control across processes. The system-level virtual input is executed through the native commitText text submission interface of the handle, and the verification code string cached in the sandbox is atomically written to the focused input control to complete the automatic filling of the verification code. After the filling action is completed, the memory cleanup process is triggered synchronously to forcibly destroy all cached data in the secure memory sandbox.

[0049] For example, InputManagerService is the core input service with the highest system privileges. Only operating system kernel programs can actively call it. Third-party application processes do not have permission to directly access this service, and cannot hijack or tamper with the input injection chain.

[0050] For example, based on the unique identifier of the target control (View), the system bypasses the regular input listening interface exposed by the application layer and directly penetrates across processes to the underlying view of the application process, exclusively obtaining the InputConnection handle bound to the EditText control. The handle is the control's native low-level communication interface, used for transmitting text and key events between the system and the input control. Third-party applications cannot intercept the low-level read and write operations of the handle.

[0051] For example, an independent system-level virtual input channel is established, which is independent of the system input method, clipboard, and application data pipeline. It does not pass through the clipboard at all and there is no path for other background applications to eavesdrop or intercept verification codes.

[0052] For example, the extracted verification code string is passed as an input parameter to the commitText native text submission interface provided by the InputConnection handle; the interface has a built-in cursor offset parameter, which automatically places the input cursor at the end of the verification code after writing, which conforms to the normal user input interaction logic.

[0053] For example, text writing is a single, uninterruptible atomic operation that pushes the complete verification code characters to the control's input buffer in one go, without issues such as segmented writing, character loss, or garbled characters. The writing behavior appears as a standard keyboard manual input event to third-party applications. The application layer can only perceive changes in the EditText text content and cannot distinguish whether it is manual input by the user or virtual injection from the underlying system.

[0054] For example, the injected logic reuses the standard input interface of the native Android input method, without modifying the application page controls, tampering with the application memory data, or calling the application's private APIs. The input behavior detection and anti-cheating verification logic built into financial and login applications will not intercept this fill operation, making it compatible with all types of third-party applications.

[0055] For example, after the verification code string is successfully written to the input control and the commitText interface returns a success signal, the system's underlying layer synchronously initiates a security cleanup command to immediately clear the original text of the SMS / notification and the verification code string cached in the secure memory sandbox, releasing the sandbox's exclusive memory space. The memory erasure adopts an overwrite and zeroing mechanism, rather than simply marking the memory as available, to completely remove plaintext data residue and prevent verification code leakage caused by memory read vulnerabilities.

[0056] For example, after the text is written, the InputConnection handle is actively disconnected to release system input service resources and avoid memory leaks and page interaction lag caused by holding the control handle for a long time.

[0057] For example, after the sandbox data destruction and handle release are completed, the entire automatic CAPTCHA filling process officially ends, the system releases all underlying service resources occupied by this interception, parsing, detection, and injection, and the terminal resumes normal message distribution and window scanning logic.

[0058] In one possible implementation, the native InputConnection handle of the control is directly manipulated through the privileged channel of the InputManagerService system. Text injection is completed through the commitText standard interface, completely abandoning the clipboard relay solution and eliminating the risk of secondary leakage of CAPTCHA caused by global clipboard eavesdropping. The system-level virtual input behavior completely simulates real keyboard input, without disrupting the original business logic of third-party applications and without anti-cheating interception compatibility issues. After filling, all plaintext data in the sandbox is synchronously overwritten and destroyed, realizing that the CAPTCHA is used and destroyed immediately, minimizing the plaintext retention period of privacy data. Throughout the process, the third-party application does not have SMS or notification reading permissions, and only passively receives the control text change results. From the data acquisition source to the data writing and data destruction, zero-permission privacy isolation is maintained throughout the entire chain, taking into account filling reliability, application compatibility and terminal privacy security.

[0059] For example, the underlying TelephonyRegistry communication service and NotificationManager notification service capture two types of target data in real time: carrier SMS messages and application notifications. They immediately suspend the corresponding system broadcasts and block the distribution link to all third-party applications, storing the raw messages that have not passed through the application layer completely in a secure memory sandbox accessible only to the kernel and completely isolated from application processes. This process avoids writing to disk or copying to the clipboard. Subsequently, the terminal's built-in lightweight offline NLP model performs local semantic parsing of the text within the sandbox, extracting scene feature words and numeric / alphanumeric code value features. The message type is determined by matching verification code-related scene keywords. If identified as a verification code message, a unique verification code string is selected based on character length, the relative distance between scene words and code values, and cached in the sandbox partition. If identified as a normal message, the sandbox data is cleared, terminating the process. Next, WindowManagerService scans the top-level active window and locates the UI control currently holding input focus, reading both the control class name and input type attributes. Only when the control is a native EditText edit box and the input type is matched to a specific value is the input type selected. In character / character verification code scenarios, if the injection conditions are met, a security circuit breaker is triggered to erase all cached data in the sandbox if the verification fails. If the verification passes, InputManagerService establishes an independent system privileged input channel, directly obtains the underlying InputConnection handle of the target EditText across processes, and calls the native commitText interface to atomically write the verification code string into the input control. This injection behavior is equivalent to manual keyboard input and will not trigger application risk control anti-fraud interception. After the text is successfully written, the system immediately clears all SMS plaintext and verification code plaintext in the security memory sandbox and releases the input handle. Throughout the entire process, third-party applications do not need to obtain any sensitive permissions for SMS reading or notification listening, and cannot access the original privacy content of SMS and notifications. Relying on the underlying interception and isolation, on-device offline AI parsing, window control security verification, system native virtual input, and memory destruction after use, the system can automatically fill the verification code in milliseconds with low power consumption and without being noticed. At the same time, it can eliminate security defects such as privacy theft, clipboard eavesdropping, incorrect filling, and long-term plaintext retention from the entire link, achieving a two-way balance between convenient interaction and terminal privacy security.

[0060] In this disclosure, target data is intercepted based on the underlying system services, and the broadcast distribution of the target data is suspended. The suspended target data is stored in a secure memory sandbox at the system's underlying level. The target data includes SMS messages and notification messages. The target data is semantically recognized based on a lightweight natural language processing model, and it is determined whether the target data belongs to CAPTCHA data. If so, the CAPTCHA string is extracted from the target data. The window management service scans the currently active windows in the foreground, obtains the control attributes of the input control currently having user focus, and determines whether the control attributes meet the preset injection conditions. If so, the input connection handle of the input control is obtained based on the input management service, and the text submission interface of the input connection handle is called to write the CAPTCHA string into the input control to complete the CAPTCHA filling. In this way, the third-party application has zero sensitive permissions throughout the process and cannot access any original privacy data of SMS messages and notifications, eliminating the risk of privacy overstepping and theft, eliminating the hidden danger of secondary leakage, improving system compatibility, improving the accuracy of CAPTCHA recognition and filling, avoiding misfilling, with no cloud data upload, extremely low power consumption, and no user experience, shortening the privacy data retention time, and balancing the ease of operation of automatic CAPTCHA filling, terminal privacy security, and terminal performance.

[0061] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this disclosure.

[0062] The above is an introduction to the method embodiments. The following describes the solution described in this disclosure further through device embodiments.

[0063] Figure 2 A block diagram of a zero-permission CAPTCHA autofill device 200 based on edge AI semantic recognition according to an embodiment of the present disclosure is shown. Figure 2 As shown, the device 200 includes: The receiving module 201 is used to intercept target data based on the underlying system services and suspend the broadcast distribution of the target data; store the suspended target data in the secure memory sandbox of the underlying system; the target data includes SMS messages and notification messages; The recognition module 202 is used to perform semantic recognition on the target data based on a lightweight natural language processing model, and determine whether the target data belongs to CAPTCHA data; if so, the CAPTCHA string is extracted from the target data. The judgment module 203 is used to scan the windows that are currently active in the foreground based on the window management service, obtain the control properties of the input control that currently has user focus, and determine whether the control properties meet the preset injection conditions. The filling module 204 is used to, if yes, obtain the input connection handle of the input control based on the input management service, and call the text submission interface of the input connection handle to write the verification code string into the input control to complete the verification code filling.

[0064] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0065] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0066] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0067] Figure 3 A schematic block diagram of an electronic device 300 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0068] Electronic device 300 includes a computing unit 301, which can perform various appropriate actions and processes according to a computer program stored in ROM 302 or a computer program loaded into RAM 303 from storage unit 308. RAM 303 can also store various programs and data required for the operation of electronic device 300. The computing unit 301, ROM 302, and RAM 303 are interconnected via bus 304. I / O interface 305 is also connected to bus 304.

[0069] Multiple components in electronic device 300 are connected to I / O interface 305, including: input unit 306, such as keyboard, mouse, etc.; output unit 307, such as various types of displays, speakers, etc.; storage unit 308, such as disk, optical disk, etc.; and communication unit 309, such as network card, modem, wireless transceiver, etc. Communication unit 309 allows electronic device 300 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0070] The computing unit 301 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the various methods and processes described above, such as method 100. For example, in some embodiments, method 100 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 300 via ROM 302 and / or communication unit 309. When the computer program is loaded into RAM 303 and executed by the computing unit 301, one or more steps of method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 301 may be configured to perform method 100 by any other suitable means (e.g., by means of firmware).

[0071] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0072] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0073] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0074] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including voice input, speech input, or tactile input).

[0075] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0076] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0077] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0078] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A zero-permission CAPTCHA auto-filling method based on edge AI semantic recognition, applied to the operating system of a mobile terminal, characterized in that, include: The system intercepts target data based on its underlying services and suspends the broadcast distribution of the target data. The suspended target data is stored in a secure memory sandbox at the system's underlying layer; the target data includes SMS messages and notification messages. The target data is semantically recognized based on a lightweight natural language processing model, and it is determined whether the target data belongs to CAPTCHA data. If so, then extract the verification code string from the target data; Based on the window management service, scan the windows that are currently active in the foreground, obtain the control properties of the input control that currently has user focus, and determine whether the control properties meet the preset injection conditions. If so, the input connection handle of the input control is obtained based on the input management service, and the text submission interface of the input connection handle is called to write the verification code string into the input control to complete the verification code filling.

2. The method according to claim 1, characterized in that, The step of performing semantic recognition on the target data based on a lightweight natural language processing model and determining whether the target data belongs to CAPTCHA data includes: The text content of the target data is semantically recognized and parsed based on a lightweight natural language processing model to extract key semantic features from the text content. The key semantic features include scene feature words and code value features. The scene feature words are used to represent the relevant scene of the target data, and the code value features are used to represent the combination of numbers and / or letters in the text content. Based on the scene feature words, determine whether the target data belongs to the CAPTCHA-related scene category; if so, determine that the target data belongs to CAPTCHA data.

3. The method according to claim 2, characterized in that, The step of extracting the verification code string from the target data includes: Based on the code value features, identify consecutive combinations of numeric characters and / or alphanumeric characters from the text content of the target data; The identified character combinations are filtered based on a preset length range, and the character combinations that conform to the preset length range are used as candidate verification code strings. Obtain the position of the character combination in the candidate verification code string within the text content; The character combinations whose relative distance between the occurrence location and the preset scene keyword is less than a preset threshold are determined as the final verification code string.

4. The method according to claim 1, characterized in that, The method of scanning the currently active windows based on the window management service to obtain the control properties of the input control currently having user focus includes: The window management service scans the currently active windows in the foreground to obtain window identifiers; Based on the window identifier, obtain the control identifier of the input control that has user focus in the active window in the foreground; Based on the control identifier, the control properties of the input control are queried, and the control properties include class name property and input type property.

5. The method according to claim 4, characterized in that, The preset injection conditions include: The control attribute is deemed to satisfy the preset injection condition only when the class name attribute is a preset edit box class and the input type attribute is a preset text input type; Otherwise, clear the target data stored in the secure memory sandbox.

6. The method according to claim 1, characterized in that, If so, extracting the verification code string from the target data further includes: If the target data does not belong to the CAPTCHA data, then the target data stored in the secure memory sandbox is cleared.

7. The method according to claim 1, characterized in that, After writing the verification code string into the input control to complete the verification code filling, the method further includes: Clear the target data stored in the secure memory sandbox.

8. A zero-permission CAPTCHA automatic filling device based on edge AI semantic recognition, characterized in that, include: The receiving module is used to intercept target data based on the underlying system services and suspend the broadcast distribution of the target data; The suspended target data is stored in a secure memory sandbox at the system's underlying layer; the target data includes SMS messages and notification messages. The recognition module is used to perform semantic recognition on the target data based on a lightweight natural language processing model, and to determine whether the target data belongs to CAPTCHA data. If so, then extract the verification code string from the target data; The judgment module is used to scan the windows that are currently active in the foreground based on the window management service, obtain the control properties of the input control that currently has user focus, and determine whether the control properties meet the preset injection conditions. The filling module is used to, if yes, obtain the input connection handle of the input control based on the input management service, and call the text submission interface of the input connection handle to write the verification code string into the input control to complete the verification code filling.

9. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method described in any one of claims 1-7.

10. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 7.