Interaction event recognition method and apparatus

By obtaining the function call stack information and event dispatch function of the interaction event, the type of interaction event can be directly determined, which solves the problem of accuracy and convenience in electronic devices to identify simulated interaction events, improves recognition efficiency, and avoids waste of funds and loss of reputation.

CN122173171APending Publication Date: 2026-06-09VIVO MOBILE COMM CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2026-03-27
Publication Date
2026-06-09

Smart Images

  • Figure CN122173171A_ABST
    Figure CN122173171A_ABST
Patent Text Reader

Abstract

The application discloses an interactive event recognition method and device, and belongs to the technical field of electronic devices. The method comprises the following steps: in the case that an interactive event is detected, function call stack information of the interactive event is acquired, the function call stack information being used for representing function call records of the electronic device in response to the interactive event; and based on the function call stack information and an event distribution function, it is determined whether the interactive event is a simulated interactive event, the event distribution function being used for transmitting event information of the interactive event from a framework layer of the electronic device to an application layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic equipment technology, and specifically relates to an interactive event recognition method and apparatus. Background Technology

[0002] During the display of advertisements on electronic devices, advertising media can use scripts, system commands and other technical means to quickly and automatically complete simulated interactive events for the advertisement in order to defraud advertising fees. However, for advertisers and advertising platforms, such simulated interactive events are not the user's real intentions and real behaviors, that is, they do not generate real advertising conversion traffic. Therefore, it is necessary to identify whether the interactive events are real or simulated.

[0003] Typically, real interactive events are triggered manually by users, so their coordinates are relatively random, while the coordinates of simulated interactive events are often distributed in fixed locations. Therefore, related technologies can rely on cloud-based risk control strategies to identify simulated interactive events. This involves acquiring a large amount of interactive event data from a single ad placement through cloud-based big data analytics, and then using this data to identify whether the coordinates of the interactive events are randomly distributed, thus determining whether simulated interactive events exist within this large dataset.

[0004] However, the methods described above rely on centralized data analysis of a large amount of interaction event data, which requires discovering patterns in the interaction events. However, during manual user triggering, sporadic occurrences may happen, where the coordinate positions of multiple user-triggered interaction events are repeated. This may prevent the discovery of patterns in the coordinate positions, resulting in poor accuracy and convenience for electronic devices in recognizing simulated interaction events. Summary of the Invention

[0005] The purpose of this application is to provide an interactive event recognition method and apparatus that can improve the accuracy and convenience of electronic devices in recognizing simulated interactive events.

[0006] In a first aspect, embodiments of this application provide an interactive event identification method, which includes: upon detecting an interactive event, acquiring function call stack information of the interactive event, the function call stack information being used to characterize function call records of an electronic device in response to the interactive event; and determining whether the interactive event is a simulated interactive event based on the function call stack information and an event dispatch function, the event dispatch function being used to transmit event information of the interactive event from the framework layer of the electronic device to the application layer.

[0007] Secondly, embodiments of this application provide an interactive event recognition device, which includes: an acquisition module and a determination module; the acquisition module is used to acquire function call stack information of the interactive event when an interactive event is detected, the function call stack information being used to characterize the function call record of the electronic device in response to the interactive event; the determination module is used to determine whether the interactive event is a simulated interactive event based on the function call stack information acquired by the acquisition module and the event dispatch function, the event dispatch function being used to transmit the event information of the interactive event from the framework layer of the electronic device to the application layer.

[0008] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, wherein the memory stores programs or instructions executable on the processor, and the programs or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0009] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0010] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0011] In a sixth aspect, embodiments of this application provide a computer program / program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.

[0012] In this embodiment, upon detecting an interaction event, the function call stack information of the interaction event is obtained. This function call stack information is used to characterize the function call records of the electronic device in response to the interaction event. Based on the function call stack information and the event dispatch function, it is determined whether the interaction event is a simulated interaction event. The event dispatch function is used to transmit the event information of the interaction event from the framework layer of the electronic device to the application layer. In this solution, since the operations performed by the electronic device in response to real interaction events are different from those performed by the electronic device in response to simulated events, and the function call stack information can be used to characterize the function call records of the electronic device in response to interaction events, i.e., the function call stack information corresponding to the two types of interaction events is different, the electronic device can identify the type of interaction event through the fundamental difference in the function call process, i.e., whether it involves an event dispatch function that transmits the event information of the interaction event between the framework layer and the application layer. Furthermore, when the electronic device detects a single interaction event, it can directly determine whether the single interaction event is a real interaction event or a simulated interaction event, without needing to acquire a large amount of interaction event data and perform unified data analysis. This improves the accuracy and convenience of the electronic device in identifying simulated interaction events. Attached Figure Description

[0013] Figure 1 This is one of the flowcharts of an interactive event recognition method provided in the embodiments of this application;

[0014] Figure 2A This is one of the flowcharts for responding to interactive events provided in the embodiments of this application;

[0015] Figure 2B This is a second flowchart of a response to an interactive event provided in an embodiment of this application;

[0016] Figure 3 This is a second flowchart of an interactive event recognition method provided in an embodiment of this application;

[0017] Figure 4 This is the third flowchart of an interactive event recognition method provided in the embodiments of this application;

[0018] Figure 5 This is the fourth flowchart of an interactive event recognition method provided in the embodiments of this application;

[0019] Figure 6 This is a schematic diagram of the structure of an interactive event recognition device provided in an embodiment of this application;

[0020] Figure 7 This is one of the hardware structure diagrams of an electronic device provided in the embodiments of this application;

