Method and device for burying points in application program, electronic equipment and storage medium

By screenshotting and reporting the application's target page and view tree, automated point burial configuration is achieved, solving the problem of increasing workload caused by developers' manual point burial and difficulty in global coverage of points, and improving the accuracy and flexibility of point burial.

CN119597628APending Publication Date: 2025-03-11BEIJING JINGDONG YUANSHENG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411677763.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

During the application development stage, developers manually bury points in the application, resulting in an increase in the workload of developers, making it difficult to cover the buried points globally, and modifying the buried points after the application is launched and you need to wait for the next release.

Method used

By screenshotting and reporting the application's target page, the business demand side can locate the target components and configure the buried point location and events to automatically bury the points and reduce developer participation.

Benefits of technology

It reduces the work of developers manually adding buried points, improves the accuracy and globality of buried points, realizes real-time buried points and dynamic adjustments to the application, and improves the flexibility of buried points.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597628A_ABST
    Figure CN119597628A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a method and device for burying points in an application program, electronic equipment and a storage medium, and the method comprises the steps: carrying out the screenshot of a target page of the application program, and obtaining a screenshot page; the screenshot page and a view tree of the target page are reported to a service demand end, so that the service demand end positions the target component in the view tree of the target page by referring to the screenshot page, and a burying point position is obtained; acquiring burying point configuration data issued by the service demand end, wherein the burying point configuration data comprises a burying point position and a burying point event configured for the burying point position; and according to the point burying position and the point burying event, performing point burying on the target page to obtain a point burying page. In the embodiment of the invention, the business demand personnel of the business demand end can complete point burying through the visual screenshot and the view tree, the point burying is carried out after the application is online without the participation of developers, the point burying configuration is issued by the business demand end, the point burying adjustment can be carried out according to the business demand, the accuracy and comprehensiveness of the point burying are ensured, and the user experience is improved. And point burying is more flexible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of computer technology, and in particular, to a method, device, electronic device, and storage medium for embedding points in an application. Background Art

[0002] A cross-platform application development framework can take into account multiple platforms through a set of codes, helping to efficiently build full-platform applications. Tracking is a commonly used data collection method in websites or applications. It refers to the technology of attaching data collection program code to the functional program code at the operation node where data needs to be collected, and capturing, processing and sending user behaviors or events on the operation node. As more and more applications are developed through cross-platform application development frameworks, tracking has become an important part of business needs. For example: Tracking can collect and analyze user operation behaviors in the application to optimize the user experience; it can identify which functions are popular and which functions are used less frequently, so as to help the product team optimize the product; through tracking data, different versions of the application can also be compared and tested to find the best product iteration direction.

[0003] At present, for applications developed through a cross-platform application development framework, tracking points are mostly completed during the development phase. That is, during the application development phase, developers manually track points in the application. In the process of implementing the present invention, the inventors found that during the application development phase, the method of manually tracking points in the application by developers has at least the following problems:

[0004] 1. It increases the workload of developers and wastes development manpower. 2. The tracking points are local and it is difficult to cover the whole situation. 3. After the application is launched, if any tracking points are found to be missed or need to be modified, you can only wait for the next release of the application. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, electronic device and storage medium for tracking points in an application, which can reduce the workload of developers, ensure the accuracy and comprehensiveness of tracking points, and improve the flexibility of tracking points.

[0006] In a first aspect, an embodiment of the present invention provides a method for embedding points in an application, including:

[0007] Take a screenshot of the target page of the application to obtain the screenshot page;

[0008] Reporting the view tree of the screenshot page and the target page to the business demand end, so that the business demand end locates the target component in the view tree of the target page with reference to the screenshot page to obtain the embedding point location;

[0009] Acquire the burying point configuration data sent by the business demand end, wherein the burying point configuration data includes the burying point location and the burying point event configured for the burying point location;

[0010] The burying point is buried in the target page according to the burying point position and the burying point event configured for the burying point position to obtain a burying point page.

[0011] The above-mentioned tracking method can take a screenshot of the target page in an automated manner, and report the view tree of the screenshot page and the target page to the business demand side. Through the screenshot, the business demand personnel on the business demand side can intuitively see the user interface, so that the business demand personnel can quickly understand the page layout and the location of specific elements without in-depth understanding of the underlying code, and do not need to have advanced programming knowledge, which lowers the technical threshold; the view tree provides a detailed view of the page hierarchy, which helps business demand personnel see the organization and hierarchical relationship of each page component in the page, which can facilitate business demand personnel to carefully select each component that needs tracking, effectively supporting complex business scenarios and personalized data requirements; the view tree of the screenshot page and the target page is provided to the business demand personnel at the same time, which is easy to understand. The tracking configuration can be completed through visual screenshots and view trees, which lowers the operation threshold. The tracking is performed after the application is launched, and no longer requires the participation of developers. It reduces the manual work of adding tracking points for developers, saving a lot of development time and manpower; based on the view tree and page screenshots of the application, the target components can be systematically analyzed and located to achieve global and more comprehensive tracking coverage, that is, the tracking points can cover the entire link, ensuring that all important user behaviors in the application can be monitored and recorded, reducing the risk of missed tracking; the tracking point configuration is issued by business demand personnel, who can adjust the tracking points according to business needs, which not only reduces the burden on developers, but also makes the tracking point configuration more in line with actual business needs. Business demand personnel can quickly adjust the tracking point strategy based on market feedback and user behavior data, and flexibly respond to changes in business needs; by obtaining the tracking point configuration data issued by the business demand side, real-time tracking and dynamic adjustment of tracking points for the application can be achieved, avoiding the need to wait for the next application version to be released each time the tracking point is adjusted, ensuring that the tracking point data is more timely and effective, making the tracking point more flexible.

