An event processing method, device, medium and program product
By extracting static and dynamic attribute information from the front-end application and combining it with multi-dimensional verification event matching rules, the problem of inaccurate event recognition and high maintenance costs in existing technologies is solved, achieving efficient and reliable business event recognition and management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
- Filing Date
- 2026-04-10
- Publication Date
- 2026-07-10
AI Technical Summary
In existing technologies, manual event tracking is slow, has high maintenance costs, and low flexibility, while full event tracking relies on the DOM structure after page rendering. UI iterations cause the original selection rules to become invalid, resulting in low accuracy and an inability to accurately determine business events.
By extracting static and dynamic attribute information from the front-end application, interactive data is generated, and business events are determined based on preset event matching rules. Multi-dimensional verification is performed by combining static and dynamic attributes to avoid event recognition errors caused by changes in a single attribute.
It improves the accuracy and reliability of event handling, increases the identification coverage of business events, reduces missed detections and false alarms, lowers development and maintenance costs, and enhances the system's resistance to iteration.
Smart Images

Figure CN122364037A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an event processing method, device, medium, and program product. Background Technology
[0002] Front-end data collection is the foundation of user behavior analysis, and accurately identifying the business events corresponding to user behavior is key to data collection. Existing front-end data collection solutions are divided into full-event tracking and manual event tracking. Manual event tracking requires developers to explicitly call the SDK (Software Development Kit) interface in the code of the business events to be tracked to report predefined events; however, since the event logic is hard-coded in the business code, any adjustment requires developers to rewrite it, resulting in slow response, high maintenance costs, and low flexibility. Full-event tracking listens globally for page click events, and the SDK automatically collects and reports global data such as element position and path; during data analysis, data is bound to business events through manual visual selection on the analysis platform; however, full-event tracking heavily relies on the DOM (Document Object Model) structure after page rendering, and UI (User Interface) iterations can cause the original selection rules to become invalid, and the accuracy is low, making it impossible to accurately determine the actual business events that have occurred. Summary of the Invention
[0003] In view of this, the purpose of this invention is to provide an event processing method, device, medium, and program product that can improve the accuracy and reliability of event processing and increase the identification coverage of business events. The specific solution is as follows: Firstly, this application discloses an event handling method, including: During the operation of the front-end application, in response to the user's interaction event triggered based on the target interface element, the static attribute information corresponding to the interaction event is obtained; the static attribute information is attribute information pre-injected into the front-end application and used to characterize the user's behavioral intent; The dynamic attribute information corresponding to the interactive event is determined based on the target interface element; the dynamic attribute information is used to characterize the runtime context information of the user's actual operation; Interactive data is generated based on the dynamic and static attribute information; The interaction data is matched according to a preset event matching rule to determine the business event corresponding to the interaction data; the business event is a predefined user behavior event described using business language.
[0004] Optionally, before obtaining the static attribute information corresponding to the interaction event triggered by the user based on the target interface element during the operation of the front-end application, the method further includes: During the compilation phase, static attribute information representing user behavior intent is extracted from the front-end application code by analyzing the front-end application code; the static attribute information includes the event handling function corresponding to the target interface element and the path expression of the target interface element in the front-end business code; The static attribute information is written into the software development kit.
[0005] Optionally, the response to the user's interaction event triggered based on the target interface element includes: Listen to real-time interactive events on the front-end application using a software development kit, and determine the target interface element corresponding to the current interactive event; The dynamic attribute information includes the page URL corresponding to the interaction event, the text content contained in the target interface element, and the path expression of the target interface element in the document object model tree of the page.
[0006] Optionally, the step of matching the interaction data according to a preset event matching rule to determine the business event corresponding to the interaction data includes: The event matching rules are used to perform rule matching on the interactive data; the event matching rules are constructed based on different dynamic attribute information and different static attribute information according to different logical connections; Based on the matched rules and the mapping relationship between the rules and business events, the business event corresponding to the interaction data is determined.
[0007] Optionally, determining the business event corresponding to the interaction data includes: The interaction data is converted into a feature vector. Calculate the similarity between the feature vector and the event cluster, and determine the business event corresponding to the interaction data based on the most similar event cluster; the event cluster is obtained by clustering the feature vectors of historical interaction data.
[0008] Optionally, after determining the business event corresponding to the interaction data, the method further includes: If the interaction data corresponds to a business event, then the correspondence between the interaction data and the business event is constructed and uploaded to the data analysis platform simultaneously. If the interaction data does not correspond to a business event, the interaction data will be directly uploaded to the data analysis platform. The data analysis platform performs user behavior analysis based on the interaction data and data weights; wherein, the weight of interaction data containing business event information is higher than that of interaction data without business event information.
[0009] Optionally, the event handling method further includes: When there is a user interface iteration, the target interface elements in the original user interface and the new user interface are compared in terms of target dimensions; the target dimensions include one or more of the following: text, visual style, element position, context, and attribute information. Based on the similarity score of the target dimension, update the event matching rules associated with the target interface element, or generate rule update suggestions.
[0010] Secondly, this application discloses an electronic device, comprising: Memory, used to store computer programs; A processor for executing the computer program to implement the aforementioned event handling method.
[0011] Thirdly, this application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned event handling method.
[0012] Fourthly, this application discloses a computer program product, including a computer program that, when executed by a processor, implements the aforementioned event handling method.
[0013] In this application, during the operation of the front-end application, in response to an interaction event triggered by a user based on a target interface element, static attribute information corresponding to the interaction event is obtained. This static attribute information is pre-injected into the front-end application and is used to characterize the user's behavioral intent. Dynamic attribute information corresponding to the interaction event is determined based on the target interface element. This dynamic attribute information characterizes the runtime context information of the user's actual operation. Interaction data is generated based on the dynamic and static attribute information. The interaction data is matched according to a preset event matching rule to determine the business event corresponding to the interaction data. The business event is a predefined user behavior event described using business language. It is evident that by pre-obtaining static attribute information characterizing the user's behavioral intent from the front-end application code, this static attribute information does not change with the user's behavior. Simultaneously, dynamic attribute information characterizing the user's behavior, i.e., the runtime context information of the user's actual operation, is obtained. This dynamic data information reflects the user's interactive behavior. Furthermore, by determining the occurring business event based on both static and dynamic attribute information, and through comprehensive analysis of multi-dimensional attributes, the inability to identify events due to changes in a single attribute is avoided, improving the accuracy and reliability of event processing, increasing the identification coverage of business events, and reducing missed detections and false alarms of business events. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0015] Figure 1 A flowchart of an event handling method provided in this application; Figure 2 A flowchart illustrating a specific interactive data acquisition method provided in this application; Figure 3 A flowchart illustrating a specific business event determination method provided in this application; Figure 4 This application provides a structural diagram of an electronic device. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0017] In related technologies, full-event tracking involves globally monitoring page click events, with the SDK automatically collecting and reporting global data such as element position and path. During data analysis, data is manually selected and bound to business events through the analysis platform. For example, a user clicks on a target element in the data analysis platform as if operating a regular webpage, causing the system to automatically record the element's position and bind it as a business event. Subsequent clicks at the same position will be recognized as this event. However, full-event tracking heavily relies on the DOM structure after page rendering, and UI iterations can cause the original selection rules to become invalid, resulting in low accuracy. To overcome these technical problems, this application proposes an event processing method that can improve the accuracy and reliability of event processing, increase the recognition coverage of business events, and reduce missed detections and false alarms of business events.
[0018] This application discloses an event handling method, see [link to relevant documentation] Figure 1 As shown, the method may include the following steps: Step S11: During the operation of the front-end application, in response to the user's interaction event triggered based on the target interface element, obtain the static attribute information corresponding to the interaction event.
[0019] The aforementioned static attribute information is attribute information pre-injected into the front-end application and used to characterize the user's behavioral intent; that is, static attribute information extracted from the front-end application code that characterizes the user's behavioral intent, and this static attribute information does not change with user behavior. Target interface elements refer to visual components on the UI (User Interface) associated with this interaction time, such as selection buttons, sliders, icons, etc.
[0020] In a specific embodiment, before obtaining the static attribute information corresponding to the user's interaction event triggered by the target interface element during the front-end application's runtime, the method further includes: extracting static attribute information representing the user's behavioral intent from the front-end application code by analyzing the code during the compilation phase; the static attribute information includes the event handling function corresponding to the target interface element and the path expression of the target interface element in the front-end business code; and writing the static attribute information into the software development kit (SDK). In this embodiment, it is necessary to obtain the attributes related to user behavior in the application code during compilation in advance. Specifically, these attributes can be statically injected into the SDK during the front-end application's build and compilation phase using engineering methods (such as Babel plugins or Webpack loaders). These attributes directly correspond to the source code structure, do not change with the runtime environment, and provide stable and unchanging source code-level location information for events. For example... Figure 2 As shown, during the code packaging and build phase, the SDK automatically adds some additional attribute information to elements on the page (such as buttons and links), such as the event handling function corresponding to the target interface element, that is, the handling function bound to the element; and the path expression (cpath) of the target interface element in the front-end business code, that is, the custom element path identifier used to locate the element on the page; this information is marked by the developer in the code through comments, configuration or specific syntax, and is not affected by user operations.
[0021] Step S12: Determine the dynamic attribute information corresponding to the interactive event based on the target interface element; the dynamic attribute information is used to characterize the runtime context information of the user's actual operation.
[0022] In this embodiment, upon detecting user interaction events on the front-end application, such as click events (i.e., user interaction behavior on a webpage or mini-program interface), the behavior triggers a pre-defined processing function in the front-end code. At this time, dynamic attribute information representing user behavior related to the real-time interaction event is acquired. This dynamic attribute information represents the runtime context of the user's actual operation; that is, at the moment the user actually interacts, it is a set of dynamic information generated in real-time by the environment in which the front-end application is located, capable of completely describing the scenario of that operation.
[0023] In some embodiments, a software development kit (SDK) can be used to monitor real-time interactive events on the front-end application, determine the target interface element corresponding to the current interactive event, and then collect the corresponding dynamic attribute information based on that target interface element. That is, the software development kit (SDK) monitors real-time interactive events on the front-end application, and after detecting an interactive event, determines the target interface element involved in the current interaction, and then collects the dynamic attribute information corresponding to the target interface element.
[0024] The aforementioned dynamic attribute information includes, but is not limited to, the page URL corresponding to the interaction event, the text content contained in the target interface element, and the path expression of the target interface element in the page's document object model tree (DOM). It can be understood that dynamic attribute information refers to attribute information that can reflect user behavior at runtime, such as a set of attributes dynamically obtained during script execution in the user's browser or mini-program environment. This includes, but is not limited to: the page URL corresponding to the interaction event, such as pageUrl; the text content contained in the target interface element, i.e., the plain text content (innerText) that the user can actually see inside the element; and the path expression (XPath, XML Path Language) of the target interface element in the page's document object model tree (DOM). These attributes reflect the actual page state and rendering structure at the time the event occurs.
[0025] Step S13: Generate interactive data based on the dynamic attribute information and static attribute information.
[0026] After collecting the dynamic attributes, the dynamic attribute information and static attribute information related to the current interaction event are merged to obtain the interaction data of the current interaction event.
[0027] Understandably, in related technologies, the dimensions of data collection and event definition rely solely on unstable runtime dynamic properties, leading to widespread invalidation of selected rules after UI iterations, requiring reconfiguration and making historical data difficult to recover. Furthermore, in complex UI frameworks (such as React and Vue), full-tracking solutions struggle to accurately identify target elements. Because they rely entirely on the runtime DOM structure, they cannot effectively distinguish between business logic containers and invalid wrapper containers, nor can they identify pseudo-elements, making it easy to select incorrectly or fail to select any elements. In this application, however, a dual-validation mechanism is constructed by combining static and dynamic properties. When the page structure is restructured, such as adjusting module positions, the cpath remains stable as long as the core component logic remains unchanged. Even if the source code path changes, the handle function typically remains consistent, avoiding the problem of events failing to be recognized due to a single property change and enhancing the rule's resistance to iteration.
[0028] The interaction data acquisition process for a specific interactive event is as follows: 1. Compile-time data preparation stage. During front-end project construction, the source code is statically analyzed through plugins to extract cpath and handleFunction. These attributes are static business semantic identifiers embedded by the developer in the source code, which can be extracted by tools and stably used for element recognition at runtime, without relying on the volatile DOM structure or dynamic context. Then, the extracted cpath and handleFunction are injected into the SDK as static attributes. 2. Runtime data acquisition stage. When the user clicks on the target interface element (an event triggered by the user's actions such as mouse clicks or finger taps), the SDK is triggered to capture the interaction event. 3. The SDK obtains dynamic attributes such as pageUrl, innerText, and xpath in real time. Finally, the SDK merges the compile-time attributes and runtime attributes to assemble a standardized raw interaction data package. The complete data packet is then reported to the data collection and processing platform for business event analysis. This data consists of unprocessed interactive data directly reported by the front-end SDK, comprising both dynamic and static attributes, including but not limited to the following fields: pageUrl, innerTex, handleFunction, xpath, and cpath. In some embodiments, an enhanced software development kit is used, namely a front-end toolkit with dual capabilities of static attribute injection and dynamic attribute collection, which can automatically merge the two types of attributes and report structured click data.
[0029] By using static data derived from semantically clear source code information and dynamic attributes reflecting the actual execution environment as interactive data to determine the corresponding business time, the system enhances traceability by leveraging the structured features of compile-time information and achieves precise matching through runtime context, thereby significantly improving data quality and credibility, as well as data accuracy and interpretability.
[0030] Step S14: Perform matching processing on the interaction data according to the preset event matching rules to determine the business event corresponding to the interaction data; the business event is a predefined user behavior event described using business language.
[0031] Specifically, based on predefined event matching rules, the collected interaction data can be matched, identified, and transformed to generate custom business events that can be recognized by the business stakeholders. Alternatively, the vectors of historical interaction data can be clustered, with each cluster center representing a type of business event, and the names of the business events can be customized.
[0032] Specifically, this can be achieved using a cloud-based data collection and processing platform, which is a processing system located between the data collection and data analysis platforms to execute step S14 above. After matching the collected data according to rules, the data collection and processing platform determines the corresponding events with clear business meaning. These business events could be, for example, the recording button being clicked or the payment button being clicked. These business events are the data directly used by the subsequent data analysis platform. This allows for the automatic and accurate collection of user actions in applications such as web pages or apps, such as clicks, browsing, and submissions, and transforms these actions into structured events for subsequent analysis.
[0033] By having the data collection and processing platform uniformly execute the business event type determination operation, the decoupling of attribute collection and business event type determination is achieved. This abstracts event tracking management into a unified platform service, enabling centralized control and standardized governance of events, improving operational efficiency and system scalability. Furthermore, by building an independent data processing platform to achieve dynamic configuration of event definitions, the technical problems of high maintenance costs and poor resistance to iteration caused by excessive coupling between front-end event tracking and business code are solved, thereby enabling automatic and accurate statistics of user click events.
[0034] In some embodiments, determining the business event corresponding to the interaction data includes: performing rule matching on the interaction data using the event matching rules; the event matching rules are constructed based on different dynamic attribute information and different static attribute information according to different logical connections; and determining the business event corresponding to the interaction data according to the matched rules and the mapping relationship between the rules and business events. Specifically, for example... Figure 3 The flowchart illustrating the specific business event determination method shows that a rule base is obtained based on pre-built event matching rules. These rules can be derived by connecting dynamic and static attribute information using different logical connections (AND, OR). The data collection and processing platform loads, interprets, and executes the matching rules through a rule engine, mapping successfully matched interactive data to pre-defined business events. The rule engine and platform architecture provide a natural foundation for subsequent expansion of new event types, complex condition judgments, and automated processing, significantly improving the overall efficiency and robustness of the data operation system. Furthermore, updating the matching rules can synchronously cover both old and new versions, achieving a seamless transition of business dashboards.
[0035] The specific rule matching process is as follows: The rule engine receives interaction data, initiates the rule matching process, and performs matching using the rule library. The rule library contains multiple independent event matching rules, which are related by an "OR" relationship, supporting parallel matching. Each rule internally constructs a condition network based on attribute dimensions (i.e., pageUrl, innerTex, handleFunction, xpath, cpath), and different attributes support "AND / OR" logical combinations. That is, different attributes, under different attribute parameters, are connected according to different logics to obtain different rules. Furthermore, a mapping relationship between rules and business events is pre-built; if any rule is matched, the corresponding business event can be determined. Business events are structured user behavior events described in business language that can be directly used for analysis and decision-making.
[0036] In some embodiments, determining the business event corresponding to the interaction data includes: converting the interaction data into a feature vector, calculating the similarity between the feature vector and an event cluster, and determining the business event corresponding to the interaction data based on the most similar event cluster. The event cluster is obtained by clustering the feature vectors of historical interaction data. By vectorizing the attributes (i.e., pageUrl, innerTex, handleFunction, xpath, cpath) of the original click data, an event vector space is constructed, and automatic matching with known event clusters is achieved based on similarity calculation. The event cluster is obtained by clustering the feature vectors of historical interaction data. Determining the time type through clustering can transform precise rules into more fault-tolerant fuzzy matching, which can adapt to minor changes in elements and discover potential event patterns, thus promoting the intelligent development of data collection.
[0037] In summary, employing multi-dimensional attributes for multi-dimensional and cross-validation, particularly the combination of `handleFunction` and `cpath`, enables extremely precise location of target UI elements, avoiding mismatches. When iterating over page iterations, only the matching rules need to be adjusted on the data processing platform, without requiring front-end deployment. This results in rapid response and allows for data retrospective repair through rule adjustments, demonstrating high adaptability. Simultaneously, shifting event tracking management from the development side to the data operations side achieves code-free configuration management, significantly reducing the burden and communication costs for the development team and improving the overall efficiency of data operations. By filtering and processing rules in the cloud, the front-end only reports standardized raw interaction data, ensuring data standardization and consistency from the source.
[0038] As can be seen from the above, in this embodiment, during the operation of the front-end application, in response to an interaction event triggered by the user based on a target interface element, static attribute information corresponding to the interaction event is obtained; the static attribute information is attribute information pre-injected into the front-end application and used to characterize the user's behavioral intent; dynamic attribute information corresponding to the interaction event is determined based on the target interface element; the dynamic attribute information is used to characterize the runtime context information of the user's actual operation; interaction data is generated based on the dynamic attribute information and the static attribute information; the interaction data is matched according to a preset event matching rule to determine the business event corresponding to the interaction data; the business event is a predefined user behavior event described using business language. It is evident that by pre-obtaining static attribute information representing user behavioral intent from the front-end application code—which does not change with user behavior—and simultaneously acquiring dynamic attribute information representing user behavior, namely the runtime context information of the user's actual operations, this dynamic data information can reflect the user's interactive behavior. Furthermore, by determining the occurring business events based on both static and dynamic attribute information, and by conducting comprehensive analysis of multi-dimensional attributes, the system avoids situations where changes in a single attribute lead to unidentifiable events, thereby improving the accuracy and reliability of event processing, increasing the identification coverage of business events, and reducing missed detections and false alarms of business events.
[0039] In some embodiments, after determining the business event corresponding to the interaction data, the method further includes: if the interaction data has a corresponding business event, constructing a correspondence between the interaction data and the business event, and synchronously uploading it to the data analysis platform; if the interaction data does not have a corresponding business event, directly uploading the interaction data to the data analysis platform; the data analysis platform performs user behavior analysis based on the interaction data and data weights; wherein, the weight of interaction data with business event information is higher than that of interaction data without business event information. The determined business event is output to the data analysis platform, completing the end-to-end data transformation; the data analysis platform refers to a system that aggregates, analyzes, and visualizes processed user behavior data (i.e., structured event data) to support business decisions. If there is no business event matching the interaction data, it indicates that the current interaction data has low business significance, and therefore its subsequent impact on user behavior analysis is also low.
[0040] In some embodiments, the above event handling method further includes: when there is a user interface iteration, comparing the target interface elements in the original user interface and the new user interface in terms of target dimensions; the target dimensions include one or more of text, visual style, element position, context, and attribute information; and updating the event matching rules associated with the target interface elements based on the similarity score of the target dimensions, or generating rule update suggestions.
[0041] This method performs semantic-level comparisons of the UI before and after iterations. By identifying similarities in text, visual styles, element positions, context, and attribute information, it intelligently infers semantically consistent element components, thereby automatically generating or suggesting matching rules. Specifically, it can leverage a multimodal large-scale model for visual understanding for comparison. This method does not rely on code attributes and is suitable for scenarios where the code structure changes drastically but the visual and functional aspects remain continuous, providing a feasible path for automated rule maintenance. When UI redesigns / refactoring cause changes in the positions of the original target interface elements and DOM restructuring, rendering old rules invalid, the method identifies matching elements on the old and new interfaces. For example, if the similarity score exceeds a threshold, the first element in the original interface is considered to match the second element in the new interface, meaning the two elements belong to the same business function. This automatically migrates the old rules to the new elements or generates rule update suggestions, which are then manually reviewed before being updated.
[0042] Accordingly, embodiments of this application also disclose an event handling device, which includes: The static attribute information acquisition module is used to acquire static attribute information corresponding to the interaction event triggered by the user based on the target interface element during the operation of the front-end application; the static attribute information is attribute information pre-injected into the front-end application and used to characterize the user's behavioral intent. The dynamic attribute information acquisition module is used to determine the dynamic attribute information corresponding to the interactive event based on the target interface element; the dynamic attribute information is used to characterize the runtime context information of the user's actual operation. An interactive data generation module is used to generate interactive data based on the dynamic attribute information and static attribute information; The business event determination module is used to match the interaction data according to preset event matching rules in order to determine the business event corresponding to the interaction data; the business event is a predefined user behavior event described using business language.
[0043] As can be seen from the above, this embodiment obtains static attribute information representing user behavior intent from the front-end application code in advance. This type of static attribute information does not change with the user's behavior. At the same time, it obtains dynamic attribute information representing user behavior, namely the runtime context information of the user's actual operation. This type of dynamic data information can reflect the user's interactive behavior. Based on the static and dynamic attribute information, the occurrence of business events is determined. Based on the comprehensive analysis of multi-dimensional attributes, it avoids the failure to identify events due to changes in a single attribute, improves the accuracy and reliability of event processing, increases the identification coverage of business events, and reduces the missed detection and false alarm of business events.
[0044] In some specific embodiments, the event handling device may specifically include: The static attribute information extraction unit is used to extract static attribute information representing the user's behavioral intent from the front-end application code during the compilation stage before obtaining the static attribute information corresponding to the interaction event triggered by the user based on the target interface element during the front-end application's operation. The static attribute information includes the event handling function corresponding to the target interface element and the path expression of the target interface element in the front-end business code. The writing unit is used to write the static attribute information into the software development kit.
[0045] In some specific embodiments, the event handling device may specifically include: The listening unit is used to listen for real-time interactive events on the front-end application through the software development kit and determine the target interface element corresponding to the current interactive event. The dynamic attribute information includes the page URL corresponding to the interaction event, the text content contained in the target interface element, and the path expression of the target interface element in the document object model tree of the page.
[0046] In some specific embodiments, the business event determination module may specifically include: A rule matching unit is used to perform rule matching on the interactive data using the event matching rules; the event matching rules are constructed based on different dynamic attribute information and different static attribute information according to different logical connections; The business event determination unit is used to determine the business event corresponding to the interaction data based on the matched rules and the mapping relationship between the rules and business events.
[0047] In some specific embodiments, the business event determination module may specifically include: A conversion unit is used to convert the interactive data into a feature vector; The similarity calculation unit is used to calculate the similarity between the feature vector and the event cluster, and to determine the business event corresponding to the interaction data based on the most similar event cluster matched; the event cluster is obtained by clustering the feature vectors of historical interaction data.
[0048] In some specific embodiments, the event handling device may specifically include: The data uploading unit is used to, after determining the business event corresponding to the interaction data, construct the correspondence between the interaction data and the business event if the interaction data has a corresponding business event, and synchronously upload it to the data analysis platform; if the interaction data does not have a corresponding business event, directly upload the interaction data to the data analysis platform. The data analysis platform performs user behavior analysis based on the interaction data and data weights; wherein, the weight of interaction data containing business event information is higher than that of interaction data without business event information.
[0049] In some specific embodiments, the event handling device may specifically include: The comparison unit is used to compare target interface elements in the original user interface and the new user interface in terms of target dimensions when there is user interface iteration; the target dimensions include one or more of the following: text, visual style, element position, context, and attribute information. The rule update unit is used to update the event matching rules associated with the target interface element based on the similarity score of the target dimension, or to generate rule update suggestions.
[0050] Furthermore, this application also discloses an electronic device, see [link to relevant documentation]. Figure 4 As shown, the content in the figure should not be considered as any limitation on the scope of use of this application.
[0051] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the event handling method disclosed in any of the foregoing embodiments.
[0052] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0053] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon include operating system 221, computer program 222 and data 223 including rule base, etc., and the storage method can be temporary storage or permanent storage.
[0054] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. In addition to including computer programs capable of performing the event handling methods executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0055] Furthermore, this application also discloses a computer storage medium storing computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, they implement the event handling method steps disclosed in any of the foregoing embodiments.
[0056] Furthermore, embodiments of this application also disclose a computer program product, including a computer program that, when executed by a processor, implements the event handling method steps disclosed in any of the foregoing embodiments.
[0057] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0058] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0059] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 said element.
[0060] The above provides a detailed description of the event handling method, device, medium, and program product provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An event handling method, characterized in that, include: During the operation of the front-end application, in response to the user's interaction event triggered based on the target interface element, the static attribute information corresponding to the interaction event is obtained; The static attribute information is attribute information that is pre-injected into the front-end application and is used to characterize the user's behavioral intent; Determine the dynamic attribute information corresponding to the interactive event based on the target interface element; The dynamic attribute information is used to characterize the runtime context information of the user's actual operation; Interactive data is generated based on the dynamic and static attribute information; The interaction data is matched according to a preset event matching rule to determine the business event corresponding to the interaction data; the business event is a predefined user behavior event described using business language.
2. The event handling method according to claim 1, characterized in that, Before obtaining the static attribute information corresponding to the interaction event triggered by the user based on the target interface element during the operation of the front-end application, the method further includes: During the compilation phase, static attribute information representing user behavior intent is extracted from the front-end application code by analyzing the front-end application code; the static attribute information includes the event handling function corresponding to the target interface element and the path expression of the target interface element in the front-end business code; The static attribute information is written into the software development kit.
3. The event handling method according to claim 1, characterized in that, The response to the user's interaction event triggered based on the target interface element includes: Listen to real-time interactive events on the front-end application using a software development kit, and determine the target interface element corresponding to the current interactive event; The dynamic attribute information includes the page URL corresponding to the interaction event, the text content contained in the target interface element, and the path expression of the target interface element in the document object model tree of the page.
4. The event handling method according to claim 1, characterized in that, The step of matching the interaction data according to preset event matching rules to determine the business event corresponding to the interaction data includes: The event matching rules are used to perform rule matching on the interactive data; the event matching rules are constructed based on different dynamic attribute information and different static attribute information according to different logical connections; Based on the matched rules and the mapping relationship between the rules and business events, the business event corresponding to the interaction data is determined.
5. The event handling method according to claim 1, characterized in that, Determining the business event corresponding to the interaction data includes: The interaction data is converted into a feature vector. Calculate the similarity between the feature vector and the event cluster, and determine the business event corresponding to the interaction data based on the most similar event cluster; the event cluster is obtained by clustering the feature vectors of historical interaction data.
6. The event handling method according to claim 1, characterized in that, After determining the business event corresponding to the interaction data, the method further includes: If the interaction data corresponds to a business event, then the correspondence between the interaction data and the business event is constructed and uploaded to the data analysis platform simultaneously. If the interaction data does not correspond to a business event, the interaction data will be directly uploaded to the data analysis platform. The data analysis platform performs user behavior analysis based on the interaction data and data weights; wherein, the weight of interaction data containing business event information is higher than that of interaction data without business event information.
7. The event handling method according to any one of claims 1 to 6, characterized in that, Also includes: When there is a user interface iteration, the target interface elements in the original user interface and the new user interface are compared in terms of target dimensions; the target dimensions include one or more of the following: text, visual style, element position, context, and attribute information. Based on the similarity score of the target dimension, update the event matching rules associated with the target interface element, or generate rule update suggestions.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the event handling method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein the computer programs, when executed by a processor, implement the event handling method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the event handling method according to any one of claims 1 to 7.