[0021] Figure 8 This is a second schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0023] The terms "first," "second," etc., used in this application's specification are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class, without limiting the number of objects. For example, a first object can be one or more, where "more" means at least two. Furthermore, in the specification, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0024] The terms "at least one," "at least one," etc., used in this application's specification refer to any one, any two, or a combination of two or more of the included objects. For example, "at least one of a, b, and c" can mean: "a," "b," "c," "a and b," "a and c," "b and c," and "a, b, and c," where a, b, and c can be single or multiple, and multiple means at least two. Similarly, "at least two" refers to two or more, and its meaning is similar to that of "at least one."

[0025] The terminology used in the implementation section of this application is only for explaining specific embodiments of this application and is not intended to limit this application. The terminology involved in the embodiments of this application is explained below.

[0026] Android advertising media: Regular applications or games running on Android can display ads within the app by integrating with advertising platforms or ad networks. This requires integrating the software development kit (SDK) provided by the ad network to display the ads. If a user clicks on the ad or downloads the app featured in the ad, the advertising media can earn advertising fees from the advertising platform or advertiser.

[0027] Simulated clicks: Clicks made by a user's finger on the screen, not by the user's actual finger. These clicks can be achieved using scripts, system commands, or other techniques, by simulating clicks on clickable components on the screen, such as page navigation buttons. After a simulated click, the clicked component can respond similarly to a physical click. There are many techniques and scenarios for simulated clicks. For example, in advertising scenarios, advertising media can quickly and automatically complete clicks on ads without user intervention or higher system privileges, using scripts and system commands to fraudulently claim advertising revenue.

[0028] Printing a stack trace refers to outputting the current thread's call stack information to a log, console, or other specified location during program execution. This information is used for debugging, error tracing, or analyzing the program's execution flow. The stack trace records the entire chain of method calls from the program's entry point to the current execution point, including key information such as class name, method name, file name, and line number. By printing the stack trace, developers can quickly locate the specific location where an exception occurred or analyze the program's execution flow. This is extremely useful when debugging complex logic or handling exceptions.

[0029] The system can include four key components: application (APP), system framework layer, HAL layer, and Linux kernel layer. They work together to realize a complete functional chain from user application to hardware operation.

[0030] The APP layer is the layer where users directly interact, encompassing all applications visible to the user, such as pre-installed system applications and third-party applications installed by the user. Pre-installed system applications may include, but are not limited to, phone applications, SMS applications, and settings applications.

[0031] The system framework layer, often referred to as the application framework layer, provides developers with the APIs and tools needed to build applications, simplifies the reuse of core modular system components and services, and enables applications to easily access system resources and services.

[0032] The Linux kernel layer is the underlying foundation of the system, responsible for managing core system functions such as process scheduling, memory management, device drivers, and power management.

[0033] The system framework layer can include several core system services, such as Package Manager Service (PMS), Activity Manager Service (AMS), and Window Manager Service (WMS). Among them, PMS is responsible for application package management, AMS is responsible for application lifecycle management, and WMS is responsible for window management.

[0034] Specifically, WMS is responsible for managing all windows on an electronic device, including window layout, hierarchy, animation, and event dispatch. It ensures the user interface displays and interacts correctly, while providing rich window management functions such as adding, deleting, moving, and resizing windows. These windows on an electronic device can include application windows, system windows, and navigation bars, among others.

[0035] An Application Programming Interface (API) is a definition and tool used to enable data exchange and function calls between different software systems. It can be seen as a "bridge" between software systems, facilitating seamless communication. The core function of an API is to enable clients, such as applications, to send requests to servers and receive processed responses through predefined rules and protocols. For example, when using a weather app to check the weather, the app can send a request to the weather service via the API, retrieve the data, and then display it to the user.

[0036] During the display of advertisements on electronic devices, advertising media can use scripts, system commands and other technical means to quickly and automatically complete simulated interactive events with the advertisement in order to defraud advertising fees. However, such simulated interactive events are usually not the user's real intentions and real behaviors, that is, they do not generate real advertising conversion traffic.

[0037] Specifically, for advertisers, since they need to pay for interactive events, as the number of simulated interactive events increases, advertisers have to pay for these fake simulated interactions without acquiring real users, such as potential customers or app installers. This leads to a waste of advertisers' funds. At the same time, simulated interactive events can inflate the click-through rate (CTR) of ads and decrease the conversion rate (CVR). As a result, advertisers may be misled by the data, misjudge ad quality, and cause their optimization direction to deviate from their actual needs.

[0038] For advertising platforms, if advertisers discover a large amount of fake traffic, they may reduce or even stop advertising on that platform, leading to a decrease in platform value and impacting revenue. Furthermore, simulated interactive events often involve malicious redirects, such as automatically redirecting users to detail pages after clicking an ad or automatically downloading an app, which erodes user trust in the platform. Ultimately, this damages the advertising platform's reputation and disrupts the advertising ecosystem.

[0039] Therefore, both advertisers and advertising platforms need to know whether the interaction event data is actually a real interaction event or a simulated interaction event.

[0040] Typically, real interactive events are triggered manually by users, so their coordinates are relatively random, while the coordinates of simulated interactive events are often distributed in fixed locations. Therefore, related technologies can rely on cloud-based risk control strategies to identify simulated interactive events. This involves acquiring a large amount of interactive event data from a single ad placement through cloud-based big data analytics, and then using this data to identify whether the coordinates of the interactive events are randomly distributed, thus determining whether simulated interactive events exist within this large dataset.

[0041] However, the above methods rely on centralized data analysis of a large amount of interaction event data, so the following problems are inevitable:

[0042] In the operation of advertising media, in order to counter risk control, the number of interaction events counted will include both real interaction events triggered by users and simulated interaction events. That is, not every interaction event with the advertisement is achieved through cheating. Therefore, during the data analysis process, it may be impossible to find patterns in the coordinate positions.

[0043] At the same time, even if data analysis reveals the coordinates of relatively concentrated interactive events, these may not be sufficient evidence due to occasional occurrences during manual triggering by the user, thus failing to clearly represent the user's true intentions and behaviors.