[0012] In a second aspect, an embodiment of the present invention provides a device for embedding points in an application, including:

[0013] A screenshot module is used to take a screenshot of the target page of the application to obtain a screenshot page;

[0014] A reporting module, used to report the view tree of the screenshot page and the target page to the business demand end, so that the business demand end locates the target component in the view tree of the target page with reference to the screenshot page to obtain the embedding point position;

[0015] An acquisition module, used to acquire the burying point configuration data sent by the business demand end, wherein the burying point configuration data includes the burying point location and the burying point event configured for the burying point location;

[0016] The burying point module is used to bury the point in the target page according to the burying point position and the burying point event configured for the burying point position to obtain the burying point page.

[0017] In a third aspect, an electronic device provided by an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for embedding points in an application as in any embodiment of the present invention is implemented.

[0018] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a method for embedding points in an application program as in any embodiment of the present invention is implemented.

[0019] The description of the second, third and fourth aspects of the embodiments of the present invention can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second, third and fourth aspects can refer to the beneficial effects analysis of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 It is a flowchart of a method for embedding points in an application program provided by an embodiment of the present invention;

[0022] Figure 2 is another flowchart of a method for embedding points in an application program provided by an embodiment of the present invention;

[0023] Figure 3a This is an example diagram of a view rendering mechanism under a cross-platform application development framework provided by an embodiment of the present invention;

[0024] Figure 3b is an example diagram of component locations provided by an embodiment of the present invention;

[0025] Figure 4 It is a structural schematic diagram of a device for embedding points in an application program provided by an embodiment of the present invention;

[0026] Figure 5 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] Figure 1 It is a flow chart of the method for embedding points in an application provided by an embodiment of the present invention. The method for embedding points in an application provided by an embodiment of the present invention is applicable to an application developed using a cross-platform application development framework, and the application can run on multiple platforms. The method for embedding points in an application can be executed by a device for embedding points in an application provided by an embodiment of the present invention, and the device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated into an electronic device, and the electronic device can be a mobile phone, a personal computer, a computer, etc., and an application developed using a cross-platform application development framework is installed in the electronic device. The following embodiment is described by taking the example of integrating a device for embedding points in an application into an electronic device, refer to Figure 1 The method of embedding points in an application program of this embodiment may include the following steps:

[0030] Step 101, taking a screenshot of a target page of an application to obtain a screenshot page.

[0031] The application in this embodiment can be any application developed using a cross-platform application development framework, and the application runs in an electronic device, and any platform or operating system that can support the operation of the application can be installed in the electronic device. For example, the application in this embodiment can be an e-commerce application, a social media application, an entertainment application, etc.

[0032] The target page can be a page that needs to be monitored, which can be defined by the business demand side. The business demand side can be the operation side or management side of the application or product. The business demand side can define the pages in the application that need to be focused on and optimized, that is, the target page, by analyzing multiple aspects such as operation goals, user needs, and market needs. The target page can be those pages in the application that are important for user behavior, testing, or analysis. These pages may be pages that users frequently visit, pages with key functions, or pages that require special attention and optimization in the application. For example, the target page can be a key business function page, a high-traffic page, a conversion path page, or a user interaction page. Key business function pages include login pages, registration pages, payment pages, product details pages, etc. High-traffic pages include home pages, search results pages, user personal home pages, etc. Conversion path pages include shopping carts, checkout, order confirmation pages, etc. User interaction pages include comment pages, feedback pages, etc.

[0033] For example, for an e-commerce application, the business demand side can identify the key paths of users in the application, such as registration, login, search, purchase, etc., and define the core pages in these paths as target pages; it can determine the key nodes of user conversion, such as the shopping cart page, checkout page, order completion page, etc., and define the pages corresponding to these key nodes as target pages; it can identify the pages that users visit and operate frequently, and define these pages as target pages; it can find the pain point pages of user experience and define the pain point pages as target pages.

[0034] Taking a screenshot of the target page of an application can be done manually or with automated tools. For example, after starting the application, you can manually navigate to the target page and manually capture the target page. Manual operation requires user cooperation, and you can give the user relevant instructions in advance and obtain the user's permission and cooperation. The relevant instructions can explain the data to be collected, the purpose of the data, and how to ensure the security of user data. Alternatively, after applying the embedding framework provided by the present invention, the user's navigation to a specific page can be automatically captured, thereby triggering the automatic screenshot function to capture the target page.

[0035] Step 102, reporting the view tree of the screenshot page and the target page to the business demand side, so that the business demand side can locate the target component in the view tree of the target page with reference to the screenshot page to obtain the embedding point location.

[0036] The screenshot page shows the application interface that the user sees at a specific moment. The view tree is a hierarchical diagram of the pages in the application, usually represented by text in a tree structure. In this tree structure, each node represents a component on the interface, such as buttons, text boxes, images, etc. The hierarchical relationship between nodes shows the nesting and layout of these components. You can use some built-in tools and debugging methods provided by the cross-platform application development framework to view and obtain the view tree of the target page, and report the view tree of the target page to the business demand side.

[0037] The way components are managed and constructed in a cross-platform application development framework is different from the way components are managed and constructed in a traditional application development framework. Traditional application development frameworks usually use the Document Object Model (DOM) of Hyper Text Markup Language (HTML) to create and manage pages. Each page element has an Identity Document (ID) attribute, which can be used to mark the page element. The cross-platform application development framework uses a declarative interface framework to build the user interface. The creation and configuration of components are completed through code declarations. The tree structure of components is constructed through the component tree in the code, emphasizing the configuration and nested relationship of components rather than directly defining them in static documents. This results in applications developed using a cross-platform application development framework not being able to use IDs to identify components like applications developed using a traditional application development framework.

[0038] However, tracking points also require component identification. By analyzing the view tree of the application page developed by the cross-platform application development framework, the "view position" or "path" of the component in the page can be obtained, and the "view position" or "path" of the component in the page is unique. Therefore, in this embodiment, the "view position" or "path" of the component in the page can be used as a component identifier for tracking points.

[0039] The target component is a specific component in the target page that is of particular interest to the business demand side, such as buttons, input boxes, links, etc. These components are usually key points of user interaction, or play an important role in business logic and user experience. The tracking point location can be the specific node path of the component located in the view tree. That is, in this embodiment, the specific node path of the component is used as the component identifier to mark the component that needs tracking. For example, the tracking point location can be the specific path of a button in the page structure.

[0040] The business demand side can view the screenshot page, identify the components that need tracking, and then find the component at the corresponding position in the view tree, that is, the target component, and record the specific node path of the target component in the view tree as the tracking location. For example, the business demand side can be designed to click on a specific element in the target page and highlight the corresponding node in the view tree structure, so as to quickly locate and select the element or component that needs to be configured with tracking.

[0041] Step 103, obtaining the burying point configuration data sent by the business demand end, where the burying point configuration data includes the burying point location and the burying point events configured for the burying point location.

[0042] The tracking location identifies the specific path or location of the component in the application page. The path or location indicates the specific page component that needs to monitor user behavior. There can be multiple tracking locations, that is, multiple components can be monitored. Tracking events can refer to specific behaviors or actions triggered by users in the application, such as clicks, scrolling, input, etc. These behaviors or actions need to be recorded for analysis. Multiple events may occur on a component. The tracking events configured for a component can be all events that may occur on the component or some events that may occur on the component. The business demand side can assemble information such as tracking locations and tracking events to obtain tracking configuration data. Tracking configuration data can be a configuration file or data set containing tracking locations and tracking events, which is used to indicate where tracking is required, as well as the information and events collected by tracking.

[0043] In addition, the tracking configuration data may also include other data, such as page ID, tracking name, element type, tracking type, tracking ID, etc. Page ID can be the name or identifier of the page, which is used to identify the specific page, that is, the user interaction behavior that needs to be monitored on this page. Tracking name is used to describe the name of the tracking point, which can be a string with business significance, which can help the operator or demand party quickly identify and understand what behavior is recorded by this tracking point, such as "add shopping cart". Element type is used to describe the type of page element or component monitored by the tracking point, such as button, image, text, etc. Tracking type can refer to the type of specific interactive behavior generated by the user on this page element, such as click, view, input, etc., to clearly record what kind of user behavior will trigger the tracking point. Tracking ID can be used to identify a tracking event, so that each tracking event has an ID, which is convenient for data analysis and tracking management.

[0044] Step 104, bury the point on the target page according to the burying point location and the burying point event configured for the burying point location to obtain the burying point page.

[0045] You can locate the components that need to be tracked according to the tracking location, that is, the target component, and then add the tracking logic according to the tracking event configuration. Specifically, you can use third-party analysis tools and software development kits (Software Development Kit, SDK) to track points. These third-party analysis tools and SDKs can provide rich tracking and data analysis functions to help fast integration and use; you can also use middleware or plug-ins to automatically track points; or, you can use the Aspect-Oriented Programming (AOP) framework to track points. These tracking methods can be selected according to actual needs. Using the AOP framework to track points, cross-cutting concerns can be separated, making the code more modular and maintainable. The following introduces the implementation process of tracking points using the AOP framework.

[0046] In one implementation, event monitoring code can be inserted into the event handling method of the tracking event. That is, you can use custom annotations to mark the event handling method that needs tracking, such as marking the event handling method with @Monitor Event, and use AOP to define pointcuts to match methods with @Monitor Event annotations. In the matching methods, insert AOP notifications to execute event monitoring code before, after, or around the method execution. Event monitoring code is used to capture and record various interactive behaviors of users in the application. These interactive behaviors can include clicks, input, scrolling, etc. The event monitoring code will record these behaviors and send them to the backend analysis service for analysis. Inserting event monitoring code in the event handling method can finely monitor specific business processing methods, which is suitable for complex business scenarios.