[0044] This results in electronic devices having poor convenience and accuracy in recognizing simulated interactive events.

[0045] The interactive event recognition method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0046] The interactive event recognition method provided in this application can be applied to scenarios where electronic devices need to collect or count the number of interactions. Examples include clicking on advertisements, grabbing red envelopes via electronic devices, and automating gameplay through scripts.

[0047] The interactive event recognition method provided in this application will be illustrated below using some specific scenarios as examples.

[0048] In advertising display scenarios, when an electronic device detects an interaction event, it needs to determine whether the event is a real interaction triggered by the user or a simulated interaction event generated by techniques such as scripts or system commands. Therefore, the electronic device can obtain the function call stack information of the interaction event, that is, obtain the function call record in response to the interaction event. Based on this function call stack information, it can determine whether it contains an event dispatch function that can represent the transmission of event information between the framework layer and the application layer. Thus, based on the difference between the functions called in response to real and simulated interaction events, it can determine whether the interaction event is simulated.

[0049] It should be noted that the above scenarios are merely illustrative examples of possible applications of the embodiments of this application. In actual implementation, the embodiments of this application can also be applied to any possible scenarios such as collecting or counting the number of interactions. The embodiments of this application are not limited here.

[0050] Based on the scenarios described in the embodiments of this application, the interactive event identification method provided in this application, upon detecting an interactive event, acquires the function call stack information of the interactive event. This function call stack information is used to characterize the function call records of the electronic device responding to the interactive event. Based on the function call stack information and the event dispatch function, it determines whether the interactive event is a simulated interactive event. The event dispatch function is used to transmit the event information of the interactive event from the framework layer of the electronic device to the application layer. In this solution, since the operation performed by the electronic device in response to a real interactive event is different from the operation performed by the electronic device in response to a simulated event, and the function call stack information can be used to characterize the function call records of the electronic device in response to the interactive event, i.e., the function call stack information corresponding to the two types of interactive events is different, the electronic device can identify the type of interactive event through the fundamental difference in the function call process, i.e., whether it involves an event dispatch function that transmits the event information of the interactive event between the framework layer and the application layer. At the same time, when the electronic device detects a single interactive event, it can directly determine whether the single interactive event is a real interactive event or a simulated interactive event, without needing to acquire a large amount of interactive event data and perform unified data analysis. This can improve the accuracy and convenience of electronic devices in recognizing simulated interactive events.

[0051] The interactive event recognition method provided in this application is executed by an interactive event recognition device, which can be an electronic device, or a functional module or entity within an electronic device. This application does not limit the specific implementation of this method. The following will use an electronic device as an example to illustrate the interactive event recognition method provided in this application.

[0052] This application provides an interactive event recognition method. Figure 1 A flowchart of an interactive event recognition method provided in an embodiment of this application is shown. Figure 1 As shown, the interactive event recognition method provided in this application embodiment may include the following steps 201 and 202.

[0053] Step 201: When an interaction event is detected, the electronic device obtains the function call stack information of the interaction event.

[0054] In some embodiments of this application, the aforementioned interactive events can be real interactive events or simulated interactive events.

[0055] Understandably, when an electronic device detects an interaction event, it can determine whether the interaction event is a real interaction event triggered by the user or a simulated interaction event generated by technologies such as scripts or system commands. This allows for the statistical analysis of different types of interaction events, and subsequent commercial decisions can be made based on the statistical results.

[0056] For example, the aforementioned real interaction events can be user clicks, touches, presses, swipes, or other feasible inputs on the screen of an electronic device. The specific input form can be determined according to the actual operation, and this application embodiment does not limit it here.

[0057] The screen of the aforementioned electronic device can be a capacitive screen.

[0058] In some embodiments of this application, the above-mentioned function call stack information can be used to characterize the function call records of an electronic device in response to interactive events.

[0059] It is understandable that the above function call stack information can be the complete path information of the called function from the program entry point to the method used to obtain the function call stack information.

[0060] In some embodiments of this application, step 201 can be specifically implemented by the following steps 201a and 201b.

[0061] Step 201a: If an interaction event is detected at the application layer of the electronic device, the electronic device intercepts the interaction event.

[0062] In some embodiments of this application, the electronic device can override the application layer's method for handling interactive events by using the dispatchTouchEvent(MotionEvent event) method in the application layer, so that the application layer can intercept the interactive event when it detects the interactive event.

[0063] For example, consider an ad display scenario. The electronic device can override the `dispatchTouchEvent(MotionEvent event)` method in the ad view component provided by the ad network SDK (i.e., the application layer mentioned above). Simply put, this can be understood as adding a new function to the existing logic for responding to interactive events in the application layer. Therefore, when the electronic device detects an interactive event, it can intercept the event by calling the `dispatchTouchEvent(MotionEvent event)` method, thus preventing the electronic device from responding to the interactive event in the foreground user interface (UI).

[0064] It should be noted that the above event parameter can be the interaction event detected by the electronic device in this instance.

[0065] It's important to note that `dispatchTouchEvent` is a crucial method in the Android system for handling the dispatch of interactive events, and it's a core method of the `View` and `ViewGroup` classes. When a user touches the screen of an electronic device, the system generates a `MotionEvent` object, and then uses the `dispatchTouchEvent` method to pass the interactive event level by level to various components in the view hierarchy, so that the component capable of handling the event can ultimately respond.

[0066] The MotionEvent mentioned above may include, but is not limited to, at least one of the following: the coordinates of the touch and the action type;

[0067] The aforementioned interactive events can start from the Activity's dispatchTouchEvent and be passed down through the ViewHierarchy from top to bottom, like a tunnel, until the most suitable View or ViewGroup is found to handle the event.