[0047] In another implementation, the event monitoring code can be inserted into the event listener of the embedded event. That is, the event listener can be registered for the target component, and the event monitoring code can be inserted into the event listener for the embedded event. The custom annotation @Monitor Event is used to identify the event processing method that needs to be embedded, and the aspect class is defined. The entry point and the notification corresponding to the entry point are defined in the aspect class. The entry point is the event processing method of the embedded event above. The notification defines the execution time of the event monitoring code of the embedded event relative to the event processing method of the embedded event. For example, the event monitoring code can be executed before or after the event processing method. This method does not require the modification of the original event processing method, does not invade the original business method, and the monitoring logic inside the listener is completely controlled by AOP, which is easy to maintain.

[0048] In this embodiment, an automated method can be used to take a screenshot of the target page, and the view tree of the screenshot page and the target page can be reported to the business demand side. Through the screenshot, the business demand personnel on the business demand side can intuitively see the user interface, so that the business demand personnel can quickly understand the page layout and the location of specific elements without in-depth understanding of the underlying code, and do not need to have advanced programming knowledge, which lowers the technical threshold; the view tree provides a detailed view of the page hierarchy, which helps business demand personnel see the organization and hierarchical relationship of each page component in the page, and can facilitate business demand personnel to carefully select each component that needs to be buried, effectively supporting complex business scenarios and personalized data requirements; the view tree of the screenshot page and the target page is provided to the business demand personnel at the same time, and the burial configuration can be completed through the visualized screenshots and view trees, which lowers the operation threshold. The burial is performed after the application is launched, and no longer requires the participation of developers, reducing It eliminates the need for developers to manually add tracking points, saving a lot of development time and manpower; based on the application's view tree and page screenshots, it can systematically analyze and locate target components to achieve global and more comprehensive tracking coverage, that is, the tracking points can cover the entire link, ensuring that all important user behaviors in the application can be monitored and recorded, reducing the risk of missed tracking; the tracking point configuration is issued by business demand personnel, who can adjust the tracking points according to business needs, which not only reduces the burden on developers, but also makes the tracking point configuration more in line with actual business needs. Business demand personnel can quickly adjust the tracking point strategy based on market feedback and user behavior data, and flexibly respond to changes in business needs; by obtaining the tracking point configuration data issued by the business demand side, real-time tracking and dynamic adjustment of tracking points for the application can be achieved, avoiding the need to wait for the next application version to be released each time the tracking point is adjusted, ensuring that the tracking point data is more timely and effective, making the tracking point more flexible.

[0049] The following further describes the method for embedding points in an application program provided by an embodiment of the present invention. Figure 2 As shown, the method of this embodiment includes:

[0050] Step 201, taking a screenshot of a target page of an application to obtain a screenshot page.

[0051] The application of this embodiment is developed using a cross-platform application development framework. The target page can be a page that needs to be monitored, which can be defined by the business demand side. Screenshots of the target page of the application can be achieved manually or with automated tools. For example, after starting the application, you can manually navigate to the target page and manually capture the target page. Alternatively, after applying the tracking framework provided by the present invention, the user's navigation to a specific page can be automatically captured, thereby triggering an automatic screenshot function to take a screenshot of the target page and obtain a screenshot page. The screenshot page shows the application interface that the user sees at a specific moment.

[0052] Step 202, reporting the view tree of the screenshot page and the target page to the business demand side, so that the business demand side can locate the target component in the view tree of the target page with reference to the screenshot page to obtain the tracking point location.

[0053] The view tree is a hierarchical view of the pages in the application, usually represented by a tree structure. You can use some built-in tools and debugging methods provided by the cross-platform application development framework to view and obtain the view tree of the target page, and report the view tree of the target page to the business demand side. Since tracking points require component identification, applications developed with a cross-platform application development framework cannot use IDs to identify components like applications developed with a traditional application development framework. By analyzing the view tree of the application page developed with a cross-platform application development framework, you can obtain the "view position" or "path" of the component in the page, and you can use the "view position" or "path" of the component in the page as a component identifier for tracking points.

[0054] The following describes the view rendering mechanism under the cross-platform application development framework mentioned in this embodiment to understand the page view tree. Figure 3a As shown in the figure, the page construction in this cross-platform application development framework depends on three trees, namely the component tree (Widget), the element tree (Element) and the rendering object tree (Render Object). These three trees play different roles in the interface rendering process. Among them:

[0055] The component tree is just a configuration that stores configuration information about view rendering. The root of the component tree is the Widget Row, which has two child nodes, namely Widget Image and Widget Column. The Widget Column node has two child nodes, both of which are Widget Text.

[0056] The element tree is generated after traversing the component tree and is used to support the page structure. The root of the element tree is the element row, which has two child nodes, namely the element image and the element column. The element column node has two child nodes, both of which are element contexts.

[0057] The render object tree is used to implement page layout and drawing. The root of the render object tree is the render object row (RenderObject Row), which has two child nodes, namely the render object image (Render Object Image) and the render object column (Render Object Column). The render object column has two child nodes, both of which are render object contexts (RenderObject Text).

[0058] The complete path identification can start from the target element or component, recursively upward to the root node, record the name and position index of each parent node, and thus obtain the location of the buried point. For example, Figure 3b As shown, the position of a component in the entire view tree can be expressed as: root page 0 / column 0 / container 0 / gesture detector component 0, that is, Root Page[0] / Column[0] / Container[0] / Gesture Detector[0].

[0059] Step 203, obtaining the burying point configuration data sent by the business demand end, where the burying point configuration data includes the burying point location and the burying point events configured for the burying point location.

[0060] The tracking location identifies the specific path or location of the component in the application page. The path or location indicates the specific page component that needs to monitor user behavior. Tracking events can refer to specific behaviors or actions triggered by users in the application, such as clicks, scrolling, input, etc. These behaviors or actions need to be recorded for analysis. The business demand side can assemble information such as tracking location and tracking events to obtain tracking configuration data. Tracking configuration data can also include other data, such as page ID, tracking name, element type, tracking type, tracking ID, etc.

[0061] Step 204, match the tracking point location with the view tree of the target page to determine the target component.

[0062] The tracking location is a path, which can be composed of multiple path identifiers, indicating the path from the root node to the target component. Each path identifier can be parsed, decomposed into each node level, and matched layer by layer until the specific target component is found. The target component is the component that needs tracking monitoring.

[0063] Step 205, register an event listener for the target component, and insert event monitoring code for the embedded event in the event listener.

[0064] An event listener is a function or method that is triggered when a specific event (i.e., a buried event, such as a click, slide, or long press) occurs on a target component. Custom logic can be added to the event listener to handle these events. In this embodiment, the custom logic is the event monitoring code. The event monitoring code is the code logic used to capture and record buried events. It usually collects detailed information about the event and sends this information to the analysis system.

[0065] Step 206, an event processing method for marking embedded events with custom annotations.

[0066] A custom annotation is a defined specific label or metadata used to mark a class, method, variable, etc. In this embodiment, an annotation for tracking events can be created, and the created annotation is applied to mark the event processing method that needs to be embedded.

[0067] Step 207, use the aspect-oriented programming framework to define the aspect class, and define the entry point and the notification corresponding to the entry point in the aspect class. The entry point is the event processing method of the embedded event, and the notification defines the execution timing of the event monitoring code of the embedded event relative to the event processing method of the embedded event.

[0068] Aspect-oriented programming framework is a programming paradigm that allows program behaviors to be added or modified dynamically without modifying business logic code by separating cross-cutting concerns. An aspect class is a class that contains pointcut definitions and notifications, defining where and how to apply additional behaviors. Pointcuts are specific points in program execution where additional behaviors can be inserted. Notifications are used to define the behaviors to be executed at pointcuts. Notification types include pre-notifications, post-notifications, and around-notifications. Event handling methods are functions or methods that respond to user interaction events, such as functions executed when a button is clicked.

[0069] Specifically, the event handling method of the embedded event is marked with a custom annotation. Here, when defining the entry point, the regular expression of the class name and method name can be used to match the event handling method of the embedded event to be captured. After the specified method is captured, the execution timing of the event monitoring code of the embedded event relative to the event handling method of the embedded event can be determined according to the definition of the notification. The execution timing can be the execution of the event monitoring code before or after the event handling method.

[0070] Step 208, load the tracking page, and use the event listener to monitor the real-time events on the target component of the tracking page.

[0071] After the target page is tracked, it is called a tracking page. The tracking page is used to record user interaction events. You can track and record specific events by loading the tracking page. There are still target components on the tracking page. After tracking, you can refresh or reload the target page to enter the tracking page. Real-time events can be events that come directly from user interaction and need to be processed immediately, such as clicks, slides, drags, etc.

[0072] For example, if the target component is a button, you can register a gesture listener for the button to listen for events such as click, double-click, and long press on the button.

[0073] Step 209, when the real-time event is a buried event, determine the development framework of the application program, and determine the event response chain of the real-time event under the development framework.

[0074] The event response chain is the path of an event from being triggered to being processed in the view hierarchy. The event response chain determines which component handles the event and the order of event processing. The development framework of the application in this embodiment is a cross-platform application development framework. The event response chain under the cross-platform application development framework propagates user operation events from bottom to top, that is, an event bubbling mechanism is adopted. The event will first be passed to the most specific (i.e., the lowest level) component, and then passed to its parent component until it reaches the root component.

[0075] Step 210, query the event response chain to determine the actual processing component of the real-time event.

[0076] After the real-time event is sent to the target component, the target component will call the event processing method. If the target component cannot process the real-time event, the event will be passed to its parent components in sequence until a component that can process the real-time event is found. That is, for an event that occurs on the target component, the actual processing component may be the target component or its parent component.

[0077] Step 211, intercepting the event processing method called by the actual processing component, and executing the intercepted event processing method and the event monitoring code of the real-time event according to the execution timing of the event monitoring code of the real-time event relative to the event processing method of the real-time event.