[0068] Step 201b: The electronic device calls the first function at the application layer to obtain the function call stack information of the interactive event.

[0069] In some embodiments of this application, the first function described above can be used to obtain the execution path information of the thread corresponding to the interactive event.

[0070] In some embodiments of this application, the first function described above can be the Thread.currentThread().getStackTrace() method.

[0071] In some embodiments of this application, the application layer can return a StackTraceElement array using the Thread.currentThread().getStackTrace() method. This StackTraceElement array can contain the call stack information of the current thread.

[0072] In this embodiment, since the operation performed by the electronic device in response to a real interactive event is different from the operation performed by the electronic device in response to a simulated event, and the function call stack information can be used to characterize the function call record of the electronic device in response to the interactive event, that is, the function call stack information corresponding to the two interactive events is different, the electronic device can identify the type of interactive event through the fundamental difference in the function call process, that is, whether it involves an event dispatch function that transmits event information of the interactive event in the framework layer and the application layer, thereby improving the accuracy of the electronic device in identifying simulated interactive events.

[0073] In some embodiments of this application, after step 201 above, the interactive event recognition method provided in the embodiments of this application may further include the following steps 301 and 302.

[0074] Step 301: The electronic device cleans up the preset system functions contained in the function call stack information based on the preset system function list, and obtains the cleaned function stack information.

[0075] In some embodiments of this application, the above-mentioned list of preset system functions may include at least one preset system function.

[0076] In some embodiments of this application, the aforementioned preset system functions may include internal system functions that are unrelated to interactive events.

[0077] Understandably, since function call stack information usually includes a large number of Android system internal functions that are unrelated to the determination of the source of the click event, such as message queue loop processing functions, electronic devices can obtain cleaned stack information by removing preset system functions that are unrelated to the interaction event distribution logic.

[0078] In some embodiments of this application, the aforementioned preset system functions may include, but are not limited to, function lines containing at least one of the following keywords:

[0079] at android.os.Looper.loop(Looper.java:xxx);

[0080] at android.os.MessageQueue.nativePollOnce(Native Method);

[0081] at android.os.MessageQueue.next(MessageQueue.java:xxx).

[0082] It should be noted that the above "at android.os.Looper.loop(Looper.java:xxx)" is the core of the continuous operation of the Android main thread, and its function is to start the thread's message loop;

[0083] The above "at android.os.MessageQueue.nativePollOnce(Native Method)" belongs to the underlying waiting mechanism, which suspends the thread when the message queue is empty in order to reduce the idling of the central processing unit (CPU).

[0084] The function of "at android.os.MessageQueue.next(MessageQueue.java:xxx)" is to retrieve the next Message to be processed from the message queue, which is the direct entry point for message dispatch.

[0085] Step 302: Check whether the function call stack information after the electronic device has been cleaned up contains an event dispatch function.

[0086] In this embodiment of the application, the electronic device can clean up the function call stack information to obtain function call information that is directly related to the interactive event dispatch logic. Thus, the electronic device can more conveniently determine whether the function stack information contains an event dispatch function, thereby reducing the amount of events required to identify interactive events and improving the efficiency of identifying interactive events.

[0087] In some embodiments of this application, the above-mentioned interaction event is a user's click event on the screen of the electronic device; the above-mentioned step 201 can be specifically implemented through the following steps A1 to A4.

[0088] Step A1: When a click event is detected on the screen of an electronic device, the electronic device writes the click event to the input device node file through the kernel layer.

[0089] Step A2: The electronic device reads the input device node file through the framework layer and processes the click event based on the input device node file.

[0090] Step A3: The electronic device transmits the processed click event to the application layer through the event dispatch function.

[0091] Step A4: The electronic device obtains the function call stack information of the click event in the framework layer through the application layer.

[0092] In some embodiments of this application, when a click event is detected on the screen of an electronic device, the electronic device can first obtain the capacitance change in the capacitive screen through a hardware layer, such as a capacitive screen sensor, and convert it into an electrical signal. Then, the kernel layer can execute secure kernel driver processing and further write the click event into the input device node file.

[0093] Specifically, when a user's finger touches the capacitive screen, the touch controller (Touch IC) detects the change in screen capacitance, generates an electrical signal, and triggers a CPU hardware interrupt via GPIO. Then, the touchscreen driver in the kernel responds to the interrupt, reads the raw coordinate data, and performs preliminary processing such as noise reduction and filtering. Next, the driver calls the kernel's Input Subsystem's `input_event()` interface to encapsulate the processed data into a standard `struct input_event` structure and writes the event to the corresponding character device node file, such as ` / dev / input / event*`. At this point, the event remains in the kernel buffer, waiting to be read by user space.

[0094] It should be noted that the aforementioned touchscreen driver can be located in drivers / input / touchscreen / ; the * in the aforementioned input device node file / dev / input / event* can be the device number.

[0095] In some embodiments of this application, the Input Manager Service (IMS) included in the system framework layer can run as an independent thread within the system_server process and monitor all / dev / input / event* nodes using the epoll mechanism via EventHub. When data is available, InputReader can read the raw input_event and convert it into a unified Android internal input event (RawEvent). Then, InputReader can place the event into the dispatch queue of InputDispatcher for dispatching to the appropriate window via InputDispatcher.

[0096] In some embodiments of this application, the InputDispatcher can send events to the application process via the InputChannel. The InputChannel has one endpoint on the system server and one on the application when the window is created.

[0097] In some embodiments of this application, during application process, ViewRootImpl can create a WindowInputEventReceiver during initialization, which is a subclass of InputEventReceiver.

[0098] In some embodiments of this application, when the data of an interactive event arrives at the application process from the InputChannel, the system can call back the dispatchInputEvent method of InputEventReceiver, which is the entry point for the interactive event to enter the application layer view processing pipeline from the system layer. Inside the dispatchInputEvent method, the onInputEvent(InputEvent event) method can be called.