[0078] In this embodiment, the purpose of intercepting the event processing method is to add additional logic while executing the original event processing method, such as performing monitoring and recording operations before and after event processing, so as to achieve real-time event monitoring.

[0079] Step 212, obtaining the event monitoring result of the real-time event obtained by executing the event monitoring code.

[0080] Event monitoring results may include information such as the time when the event occurred and the duration of the event execution.

[0081] Step 213, obtain the business parameters corresponding to the real-time event, assemble the business parameters and the event monitoring results, and obtain the tracking point feedback data.

[0082] Business parameters are parameters or data related to specific business logic, which can help understand user behavior and business activities. These parameters can be obtained from the user operation context and need to be extracted in event processing. For example, in a shopping application, the event of clicking the "Buy" button may require business parameters such as product ID, user ID, purchase quantity, etc.

[0083] In some cases, the event itself and its basic information (such as timestamp, type, etc.) can be used to complete monitoring and analysis. In this case, the event monitoring results can be directly fed back to the business demand side. For example, for user page access events, if we only need to know which page the user visited, the time of the visit, and the page dwell time, there is no need for business parameters. We only need to feedback the monitored page ID, access time, dwell time, etc. For example, for application exception events, when an application exception occurs, we only need to know the type of exception, the time of occurrence, and possible stack information, etc., without the need for additional business parameters. We only need to feedback the monitored exception type, occurrence time, stack information, etc.

[0084] In other cases, the information from the event monitoring results themselves is not enough. We also need to know more about the context of the event in order to better analyze and understand user behavior, which requires business parameters. For example, for a purchase button click event in an e-commerce application, business parameters such as product ID, user ID, and product price may be needed to assist the business demand side in understanding which user purchased which product and conduct subsequent business analysis (such as user preferences and sales data analysis). For another example, for a post event in a social application, post ID, user ID, posting time, etc. may be needed to assist the business demand side in understanding what the user posted, so as to facilitate content recommendation and user behavior analysis.

[0085] Step 214, reporting the tracking point feedback data to the business demand side.

[0086] In this embodiment, an automated method can be used to take a screenshot of the target page, and the view tree of the screenshot page and the target page can be reported to the business demand side. Through the screenshot, the business demand personnel on the business demand side can intuitively see the user interface, so that the business demand personnel can quickly understand the page layout and the location of specific elements without in-depth understanding of the underlying code, and do not need to have advanced programming knowledge, which lowers the technical threshold; the view tree provides a detailed view of the page hierarchy, which helps business demand personnel see the organization and hierarchical relationship of each page component in the page, and can facilitate business demand personnel to carefully select each component that needs to be buried, effectively supporting complex business scenarios and personalized data requirements; the view tree of the screenshot page and the target page is provided to the business demand personnel at the same time, and the burial configuration can be completed through the visualized screenshots and view trees, which lowers the operation threshold. The burial is performed after the application is launched, and no longer requires the participation of developers, reducing It eliminates the need for developers to manually add tracking points, saving a lot of development time and manpower; based on the application's view tree and page screenshots, it can systematically analyze and locate target components to achieve global and more comprehensive tracking coverage, that is, the tracking points can cover the entire link, ensuring that all important user behaviors in the application can be monitored and recorded, reducing the risk of missed tracking; the tracking point configuration is issued by business demand personnel, who can adjust the tracking points according to business needs, which not only reduces the burden on developers, but also makes the tracking point configuration more in line with actual business needs. Business demand personnel can quickly adjust the tracking point strategy based on market feedback and user behavior data, and flexibly respond to changes in business needs; by obtaining the tracking point configuration data issued by the business demand side, real-time tracking and dynamic adjustment of tracking points for the application can be achieved, avoiding the need to wait for the next application version to be released each time the tracking point is adjusted, ensuring that the tracking point data is more timely and effective, making the tracking point more flexible.

[0087] In addition, this embodiment uses the view rendering mechanism of the cross-platform application development framework to locate components and track points. The tracking point logic can be written and maintained in one code base, so that a set of tracking point logic can be reused on multiple platforms or operating systems, solving the problem of repeated development and difficult maintenance in the traditional multi-platform independent development of tracking point logic.

[0088] Figure 4 is a schematic diagram of a structure of a device for embedding points in an application provided by an embodiment of the present invention, and the device is suitable for executing a method for embedding points in an application provided by an embodiment of the present invention, such as Figure 4 As shown, the device may specifically include:

[0089] A screenshot module 401 is used to take a screenshot of a target page of an application program to obtain a screenshot page;

[0090] The reporting module 402 is used to report the view tree of the screenshot page and the target page to the business demand end, so that the business demand end locates the target component in the view tree of the target page with reference to the screenshot page to obtain the embedding point position;

[0091] The acquisition module 403 is used to acquire the burying point configuration data sent by the business demand end, wherein the burying point configuration data includes the burying point location and the burying point event configured for the burying point location;

[0092] The burying point module 404 is used to bury the point in the target page according to the burying point position and the burying point event configured for the burying point position to obtain the burying point page.