[0099] In some embodiments of this application, the application layer can obtain the function call stack information of the interactive event in the framework layer through the Thread.currentThread().getStackTrace() method.

[0100] In some embodiments of this application, the application layer can call the `enqueueInputEvent` method of `ViewRootImpl` to put interactive events into the `ViewRootImpl`'s pending queue. Then, `ViewRootImpl`'s `InputStage` can process the interactive events, such as early interception or view animation adjustments.

[0101] For example, in the Android system, the event stream of a real interactive event can be as follows: Figure 2A The process shown is essentially a bottom-up, complete system process.

[0102] In some embodiments of this application, interactive events generated by simulated clicks can typically be directly constructed and dispatched using application-layer APIs such as MotionEvent.obtain() and View.performClick(), i.e. Figure 2B As shown, its origin is located in Figure 2A The phrase "simulated click event construction and dispatch" means that the response to simulated interaction events skips critical services at the kernel and framework layers. Application-layer APIs such as MotionEvent.obtain() and View.performClick() are typically used for testing.

[0103] Understandably, due to the fundamental difference in the event streams corresponding to the interactive events of real clicks and simulated clicks, whether the function call stack information of the application layer contains traces of the framework layer's specific dispatch function, i.e., the aforementioned event dispatch function, will become a key feature for distinguishing between simulated clicks and real clicks.

[0104] Step 202: The electronic device determines whether the interactive event is a simulated interactive event based on the function call stack information and the event dispatch function.

[0105] In some embodiments of this application, the event dispatch function described above can be used to transmit event information of interactive events from the framework layer of an electronic device to the application layer.

[0106] In some embodiments of this application, the electronic device can traverse the function call stack information to determine whether there is a preset event dispatch function located in the Android system framework layer in the function call stack information.

[0107] It should be noted that the event dispatch function mentioned above may belong to the framework layer at the code level, but it resides in the application process at runtime. That is, the event dispatch function can be the starting point for processing input events within the application process.

[0108] In some embodiments of this application, the code corresponding to the above event dispatch function can be: android.view.InputEventReceiver.dispatchInputEvent.

[0109] In some embodiments of this application, the electronic device's judgment logic for interactive events is as follows: if an event dispatch function can be detected in the function call stack information corresponding to the interactive event, it indicates that the interactive event has undergone a complete bottom-up system process, that is, the interactive event originates from real hardware input, and thus the interactive event can be judged as a real interactive event, such as a real click manually triggered by the user.

[0110] Correspondingly, if no event dispatch function is detected in the function call stack information corresponding to the interactive event, it means that the response process of the interactive event skips the system input service, that is, the interactive event comes directly from the application layer. Therefore, the interactive event can be determined as a simulated interactive event, such as a simulated click triggered by scripts or other technical means.

[0111] In some embodiments of this application, combined with Figure 1 ,like Figure 3 As shown, step 202 above can be implemented through step 202a or step 202b below.

[0112] Step 202a: If the function call stack information contains the event dispatch function, the electronic device determines that the interaction event is a real interaction event.

[0113] In some embodiments of this application, since the event dispatch function is a necessary node for real interactive events to be transmitted from the system input to the application layer, the event dispatch function will definitely exist in the function call stack information corresponding to the real interactive event.

[0114] For example, suppose the call chain result excerpt in the function call stack information obtained by the electronic device in the advertisement view is as follows:

[0115] java.lang.Exception: Call Stack

[0116] at com.morefunction.myapplication.MainActivity$1.onTouch(MainActivity.java:37)

[0117] at android.view.View.dispatchTouchEvent(View.java:15257)

[0118] ...

[0119] android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9784)

[0120] at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:295)

[0121] ...

[0122] Therefore, the electronic device can traverse the result segment of the call chain, and if it determines that it contains "at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:295)", that is, the event dispatch function mentioned above, the electronic device can determine that the interaction event is a real interaction event.

[0123] Step 202b: If the function call stack information does not contain the event dispatch function, the electronic device determines that the interaction event is a simulated interaction event.

[0124] In some embodiments of this application, since simulated interactive events can exist directly in the application layer and do not require processing at the framework layer, the function call stack information corresponding to a simulated interactive event will not include the event dispatch function.

[0125] For example, suppose the call chain result excerpt in the function call stack information obtained by the electronic device in the advertisement view is as follows:

[0126] java.lang.Exception: Call Stack

[0127] at com.morefunction.myapplication.MainActivity$2.onTouch(MainActivity.java:75)

[0128] at android.view.View.dispatchTouchEvent(View.java:15257)

[0129] at android.widget.TextView.dispatchTouchEvent(TextView.java:11725)

[0130] ...

[0131] Therefore, the electronic device can traverse the result segment of the call chain, and if it determines that it does not contain "at android.view.InputEventReceiver.dispatchInputEvent()", that is, the aforementioned event dispatch function, the electronic device can determine that the interaction event is a simulated interaction event.

[0132] In this embodiment, since the operation performed by the electronic device in response to a real interactive event is different from the operation performed by the electronic device in response to a simulated event, and the function call stack information can be used to characterize the function call record of the electronic device in response to the interactive event, that is, the function call stack information corresponding to the two interactive events is different, the electronic device can identify the type of interactive event through the fundamental difference in the function call process, that is, whether it involves an event dispatch function that transmits event information of the interactive event in the framework layer and the application layer, thereby improving the accuracy of the electronic device in identifying simulated interactive events.

[0133] In the interactive event recognition method provided in this application embodiment, upon detecting an interactive event, the function call stack information of the interactive event is obtained. This function call stack information is used to characterize the function call records of the electronic device responding to the interactive event. Based on the function call stack information and the event dispatch function, it is determined whether the interactive event is a simulated interactive event. The event dispatch function is used to transmit the event information of the interactive event from the framework layer of the electronic device to the application layer. In this solution, since the operation performed by the electronic device in response to a real interactive event is different from the operation performed by the electronic device in response to a simulated event, and the function call stack information can be used to characterize the function call records of the electronic device in response to the interactive event, that is, the function call stack information corresponding to the two types of interactive events is different, the electronic device can identify the type of interactive event through the fundamental difference in the function call process, namely whether it involves an event dispatch function that transmits the event information of the interactive event between the framework layer and the application layer. At the same time, when the electronic device detects a single interactive event, it can directly determine whether the single interactive event is a real interactive event or a simulated interactive event, without needing to obtain a large amount of interactive event data and perform unified data analysis. Thus, the accuracy and convenience of the electronic device in recognizing simulated interactive events can be improved.

[0134] In some embodiments of this application, after the electronic device determines whether an interaction event is a real interaction event or a simulated interaction event, the electronic device can adopt a relatively conservative approach based on the determination result, and then process the illegal result after reporting the interaction event to the cloud.

[0135] For example, an advertising display scenario can be used as an illustration. Electronic devices can report interactive events to the cloud before processing illegal results, and combine this with other cloud-based risk control features to make cloud-based decisions, comprehensively processing the click data reported by an advertising media in a unified manner.

[0136] It should be noted that the above cloud-based decision-making method is applicable when the implementation of a plan is carried out conservatively in the early stages.

[0137] In some embodiments of this application, after the electronic device determines whether an interaction event is a real interaction event or a simulated interaction event, the electronic device can adopt a relatively aggressive approach based on the determination result, so as to directly discard the events identified as simulated clicks. That is, in the process of counting the number of interaction events, the number of real interaction events is counted and the number of simulated interaction events is discarded.

[0138] For example, consider an advertising display scenario. Electronic devices may not count the number of simulated interaction events; that is, during the subsequent advertising settlement process, no corresponding advertising settlement will be performed for the simulated interaction events.

[0139] It should be noted that the above-mentioned equipment-side decision-making method is applicable after the accuracy of the solution has been highly recognized.

[0140] This application provides an interactive event recognition method. Figure 4 A flowchart of an interactive event recognition method provided in an embodiment of this application is shown. Figure 4 As shown, the interactive event recognition method provided in this application embodiment may include the following steps 501 to 508.

[0141] Step 501: The electronic device overrides the dispatchTouchEvent(MotionEvent event) method;

[0142] Step 502: When the electronic device detects an interaction event, intercept the interaction event using the dispatchTouchEvent method;

[0143] Step 503: The electronic device obtains the function call stack information of the current thread corresponding to the interactive event through the Thread.currentThread().getStackTrace() method;

[0144] Step 504: The electronic device filters the function call stack information, removes preset system functions that are unrelated to the interactive event dispatch logic, and obtains cleaned stack information;

[0145] Step 505: The electronic device traverses the cleaned function call stack information and determines whether the function call stack information of the Android system framework layer includes an event dispatch function, i.e., android.view.InputEventReceiver.dispatchInputEvent;

[0146] Step 506: If the function call stack information contains the event dispatch function, the electronic device determines that the interaction event is a real interaction event;

[0147] Step 507: If the function call stack information does not contain the event dispatch function, the electronic device determines that the interaction event is a simulated interaction event;

[0148] Step 508: The electronic device responds to the interaction event through the View corresponding to the interaction event in the front-end application UI.

[0149] Thus, since the operations performed by an electronic device in response to real interactive events differ from those in response to simulated events, and function call stack information can be used to characterize the function call records of the electronic device in response to interactive events—that is, the function call stack information corresponding to the two types of interactive events is different—the electronic device can identify the type of interactive event by the fundamental difference in the function call process, namely whether it involves an event dispatch function that transmits event information between the framework layer and the application layer. Furthermore, when detecting a single interactive event, the electronic device can directly determine whether that single interactive event is a real or simulated interactive event, without needing to acquire a large amount of interactive event data and perform unified data analysis. This improves the accuracy and convenience of the electronic device in identifying simulated interactive events.

[0150] In light of the various scenarios in which the embodiments of this application can be applied, and in conjunction with the various implementation schemes of the embodiments of this application described above, specific examples are given below. Taking the advertising display scenario as an example, the specific implementation process of the embodiments of this application is illustrated. A mobile phone is used as an example for illustration.

[0151] like Figure 5As shown, a user's mobile phone may include an advertising media app, which may have an embedded advertising network SDK to provide advertising content to the user. While the user is viewing the advertising media app, if the phone detects an interaction event, such as an ad click event, the advertising network can intercept the ad click event, for example, using the dispatchTouchEvent method, and obtain the function call stack information of the current thread corresponding to the ad click event, such as using the Thread.currentThread().getStackTrace() method.

[0152] Then, the ad network can clean the obtained function call stack information, remove preset system functions that are unrelated to the interactive event dispatch logic, and obtain cleaned stack information. Then, the ad network can traverse the cleaned function call stack information to determine whether there is an event dispatch function of the Android system framework layer in the function call stack information.

[0153] Specifically, if an event dispatch function exists in the function call stack information, the ad network can determine the interaction event as a real click, i.e., a click manually triggered by the user; if no event dispatch function exists in the function call stack information, the ad network can determine the interaction event as a simulated interaction event, i.e., a simulated click performed through technical means such as scripts or system commands.

[0154] It should be noted that the above-described method embodiments, or the various possible implementations of the method embodiments, can be executed individually, or, provided there are no contradictions, they can be combined with each other. The specific implementation can be determined according to actual usage requirements, and this application embodiment does not impose any restrictions on this.

[0155] It should be noted that the interactive event recognition method provided in this application can be executed by an interactive event recognition device. This application uses an interactive event recognition device executing the interactive event recognition method as an example to illustrate the interactive event recognition device provided in this application.