[0093] In one embodiment, the burying point module 404 burying the point on the target page according to the burying point location and the burying point event configured for the burying point location includes:

[0094] Matching the embedding point location with the view tree of the target page to determine the target component;

[0095] Registering an event listener for the target component, and inserting event monitoring code for the embedded event in the event listener;

[0096] An event processing method for marking the embedded event with a custom annotation;

[0097] An aspect class is defined using an aspect-oriented programming framework, and entry points and notifications corresponding to the entry points are defined in the aspect class. The entry points are event processing methods for the embedded event, and the notifications define the execution timing of the event monitoring code for the embedded event relative to the event processing method for the embedded event.

[0098] In one embodiment, the device further comprises:

[0099] A monitoring module, used for loading the embedding page and using the event listener to monitor the real-time events on the target component of the embedding page;

[0100] An execution module is used to execute the event processing method and event monitoring code of the real-time event according to the execution timing of the event monitoring code of the real-time event relative to the event processing method of the real-time event when the real-time event belongs to the buried event.

[0101] In one embodiment, the execution module executes the event processing method and the event monitoring code of the real-time event according to the execution timing of the event monitoring code of the real-time event relative to the event processing method of the real-time event, including:

[0102] Determining an actual processing component of the real-time event;

[0103] The event processing method called by the actual processing component is intercepted, and the intercepted event processing method and the event monitoring code of the real-time event are executed according to the execution timing of the event monitoring code of the real-time event relative to the event processing method of the real-time event.

[0104] In one embodiment, the execution module determines the actual processing component of the real-time event, including:

[0105] Determine a development framework of the application, and determine an event response chain of the real-time event under the development framework;

[0106] The event response chain is queried to determine the actual processing component of the real-time event.

[0107] In one embodiment, the device further includes a feedback module, and the feedback module is specifically used to:

[0108] Obtaining an event monitoring result of the real-time event obtained by executing the event monitoring code;

[0109] Determine the tracking point feedback data according to the event monitoring result;

[0110] Report the tracking point feedback data to the business demand end.

[0111] In one embodiment, the feedback module determines the tracking point feedback data according to the event monitoring result, including:

[0112] Obtaining business parameters corresponding to the real-time event;

[0113] Assemble the business parameters and the event monitoring results to obtain the tracking point feedback data.

[0114] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0115] The device of this embodiment can take a screenshot of the target page in an automated manner, and report the view tree of the screenshot page and the target page to the business demand side. Through the screenshot, the business demand personnel on the business demand side can intuitively see the user interface, so that the business demand personnel can quickly understand the page layout and the location of specific elements without in-depth understanding of the underlying code, and do not need to have advanced programming knowledge, which lowers the technical threshold; the view tree provides a detailed view of the page hierarchy, which helps the business demand personnel to see the organization and hierarchical relationship of each page component in the page, and can facilitate the business demand personnel to carefully select each component that needs to be buried, effectively supporting complex business scenarios and personalized data requirements; the view tree of the screenshot page and the target page is provided to the business demand personnel at the same time, and the burial configuration can be completed through the visualized screenshots and view trees, which lowers the operation threshold. The burial is performed after the application is launched, and the developer participation is no longer required, which reduces Developers no longer have to manually add tracking points, saving a lot of development time and manpower. Based on the application's view tree and page screenshots, the target components can be systematically analyzed and located to achieve global and more comprehensive tracking coverage, that is, the tracking points can cover the entire link, ensuring that all important user behaviors in the application can be monitored and recorded, reducing the risk of missed tracking points. The tracking point configuration is issued by business demand personnel, who can adjust the tracking points according to business needs, which not only reduces the burden on developers, but also makes the tracking point configuration more in line with actual business needs. Business demand personnel can quickly adjust the tracking point strategy based on market feedback and user behavior data, and flexibly respond to changes in business needs. By obtaining the tracking point configuration data issued by the business demand side, real-time tracking and dynamic adjustment of tracking points for the application can be achieved, avoiding the need to wait for the next application version to be released each time the tracking point is adjusted, ensuring that the tracking point data is more timely and effective, making the tracking point more flexible.

[0116] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the method for embedding points in an application provided in any of the above embodiments is implemented.

[0117] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method for embedding points in an application provided in any of the above embodiments is implemented.

[0118] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of an electronic device suitable for implementing an embodiment of the present invention. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0119] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0120] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0121] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0122] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0123] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0124] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be provided in a processor, for example, may be described as: a processor including a screenshot module, a reporting module, an acquisition module, and a tracking module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.

[0125] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0126] Take a screenshot of the target page of the application to obtain a screenshot page; report the screenshot page and the view tree of the target page to the business demand side, so that the business demand side locates the target component in the view tree of the target page with reference to the screenshot page to obtain the burying point location; obtain the burying point configuration data sent by the business demand side, the burying point configuration data includes the burying point location and the burying point events configured for the burying point location; bury the point in the target page according to the burying point location and the burying point events configured for the burying point location to obtain the burying point page.