[0156] Figure 6 A schematic diagram of a possible structure of the interactive event recognition device involved in an embodiment of this application is shown. For example... Figure 6 As shown, the interactive event recognition device 70 may include: an acquisition module 71 and a determination module 72;

[0157] The acquisition module 71 is used to acquire the function call stack information of the interaction event when an interaction event is detected. The function call stack information is used to characterize the function call record of the electronic device in response to the interaction event.

[0158] The determination module 72 is used to determine whether an interactive event is a simulated interactive event based on the function call stack information and event dispatch function obtained by the acquisition module 71. The event dispatch function is used to transmit the event information of the interactive event from the framework layer of the electronic device to the application layer.

[0159] In one possible implementation, the determining module 72 is specifically used to determine that the interactive event is a real interactive event when the function call stack information contains an event dispatch function; or, when the function call stack information does not contain an event dispatch function, to determine that the interactive event is a simulated interactive event.

[0160] In one possible implementation, the interactive event recognition device 70 provided in this application embodiment may further include: an interception module; the interception module is used to intercept the interactive event when the application layer of the electronic device detects the interactive event; the aforementioned acquisition module 71 is specifically used to call a first function at the application layer to acquire the function call stack information of the interactive event, the first function being used to acquire the execution path information of the thread corresponding to the interactive event.

[0161] In one possible implementation, the interactive event recognition device 70 provided in this application embodiment may further include: a cleanup module and a detection module; the cleanup module is used to clean up the preset system functions included in the function call stack information based on a preset system function list after obtaining the function call stack information of the interactive event, so as to obtain the cleaned function stack information; the detection module is used to detect whether the cleaned function call stack information contains an event dispatch function; wherein, the preset system function list contains at least one preset system function, and the preset system function includes system internal functions that are unrelated to the interactive event.

[0162] In one possible implementation, the aforementioned interactive event is a user's click event on the screen of an electronic device. The interactive event recognition device 70 provided in this application embodiment may further include: a processing module, a reading module, and a transmission module. The processing module is used to write the click event into an input device node file through the kernel layer of the electronic device when a click event is detected on the screen of the electronic device. The reading module is used to read the input device node file through the framework layer of the electronic device and process the click event based on the input device node file. The transmission module is used to transmit the processed click event to the application layer of the electronic device through an event dispatch function. The aforementioned acquisition module 71 is specifically used to acquire the function call stack information of the click event in the framework layer through the application layer of the electronic device.

[0163] In the interactive event recognition device provided in this application embodiment, since the operation performed by the interactive event recognition device in response to a real interactive event is different from the operation performed by the interactive event recognition device in response to a simulated event, and the function call stack information can be used to characterize the function call record of the interactive event recognition device in response to the interactive event, that is, the function call stack information corresponding to the two types of interactive events is different, the interactive event recognition device can identify the type of interactive event by the fundamental difference in the function call process, namely whether it involves an event dispatch function that transmits event information of the interactive event at the framework layer and the application layer. At the same time, when detecting a single interactive event, the interactive event recognition device can directly determine whether the single interactive event is a real interactive event or a simulated interactive event, without needing to acquire a large amount of interactive event data and perform unified data analysis. Thus, the accuracy and convenience of the interactive event recognition device in identifying simulated interactive events can be improved.

[0164] The interactive event recognition device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0165] The interactive event recognition device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0166] The interactive event recognition device provided in this application embodiment can implement the various processes implemented in the above method embodiment, and will not be described again here to avoid repetition.

[0167] Optionally, such asFigure 7 As shown, this application embodiment also provides an electronic device 90, including a processor 91 and a memory 92. The memory 92 stores a program or instructions that can run on the processor 91. When the program or instructions are executed by the processor 91, they implement the various steps of the above-described interactive event recognition method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0168] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0169] Figure 8 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0170] The electronic device 100 includes, but is not limited to, components such as: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, and processor 110.

[0171] Those skilled in the art will understand that the electronic device 100 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 110 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0172] The processor 110 is configured to, upon detecting an interactive event, acquire function call stack information of the interactive event, which is used to characterize the function call record of the electronic device in response to the interactive event; and, based on the function call stack information and the event dispatch function, determine whether the interactive event is a simulated interactive event, which is used to transmit the event information of the interactive event from the framework layer of the electronic device to the application layer.

[0173] Optionally, the processor 110 is specifically configured to determine that the interactive event is a real interactive event if the function call stack information contains an event dispatch function; or, if the function call stack information does not contain an event dispatch function, determine that the interactive event is a simulated interactive event.

[0174] Optionally, the processor 110 is specifically configured to intercept the interaction event when the interaction event is detected at the application layer of the electronic device; and to call a first function at the application layer to obtain the function call stack information of the interaction event, wherein the first function is used to obtain the execution path information of the thread corresponding to the interaction event.

[0175] Optionally, the processor 110 is further configured to, after obtaining the function call stack information of the interactive event, clean up the preset system functions contained in the function call stack information based on a preset system function list to obtain cleaned function stack information; and detect whether the cleaned function call stack information contains an event dispatch function; wherein the preset system function list contains at least one preset system function, and the preset system function includes system internal functions that are unrelated to the interactive event.

[0176] Optionally, the aforementioned interaction event is a user's click event on the screen of the electronic device; the processor 110 is specifically configured to, when a click event is detected on the screen of the electronic device, write the click event to an input device node file through the kernel layer of the electronic device; read the input device node file through the framework layer of the electronic device and process the click event based on the input device node file; transmit the processed click event to the application layer of the electronic device through an event dispatch function; and obtain the function call stack information of the click event in the framework layer through the application layer of the electronic device.