[0127] According to the technical solution of the embodiment of the present invention, a screenshot of the target page can be taken in an automated manner, and the view tree of the screenshot page and the target page can be reported to the business demand side. Through the screenshot, the business demand personnel on the business demand side can intuitively see the user interface, so that the business demand personnel can quickly understand the page layout and the location of specific elements without in-depth understanding of the underlying code, and do not need to have advanced programming knowledge, which lowers the technical threshold; the view tree provides a detailed view of the page hierarchy, which helps the business demand personnel to see the organization and hierarchical relationship of each page component in the page, which can facilitate the business demand personnel to carefully select each component that needs to be buried, effectively supporting complex business scenarios and personalized data requirements; the view tree of the screenshot page and the target page is provided to the business demand personnel at the same time, and the burial configuration can be completed through the visualized screenshots and view trees, which lowers the operation threshold, and the burial is carried out after the application is launched, and the participation of developers is no longer required. It reduces the manual work of adding tracking points for developers, saving a lot of development time and manpower; based on the view tree and page screenshots of the application, the target components can be systematically analyzed and located to achieve global and more comprehensive tracking coverage, that is, the tracking points can cover the entire link, ensuring that all important user behaviors in the application can be monitored and recorded, reducing the risk of missed tracking; the tracking point configuration is issued by business demand personnel, who can adjust the tracking points according to business needs, which not only reduces the burden on developers, but also makes the tracking point configuration more in line with actual business needs. Business demand personnel can quickly adjust the tracking point strategy based on market feedback and user behavior data, and flexibly respond to changes in business needs; by obtaining the tracking point configuration data issued by the business demand side, real-time tracking and dynamic adjustment of tracking points for the application can be achieved, avoiding the need to wait for the next application version to be released each time the tracking point is adjusted, ensuring that the tracking point data is more timely and effective, making the tracking point more flexible.

[0128] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0129] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0130] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for embedding points in an application, characterized in that: include: Take a screenshot of the target page of the application to obtain the screenshot page; Reporting the view tree of the screenshot page and the target page to the business demand end, so that the business demand end locates the target component in the view tree of the target page with reference to the screenshot page to obtain the embedding point location; Acquire the burying point configuration data sent by the business demand end, wherein the burying point configuration data includes the burying point location and the burying point event configured for the burying point location; The burying point is buried in the target page according to the burying point position and the burying point event configured for the burying point position to obtain a burying point page.

2. The method for embedding points in an application according to claim 1, characterized in that: The step of embedding the point on the target page according to the embedding point location and the embedding point event configured for the embedding point location includes: Matching the embedding point location with the view tree of the target page to determine the target component; Registering an event listener for the target component, and inserting event monitoring code for the embedded event in the event listener; An event processing method for marking the embedded event with a custom annotation; An aspect class is defined using an aspect-oriented programming framework, and entry points and notifications corresponding to the entry points are defined in the aspect class. The entry points are event processing methods for the embedded event, and the notifications define the execution timing of the event monitoring code for the embedded event relative to the event processing method for the embedded event.

3. The method for embedding points in an application according to claim 2, characterized in that: The method further comprises: Loading the embedding page, and using the event listener to listen to real-time events on the target component of the embedding page; When the real-time event belongs to the buried event, the event processing method and event monitoring code of the real-time event are executed according to the execution timing of the event monitoring code of the real-time event relative to the event processing method of the real-time event.

4. The method for embedding points in an application according to claim 3, characterized in that: The method of executing the event processing method and the event monitoring code of the real-time event according to the execution timing of the event monitoring code of the real-time event relative to the event processing method of the real-time event includes: Determining an actual processing component of the real-time event; The event processing method called by the actual processing component is intercepted, and the intercepted event processing method and the event monitoring code of the real-time event are executed according to the execution timing of the event monitoring code of the real-time event relative to the event processing method of the real-time event.

5. The method for embedding points in an application according to claim 4, characterized in that: The actual processing component of determining the real-time event includes: Determine a development framework of the application, and determine an event response chain of the real-time event under the development framework; The event response chain is queried to determine the actual processing component of the real-time event.

6. The method for embedding points in an application according to any one of claims 3 to 5, characterized in that: The method further comprises: Obtaining an event monitoring result of the real-time event obtained by executing the event monitoring code; Determine the tracking point feedback data according to the event monitoring result; Report the tracking point feedback data to the business demand end.

7. The method for embedding points in an application according to claim 6, characterized in that: The determining of the tracking point feedback data according to the event monitoring result includes: Obtaining business parameters corresponding to the real-time event; Assemble the business parameters and the event monitoring results to obtain the tracking point feedback data.

8. A device for embedding points in an application, characterized in that: include: A screenshot module is used to take a screenshot of the target page of the application to obtain a screenshot page; A reporting module, used to report the view tree of the screenshot page and the target page to the business demand end, so that the business demand end locates the target component in the view tree of the target page with reference to the screenshot page to obtain the embedding point position; An acquisition module, used to acquire the burying point configuration data sent by the business demand end, wherein the burying point configuration data includes the burying point location and the burying point event configured for the burying point location; The burying point module is used to bury the point in the target page according to the burying point position and the burying point event configured for the burying point position to obtain the burying point page.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, it implements the method for embedding points in an application as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for embedding points in an application program as described in any one of claims 1 to 7 is implemented.