[0177] In the electronic device provided in this application embodiment, since the operations performed by the electronic device in response to real interactive events differ from those performed in response to simulated events, and function call stack information can be used to characterize the function call records of the electronic device in response to interactive events, i.e., the function call stack information corresponding to the two types of interactive events is different, the electronic device can identify the type of interactive event through the fundamental difference in the function call process, namely whether it involves an event dispatch function that transmits event information of the interactive event at the framework layer and the application layer. Simultaneously, when the electronic device detects a single interactive event, it can directly determine whether the single interactive event is a real interactive event or a simulated interactive event, without needing to acquire a large amount of interactive event data and perform unified data analysis. This improves the accuracy and convenience of the electronic device in identifying simulated interactive events.

[0178] The electronic device provided in this application embodiment can implement the various processes implemented in the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0179] For details on the beneficial effects of the various implementation methods in this embodiment, please refer to the beneficial effects of the corresponding implementation methods in the above method embodiments. To avoid repetition, these will not be repeated here.

[0180] It should be understood that, in this embodiment, the input unit 104 may include a graphics processing unit (GPU) 1041 and a microphone 1042. The GPU 1041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 107 includes at least one of a touch panel 1071 and other input devices 1072. The touch panel 1071 is also called a touch screen. The touch panel 1071 may include a touch detection device and a touch controller. Other input devices 1072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0181] The memory 109 can be used to store software programs and various data. The memory 109 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 109 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 109 in the embodiments of this application includes, but is not limited to, these and any other suitable types of memory.

[0182] Processor 110 may include one or more processing units; optionally, processor 110 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into processor 110.

[0183] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0184] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0185] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0186] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0187] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above method embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.

[0188] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

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

[0190] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An interactive event recognition method, characterized in that, Performed by an electronic device, the method includes: Upon detecting an interaction event, the function call stack information of the interaction event is obtained, and the function call stack information is used to characterize the function call records of the electronic device in response to the interaction event; Based on the function call stack information and the event dispatch function, it is determined whether the interaction event is a simulated interaction event. The event dispatch function is used to transmit the event information of the interaction event from the framework layer of the electronic device to the application layer.

2. The method according to claim 1, characterized in that, The step of determining whether the interaction event is a simulated interaction event based on the function call stack information and the event dispatch function includes: If the function call stack information contains the event dispatch function, the interaction event is determined to be a genuine interaction event; or, If the function call stack information does not contain the event dispatch function, the interaction event is determined to be a simulated interaction event.

3. The method according to claim 1, characterized in that, The step of obtaining the function call stack information of the interaction event upon detection includes: If an interaction event is detected at the application layer of the electronic device, the interaction event is intercepted; The application layer calls a first function to obtain the function call stack information of the interaction event. The first function is used to obtain the execution path information of the thread corresponding to the interaction event.

4. The method according to claim 1, characterized in that, After obtaining the function call stack information of the interaction event, the method further includes: Based on a preset system function list, the preset system functions contained in the function call stack information are cleaned up to obtain cleaned function stack information; Check whether the cleaned function call stack information contains the event dispatch function; The preset system function list includes at least one preset system function, which includes internal system functions that are unrelated to the interactive event.

5. The method according to claim 1 or 2, characterized in that, The interaction event is a user's click event on the screen of the electronic device; The step of obtaining the function call stack information of the interaction event upon detection includes: When the click event is detected on the screen of the electronic device, the click event is written to the input device node file through the kernel layer of the electronic device; The electronic device's framework layer reads the input device node file and processes the click event based on the input device node file. The processed click event is transmitted to the application layer of the electronic device through the event dispatch function. The function call stack information of the click event at the framework layer is obtained through the application layer of the electronic device.

6. An interactive event recognition device, characterized in that, The interactive event recognition device includes: an acquisition module and a determination module; The acquisition module is used to acquire the function call stack information of the interaction event when an interaction event is detected. The function call stack information is used to characterize the function call record of the electronic device in response to the interaction event. The determining module is used to determine whether the interaction event is a simulated interaction event based on the function call stack information and event dispatch function obtained by the obtaining module. The event dispatch function is used to transmit the event information of the interaction event from the framework layer of the electronic device to the application layer.

7. The apparatus according to claim 6, characterized in that, The determining module is specifically used to determine that the interaction event is a real interaction event when the function call stack information contains the event dispatch function; or to determine that the interaction event is a simulated interaction event when the function call stack information does not contain the event dispatch function.

8. The apparatus according to claim 6, characterized in that, The interactive event recognition device further includes: an interception module; The interception module is used to intercept the interaction event when the application layer of the electronic device detects the interaction event; The acquisition module is specifically used to call a first function at the application layer to acquire the function call stack information of the interaction event. The first function is used to acquire the execution path information of the thread corresponding to the interaction event.

9. The apparatus according to claim 6, characterized in that, The interactive event recognition device further includes: a cleaning module and a detection module; The cleanup module is used to clean up the preset system functions contained in the function call stack information based on a preset system function list after obtaining the function call stack information of the interaction event, so as to obtain the cleaned function stack information. The detection module is used to detect whether the cleaned function call stack information contains the event dispatch function; The preset system function list includes at least one preset system function, which includes internal system functions that are unrelated to the interactive event.

10. The apparatus according to claim 6 or 7, characterized in that, The interaction event is a user's click event on the screen of the electronic device; The interactive event recognition device includes: a processing module, a reading module, and a transmission module; The processing module is configured to, when the click event is detected on the screen of the electronic device, write the click event into the input device node file through the kernel layer of the electronic device; The reading module is used to read the input device node file through the frame layer of the electronic device, and process the click event based on the input device node file; The transmission module is used to transmit the processed click event to the application layer of the electronic device through the event dispatch function; The acquisition module is specifically used to acquire the function call stack information of the click event in the framework layer through the application layer of the electronic device.