A cross-platform page burying point method and device, electronic equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT DIGITAL (SHENZHEN) CO LTD
- Filing Date
- 2022-09-20
- Publication Date
- 2026-08-07
AI Technical Summary
当代码运行到某个生命周期过程,触发提前设置的钩子函数,就可以将配置文件中的埋点参数进行数据上报,但是由于同一业务可能涉及iOS、Android 、Web和Flutter等多种平台开发语言的终端设备,因此,需要重复的进行埋点处理,大幅度的提升了跨平台的页面埋点的成本
获取目标客户端中运行跨端开发框架的界面交互代码,其中,所述目标客户端为所述跨端开发框架支持的任意一种开发语言运行的终端设备;根据所述界面交互代码,生成抽象语法树,并且根据所述抽象语法树生成对应的抽象语法树页面;所述目标客户端触发页面埋点进程,并通过所述页面埋点进程为所述抽象语法树和所述目标客户端的应用程序建立关联关系;在所述应用程序的显示界面中选择需要埋点处理的元素;根据所述要埋点处理的元素,在所述抽象语法树页面中确定抽象语法树的节点;为所述抽象语法树的节点配置埋点指令和埋点参数;根据所述埋点指令和所述埋点参数,对所述需要埋点处理的元素进行埋点处理,并将所述埋点结果通过所述跨端开发框架的界面交互代码同步至不同开发语言的目标客户端中。由此,通过跨端开发框架的界面交互代码,同时对多种平台开发语言的页面进行埋点处理,减少了跨平台的页面埋点的人力成本和硬件成本,有利于自动化跨平台的页面埋点的大规模推广,同时利用埋点指令和埋点参数可以可视化地在页面环境中对埋点业务进行处理,降低了埋点处理的难度,有效提升用户的使用体验。
Smart Images

Figure CN117786259B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to cross-platform page tracking technology, and more particularly to a cross-platform page tracking method, apparatus, electronic device, and storage medium. Background Technology
[0002] In related technologies, non-intrusive data tracking solutions mainly involve setting various interception hook functions during the code's lifecycle and pre-configuring the data parameters for tracking reports. When the code reaches a certain lifecycle stage and triggers the pre-set hook function, the tracking parameters in the configuration file can be reported. However, since the same business may involve terminal devices using multiple platform development languages such as iOS, Android, Web, and Flutter, repeated tracking processing is required, significantly increasing the cost of cross-platform page tracking. Summary of the Invention
[0003] In view of this, embodiments of the present invention provide a cross-platform page tracking method, apparatus, electronic device, and storage medium. It can simultaneously perform tracking processing on pages developed in multiple platform languages through the interface interaction code of a cross-platform development framework, reducing the manpower and hardware costs of cross-platform page tracking. This is conducive to the large-scale promotion of automated cross-platform page tracking. At the same time, by using tracking instructions and tracking parameters, tracking business can be visually processed in the page environment, reducing the difficulty of tracking processing and effectively improving the user experience.
[0004] The technical solution of this invention is implemented as follows: This invention provides a cross-platform page tracking method, the method comprising: The information transmission module is used to acquire the interface interaction code of the cross-platform development framework running in the target client, wherein the target client is a terminal device running any development language supported by the cross-platform development framework; The information processing module is used to generate an abstract syntax tree based on the interface interaction code, and to generate a corresponding abstract syntax tree page based on the abstract syntax tree. The information processing module is used by the target client to trigger the page tracking process, and to establish a relationship between the abstract syntax tree and the application of the target client through the page tracking process. The information processing module is used to select the element that needs to be embedded in the display interface of the application. The information processing module is used to determine the nodes of the abstract syntax tree in the abstract syntax tree page according to the element to be processed. The information processing module is used to configure the node embedding instructions and embedding parameters for the nodes of the abstract syntax tree; The information processing module is used to perform tracking processing on the elements that need tracking processing according to the tracking instructions and the tracking parameters, and synchronize the tracking results to target clients with different programming languages through the interface interaction code of the cross-platform development framework.
[0005] This invention also provides a cross-platform page tracking device, the device comprising: The information transmission module is used to acquire the interface interaction code of the cross-platform development framework running in the target client, wherein the target client is a terminal device running any development language supported by the cross-platform development framework; The information processing module is used to generate an abstract syntax tree based on the interface interaction code, and to generate a corresponding abstract syntax tree page based on the abstract syntax tree. The information processing module is used by the target client to trigger the page tracking process, and to establish a relationship between the abstract syntax tree and the application of the target client through the page tracking process. The information processing module is used to select the element that needs to be embedded in the display interface of the application. The information processing module is used to determine the nodes of the abstract syntax tree in the abstract syntax tree page according to the element to be processed. The information processing module is used to configure the node embedding instructions and embedding parameters for the nodes of the abstract syntax tree; The information processing module is used to perform tracking processing on the elements that need tracking processing according to the tracking instructions and the tracking parameters, and synchronize the tracking results to target clients with different programming languages through the interface interaction code of the cross-platform development framework.
[0006] In the above scheme, The information processing module is used to determine the editing engine of the interface interaction code according to the type of the target client; The information processing module is used to edit the interface interaction code through the editing engine to obtain an abstract syntax tree of the restricted expressive editing language; The information processing module is used to render the nodes of the abstract syntax tree of the restricted expressive editing language through the editing engine to obtain a rendered node tree; The information processing module is used to perform layout rendering on the rendering node tree to obtain an abstract syntax tree page.
[0007] In the above scheme, the information processing module is used to configure a callback function for the application in response to the recording start instruction sent by the page tracking process; The information processing module is used to associate the display interface of the application with the corresponding node of the abstract syntax tree through the callback function. The information processing module is used by the page tracking process to receive the file update instruction sent by the target client; The information processing module is used to update the structure of the abstract syntax tree in response to the file update instruction, so as to establish an association between the abstract syntax tree and the application of the target client.
[0008] In the above solution, the information processing module is used to determine the type of tracking instruction according to the tracking business requirements, wherein the tracking instruction type includes: element click tracking and element exposure tracking; The information processing module is used to determine the business name and parameter value corresponding to each element in the display interface of the application through the abstract syntax tree. The information processing module is used to write the business name and parameter values into the tracking instruction class to obtain tracking parameters that match the business requirements.
[0009] In the above scheme, the information processing module is used to find the interface interaction code corresponding to the tracking instruction and the tracking parameters through the abstract syntax tree; The information processing module is used to modify the interface interaction code to obtain interface interaction code carrying the embedded information. The information processing module is used to send the interface interaction code carrying the embedded information to the cloud server.
[0010] In the above scheme, the information processing module is used to obtain a virtual test account for logging into the mini-program server when the page tracking process is used to test the mini-program process, and to present the virtual test account in the interactive interface of the page tracking. The information processing module is used to respond to the selection operation for the virtual test account, log in to the mini-program server based on each selected virtual test account, and display the mini-program window in the login state in the interactive interface. The information processing module is used to respond to a test request for the mini-program and display the debugging information output when the page tracking method is executed in the mini-program window.
[0011] In the above scheme, the information processing module is used to obtain the business data reported by the target business process through the triggering of the tracking point after the tracking point processing is completed. The information processing module is used to determine the reporting data source of the business data based on the reported business data and the corresponding terminal identification information, and save the reported business data to the corresponding process reporting set. The information processing module is used to trigger a matching data detection process based on the business data stored in the process reporting set. The information processing module is used to detect the business data stored in the process reporting set through the data detection process, and obtain the corresponding business data detection results.
[0012] This invention also provides an electronic device, characterized in that the electronic device comprises: Memory, used to store executable instructions; The processor, when running executable instructions stored in the memory, implements a preceding cross-platform page tracking method.
[0013] This invention also provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement a preceding cross-platform page embedding method.
[0014] The embodiments of the present invention have the following beneficial effects: The process involves: acquiring the interface interaction code of a cross-platform development framework running on a target client, wherein the target client is a terminal device running any programming language supported by the cross-platform development framework; generating an abstract syntax tree (AST) based on the interface interaction code, and generating a corresponding AST page based on the AST; triggering a page event tracking process on the target client, and establishing a relationship between the AST and the target client's application through the page event tracking process; selecting elements requiring event tracking in the application's display interface; determining the nodes of the AST page based on the elements requiring event tracking; configuring event tracking instructions and parameters for the nodes of the AST; performing event tracking on the elements requiring event tracking based on the event tracking instructions and parameters, and synchronizing the event tracking results to target clients using different programming languages through the interface interaction code of the cross-platform development framework. Therefore, by using the interface interaction code of the cross-platform development framework to perform event tracking on pages developed in multiple platform languages, the manpower and hardware costs of cross-platform page event tracking are reduced, which is conducive to the large-scale promotion of automated cross-platform page event tracking. At the same time, the event tracking business can be processed visually in the page environment by using event tracking instructions and event tracking parameters, which reduces the difficulty of event tracking and effectively improves the user experience. Attached Figure Description
[0015] Figure 1 A schematic diagram illustrating a use case of the cross-platform page tracking method provided in this embodiment of the invention; Figure 2 A schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention; Figure 3 This is an optional flowchart illustrating the cross-platform page tracking method provided in this embodiment of the invention. Figure 4 This is a schematic diagram of the rendering process of the cross-platform development framework in an embodiment of the present invention; Figure 5 A schematic diagram illustrating the association between the abstract syntax tree and the target client application in an embodiment of the present invention; Figure 6 A schematic diagram illustrating the association between the abstract syntax tree and the target client application in an embodiment of the present invention; Figure 7 This is a schematic diagram illustrating the binding process between elements requiring data tracking and the abstract syntax tree in an embodiment of the present invention. Figure 8 This is a schematic diagram of element exposure in an embodiment of the present invention; Figure 9 This is a schematic diagram illustrating the process of setting embedding parameters in an embodiment of the present invention; Figure 10This is a schematic diagram illustrating the process of setting up the interface interaction code file for synchronous data collection points in an embodiment of the present invention. Figure 11 This is a schematic diagram illustrating the effect of the embedding point processing in an embodiment of the present invention; Figure 12 This is an optional flowchart illustrating the cross-platform page tracking method provided in this embodiment of the invention. Figure 13 This is a schematic diagram illustrating an optional use case of the cross-platform page tracking method provided in this embodiment of the invention. Figure 14 This is a schematic diagram illustrating an optional use case of the cross-platform page tracking method provided in this embodiment of the invention. Detailed Implementation
[0016] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on 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 the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0018] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be interpreted as follows.
[0019] 1) API: Short for Application Programming Interface, it refers to a set of predefined functions or conventions for the connection between different components of a software system. Its purpose is to provide applications and developers with the ability to access a set of routines based on certain software or hardware, without needing to access the source code or understand the details of the internal workings.
[0020] 2) SDK: Software Development Kit, which is a collection of development tools for building application software for specific software packages, software frameworks, hardware platforms, operating systems, etc. In a broad sense, it includes a collection of related documents, examples and tools that assist in the development of a certain type of software.
[0021] 3) In response, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed can be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.
[0022] 4) A mini program is a type of application developed using a front-end-oriented language (such as JavaScript) and running services within Hyper Text Markup Language (HTML) pages. It is downloaded by a client (such as a browser or any client with an embedded browser engine) via a network (such as the internet) and interpreted and executed within the client's browser environment, saving the steps of installation on the client side. For example, mini programs that provide various services such as airline ticket purchases and transit QR codes can be downloaded and run on social networking clients.
[0023] 5) Components are functional modules of the view in a mini-program, also known as front-end components. They include buttons, titles, tables, sidebars, content, and footers on the page. Components include modular code so that they can be reused in different pages of the mini-program.
[0024] 6) Runtime environment: The engine used to interpret and execute code in different programming languages. For example, for the runtime environment of a mini-program, it could be JavaScript Core on the iOS platform or X5 JS Core on the Android platform.
[0025] 7) Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. It encompasses network technologies, information technologies, integration technologies, management platform technologies, and application technologies based on cloud computing business models. These technologies can form resource pools, allowing for flexible and convenient on-demand use. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring data to be transmitted to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0026] 8) Event tracking: Generally refers to action tracking, which is used to record a series of user behaviors during operation. It is also the core data basis for business judgment. If it is missing or inaccurate, it will cause irreparable losses to the business.
[0027] 9) JavaScript (JS for short): A lightweight, interpreted or just-in-time (JIT) programming language with a function-first approach. Although it is best known as a scripting language for developing web pages, it is also used in many non-browser environments. JavaScript is a prototype-based, multi-paradigm dynamic scripting language that supports object-oriented, imperative, declarative, and functional programming paradigms.
[0028] 10) Webpack: A static module bundler for modern JavaScript applications. When webpack processes an application, it internally builds a dependency graph from one or more entry points, and then combines each module needed in your project into one or more bundles, which are static resources used to display your content.
[0029] 11) UI / UX code JS-Bundle: The final output of webpack is a JavaScript file that can be recognized by the browser and run directly. Essentially, a JS-bundle is an immediately invoked function expression (IIFE). This function takes a dependency topology graph (i.e., a JavaScript object) as input and has no output. Internally, it runs the code sequentially according to dependency order, using `eval(code)`.
[0030] 12) Abstract Syntax Tree (AST): An abstract representation of the syntax structure of source code. It represents the syntax structure of a programming language in a tree-like form, where each node in the tree represents a structure in the source code.
[0031] 13) DSL (Domain Specific Language): A programming language designed for a specific domain and with limited expressiveness.
[0032] 14) Hippy, a cross-platform development framework: Its goal is to enable developers to write only one set of code that can run directly on four platforms (iOS, Android, Web, and Flutter). Hippy is designed for traditional web developers, especially those with experience in React Native and Vue, who will find it easier to use. Hippy is committed to making front-end development of cross-platform apps easier.
[0033] 15) V8: A mainstream JavaScript execution engine that uses just-in-time compilation, resulting in high speed. V8 is developed in C++ and used in Google Chrome. Before running JavaScript, unlike other JavaScript engines that convert it to bytecode or interpret it, V8 compiles it into native machine code (IA-32, x86-64, ARM, or MIPS CPUs) and uses methods such as inline caching to improve performance. With these features, JavaScript programs running under the V8 engine can rival the speed of binary programs.
[0034] 16) JS-Core: Like V8, it is also a mainstream JS execution engine. The difference between JS-Core and V8 is that JS-Core runs on iOS phones or Mac environments.
[0035] Before introducing the cross-platform page tracking method provided in this application, we will first explain the processing of cross-platform page tracking in related technologies. Currently, the mainstream non-intrusive data tracking solution involves setting various intercepting hook functions during the code's lifecycle and pre-configuring the data parameters for tracking reports. When the code reaches a certain lifecycle stage and triggers the pre-set hook function, the tracking parameters in the configuration file can be reported. However, this approach has several drawbacks: 1) For the same business requirements across iOS, Android, Web, and Flutter platforms using the same development languages and UI, the business logic for tracking processing needs to be developed four times, resulting in high manpower costs, low efficiency, and a high error rate, significantly increasing the cost of cross-platform page tracking. 2) Tracking parameters cannot be configured in a visual page, increasing the difficulty of tracking and hindering efforts to reduce its complexity. 3) Tracking parameters cannot dynamically obtain the page's business parameters; only some general configuration parameters can be tracked, which cannot adapt to various complex tracking needs, affecting user experience.
[0036] Figure 1 This is a schematic diagram illustrating a use case of the cross-platform page tracking method provided in this embodiment of the invention. (See attached diagram.) Figure 1The terminals (including terminals 10-1 and 10-2) are equipped with corresponding clients capable of performing different functions. These clients are used by the terminals (including terminals 10-1 and 10-2) to retrieve different web pages from the corresponding server 200 via network 300 using different business processes for browsing. The terminals connect to the server 200 via network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of both, using a wireless link for data transmission. The types of web pages retrieved by the terminals (including terminals 10-1 and 10-2) from the corresponding server 200 via network 300 are not the same. For example, the terminals (including terminals 10-1 and 10-2) can retrieve video web pages (i.e., web pages containing video information or corresponding video links) or web pages containing only text or images from the corresponding server 200 via network 300 for browsing. The server 200 can store different types of web pages. In some embodiments of the present invention, the different types of web pages stored in the server 200 can be written in software code of different programming languages, and the code objects can be different types of code entities. For example, in C language software code, a code object can be a function. In JAVA language software code, a code object can be a class, and in iOS Objective-C, it can be a piece of object code. In C++ language software code, a code object can be a class or a function. This application does not distinguish between the compilation environments of different types of web pages.
[0037] Different business processes running on server 200 can use tracking points to send business data to terminals (terminal 10-1 and / or terminal 10-2) via network 300, so as to detect the running status of the business processes. For example, terminal 10-1 can be a browser developed in Android language, and terminal 10-2 can be a browser developed in iOS language. When performing tracking points, the interface interaction code of the cross-platform development framework can be used to perform tracking point processing only once, so that tracking points can be implemented on browser pages of different platforms.
[0038] The structure of the electronic device according to an embodiment of the present invention will be described in detail below. The electronic device can be implemented in various forms, such as a dedicated terminal with cross-platform page tracking function, such as a gateway, or a server with cross-platform page tracking function, as described above. Figure 1 Server 200 in the middle. Figure 2 This is a schematic diagram of the composition structure of an electronic device provided in an embodiment of the present invention. It can be understood that... Figure 2 The server architecture shown is merely an example and not the entire architecture; implementation is possible as needed. Figure 2 The structure shown may be part or all of the structure.
[0039] The server provided in this embodiment of the invention includes at least one processor 201, a memory 202, a user interface 203, and at least one network interface 204. Various components in the electronic device 20 are coupled together via a bus system 205. It can be understood that the bus system 205 is used to implement communication between these components. In addition to a data bus, the bus system 205 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 2 The general labeled all buses as Bus System 205.
[0040] The user interface 203 may include a monitor, keyboard, mouse, trackball, click wheel, buttons, touchpad, or touch screen.
[0041] It is understood that memory 202 can be volatile memory or non-volatile memory, or both. In this embodiment of the invention, memory 202 is capable of storing data to support the operation of a terminal (such as 10-1). Examples of this data include any computer programs used to operate on the terminal (such as 10-1), such as operating systems and applications. The operating system includes various system programs, such as the framework layer, core library layer, driver layer, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications.
[0042] In some embodiments, the cross-platform page tracking device provided in this invention can be implemented using a combination of hardware and software. For example, the cross-platform page tracking device provided in this invention can be a processor in the form of a hardware decoding processor, programmed to execute the cross-platform page tracking method provided in this invention. For instance, the processor in the form of a hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0043] As an example of the cross-platform page tracking device provided in this embodiment of the invention, which is implemented using a combination of hardware and software, the cross-platform page tracking device provided in this embodiment of the invention can be directly embodied as a combination of software modules executed by processor 201. The software modules can be located in a storage medium, which is located in memory 202. Processor 201 reads the executable instructions included in the software modules in memory 202 and combines them with necessary hardware (e.g., including processor 201 and other components connected to bus 205) to complete the cross-platform page tracking method provided in this embodiment of the invention.
[0044] As an example, processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0045] As an example of the hardware implementation of the cross-platform page tracking device provided in this embodiment of the invention, the device provided in this embodiment of the invention can be directly executed by a processor 201 in the form of a hardware decoding processor. For example, it can be executed by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components to implement the cross-platform page tracking method provided in this embodiment of the invention.
[0046] In this embodiment of the invention, the memory 202 is used to store various types of data to support the operation of the electronic device 20. Examples of such data include: any executable instructions for operation on the electronic device 20, such as executable instructions that can be included in a program implementing the cross-platform page tracking method of this embodiment of the invention.
[0047] In other embodiments, the cross-platform page tracking device provided in this invention can be implemented in software. Figure 2A cross-platform page tracking device 2020 stored in memory 202 is shown. This device can be software in the form of programs and plugins, and includes a series of modules. As an example of a program stored in memory 202, it may include the cross-platform page tracking device 2020. The cross-platform page tracking device 2020 includes the following software modules: an information transmission module 2081 and an information processing module 2082. When the software modules in the cross-platform page tracking device 2020 are read into RAM and executed by processor 201, the cross-platform page tracking method provided in this embodiment of the invention will be implemented. The functions of each software module in the cross-platform page tracking device 2020 are described below: The information transmission module 2081 is used to acquire the interface interaction code of the cross-platform development framework running in the target client, wherein the target client is a terminal device running any development language supported by the cross-platform development framework.
[0048] The information processing module 2082 is used to generate an abstract syntax tree based on the interface interaction code, and to generate a corresponding abstract syntax tree page based on the abstract syntax tree.
[0049] The information processing module 2082 is used by the target client to trigger the page tracking process and establish an association between the abstract syntax tree and the application of the target client through the page tracking process.
[0050] The information processing module 2082 is used to select the element that needs to be embedded in the display interface of the application.
[0051] The information processing module 2082 is used to determine the nodes of the abstract syntax tree in the abstract syntax tree page according to the element to be processed.
[0052] The information processing module 2082 is used to configure the node embedding instructions and embedding parameters for the nodes of the abstract syntax tree.
[0053] The information processing module 2082 is used to perform tracking processing on the elements that need tracking processing according to the tracking instructions and the tracking parameters, and synchronize the tracking results to target clients with different programming languages through the interface interaction code of the cross-platform development framework.
[0054] according to Figure 2In one aspect of this application, the electronic device also provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform various embodiments and combinations of embodiments provided in the various optional implementations of the cross-platform page tracking method described above.
[0055] The server in this embodiment of the invention can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal and server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any limitations on this.
[0056] In some embodiments of the present invention, terminal 110, traffic terminal 120, multimedia information system 130 and distributed cloud storage system 140 can all be node devices in the blockchain system, which can share the acquired and generated information with other node devices in the blockchain system, thereby realizing information sharing among multiple node devices.
[0057] This invention can also achieve multimedia information exposure control based on cloud technology. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. Cloud computing refers to the delivery and use model of IT infrastructure, which means obtaining the required resources through the network in an on-demand and easily scalable manner; in a broader sense, cloud computing refers to the delivery and use model of services, which means obtaining the required services through the network in an on-demand and easily scalable manner. Such services can be IT and software, Internet-related, or other services. Cloud computing is a product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing. With the development of the Internet, real-time data streams, and the diversification of connected devices, as well as the demand for search services, social networks, mobile commerce, and open collaboration, cloud computing has developed rapidly. Unlike previous parallel and distributed computing, the emergence of cloud computing will drive a revolutionary change in the entire Internet model and enterprise management model from a conceptual perspective.
[0058] Cloud storage is a new concept that extends and develops from cloud computing. A distributed cloud storage system (hereinafter referred to as a storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to aggregate a large number of storage devices of various types (storage devices are also called storage nodes) in a network to work together through application software or application interfaces to provide data storage and business access functions. Currently, the storage method of a storage system is as follows: create logical volumes. When creating a logical volume, physical storage space is allocated to each logical volume. This physical storage space may be composed of disks from one or several storage devices. When a client stores data on a logical volume, it stores the data on the file system. The file system divides the data into many parts, each part being an object. The object contains not only data but also additional information such as data identifiers (ID, ID entity). The file system writes each object to the physical storage space of the logical volume and records the storage location information of each object. Therefore, when a client requests access to data, the file system can allow the client to access the data based on the storage location information of each object. The process by which a storage system allocates physical storage space to a logical volume is as follows: the physical storage space is pre-divided into strips according to the capacity estimate of the objects stored in the logical volume (this estimate often has a large margin relative to the actual capacity of the objects to be stored) and the grouping of Redundant Array of Independent Disks (RAID). A logical volume can be understood as a strip, thus allocating physical storage space to the logical volume.
[0059] Combination Figure 2 The illustrated electronic device 20 demonstrates the cross-platform page tracking method provided by an embodiment of the present invention. See also... Figure 3 , Figure 3 This is an optional flowchart illustrating the cross-platform page tracking method provided in this embodiment of the invention. It can be understood that... Figure 3 The steps shown can be performed by various servers running cross-platform page tracking devices, such as servers or server clusters with cross-platform page tracking capabilities. The following section addresses... Figure 3 The steps shown are explained.
[0060] Step 301: The cross-platform page tracking device obtains the interface interaction code of the cross-platform development framework running in the target client.
[0061] The target client is a terminal device running any programming language supported by the cross-platform development framework. The cross-platform development framework Hippy allows developers to write only one set of code that runs directly on platforms using at least three programming languages (iOS, Android, and Web). Hippy is designed for traditional web developers, making the development of cross-platform apps easier.
[0062] Step 302: The cross-platform page tracking device generates an abstract syntax tree based on the interface interaction code, and generates a corresponding abstract syntax tree page based on the abstract syntax tree.
[0063] Using the Hippy framework, the JS-Bundle interface interaction code written on the front end can be parsed into the same DSL configuration syntax tree on terminal devices running various programming languages, and then the same UI interface can be rendered by utilizing the characteristics of each type of terminal.
[0064] refer to Figure 4 , Figure 4 This is a schematic diagram of the rendering process of a cross-platform development framework in an embodiment of the present invention. In some embodiments of the present invention, generating a corresponding abstract syntax tree page based on the abstract syntax tree can be achieved in the following ways: determining the editing engine of the interface interaction code according to the type of the target client; editing the interface interaction code through the editing engine to obtain an abstract syntax tree of a restricted expressive language; rendering the nodes of the abstract syntax tree of the restricted expressive language through the editing engine to obtain a rendering node tree; and rendering the layout of the rendering node tree to obtain the abstract syntax tree page. Wherein... Figure 4 As shown, within the Hippy framework, when the UI / UX code runs on a Chrome browser, Android phone, or Windows system, the V8 engine can parse it into an abstract syntax tree (AST) configured by the DSL. Similarly, when the UI / UX code runs on a Safari browser, iOS phone, or Mac system, the JS-Core engine is used to parse it into the AST. After the corresponding engine parses the UI / UX code in real-time and obtains the AST, each type of terminal device can generate a rendering node tree based on its environment, perform layout rendering, and present the same UI page.
[0065] Step 303: The cross-platform page tracking device triggers the page tracking process on the target client and establishes a relationship between the abstract syntax tree and the target client's application through the page tracking process.
[0066] In some embodiments of the present invention, the association between the abstract syntax tree and the target client application can be established in the following ways: The target client responds to the recording start command sent by the page tracking process by configuring a callback function for the application. Through the callback function, the application's display interface is associated with the corresponding nodes in the abstract syntax tree. The page tracking process receives a file update command sent by the target client. In response to the file update command, the page tracking process updates the structure of the abstract syntax tree, ultimately establishing the association. (Refer to...) Figure 5 , Figure 5 This diagram illustrates the association between the abstract syntax tree and the target client's application in this embodiment of the invention. Since a complete application's display interface includes at least one frame of page image, after establishing a communication channel with the running client, the page tracking process sends a custom start screencast command to the client. Upon receiving this command, the running client can bind a callback function to request the page image in the page UI refresh callback hook function. When the client's page refreshes, the bound function is triggered. The function obtains the information of the page rendering root node, converts it into a base64 format image of the page, and transmits the image to the page tracking process via a custom screencast frame command, displaying the currently running client page. Simultaneously, the page tracking process sends another custom screencast frameAck command to the client to continue obtaining the next frame of page image, until the association between all page images included in the display interface of a complete application is established.
[0067] refer to Figure 6 , Figure 6 This diagram illustrates the association between the abstract syntax tree (DSL) and the target client's application in this embodiment of the invention. Besides the client's application process interface being synchronized to the page tracking process, the DSL is also synchronized to the page tracking process. When the DSL corresponding to the client changes, a custom document update command (documentUpdate) is sent to the page tracking process. Upon receiving this command, the page tracking process sends a custom getDocument command to the client to obtain the currently running DSL AST, thus completing the process of synchronizing and updating the DSL AST.
[0068] Step 304: Cross-platform page tracking device selects the element to be tracked in the application's display interface.
[0069] In this way, according to different data tracking business needs, at least one element that needs data tracking can be selected in the application's display interface.
[0070] Step 305: The cross-platform page tracking device determines the nodes of the abstract syntax tree in the abstract syntax tree page based on the elements to be tracked.
[0071] refer to Figure 7 , Figure 7 This is a schematic diagram illustrating the binding process between elements requiring event tracking and the abstract syntax tree in an embodiment of the present invention. Figure 7 The shaded area, "Voltron Vue," represents the element selected by the user for event tracking. When the user selects "Voltron Vue" in the application's display, a distance calculation page is triggered. At this point, "Voltron Vue" is positioned as a click point (Point) on the distance calculation page, with coordinates (x, y). The distances from the top and left edges of the application's display are `top`` and `left``, respectively. In the abstract syntax tree structure, each node (Node) renders its top (top) edge, left (left) edge, width (width) edge, and height (height) on the application's display. When the click point (Point) satisfies Formula 1, an element can be selected within the node's subtree.
[0072] Formula 1 After determining the subtree containing the element that needs to be tracked, the element with the maximum depth (Depthmax) and minimum area (Areamin = width) within the subtree is selected. The association relationship is bound to the first element of `height`. For example... Figure 7 As shown, the text element is bidirectionally bound to the Text node (dashed line node) in the lower right corner of the abstract syntax tree of the restricted expressive editing language. Thus, the bidirectional binding between the page element and all nodes on the abstract syntax tree of the restricted expressive editing language is completed.
[0073] Step 306: The cross-platform page tracking device configures tracking instructions and tracking parameters for the nodes of the abstract syntax tree.
[0074] Step 307: The cross-platform page tracking device performs tracking processing on the elements that need tracking processing according to the tracking instructions and tracking parameters, and synchronizes the tracking results to the target clients with different programming languages through the interface interaction code of the cross-platform development framework.
[0075] In some embodiments of the present invention, configuring instrumentation instructions and instrumentation parameters for nodes of the abstract syntax tree can be achieved in the following ways: Based on the data tracking business requirements, determine the data tracking instruction type, which includes element click data tracking and element exposure data tracking; through abstract syntax tree, determine the business name and parameter value corresponding to each element in the application's display interface; write the business name and parameter value into the data tracking instruction class to obtain data tracking parameters that match the business requirements.
[0076] The following sections explain the tracking instructions and parameters provided in this application. (Refer to...) Figure 8 , Figure 8 This is a schematic diagram illustrating element exposure in an embodiment of the present invention. Two types of tracking instructions are provided: element click tracking and element exposure tracking. Element click tracking triggers the tracking logic when a page element is clicked. Element exposure tracking triggers the tracking logic when a page element is exposed, and page exposure is combined with... Figure 7 In addition to Formula 1, if a page element satisfies Formula 2, then this element meets the conditions for triggering the exposure logic, and element exposure tracking can be performed.
[0077] Formula 2 refer to Figure 9 , Figure 9 This is a schematic diagram illustrating the process of setting tracking parameters in an embodiment of the present invention. It shows how, through the abstract syntax tree of a restricted expressive editing language, the names and corresponding values of all business parameters on the current page can be obtained, such as... Figure 9 As shown, the variable name 'userId' is obtained through the abstract syntax tree of the Restricted Expressive Language (REL) and used as the identifier for the tracking parameter, which is then written into the logic of the tracking instruction. When the logic of the tracking instruction is triggered, the corresponding value '5201314' is found in the REL using the identifier 'userId', and the tracking parameter is reported.
[0078] Since the cross-platform development framework supports multiple programming languages, and the method provided in this application aims to perform event tracking only once on terminal devices using multiple platform programming languages such as iOS, Android, Web, and Flutter, it can achieve event tracking for pages in multiple platform programming languages, reducing the manpower and hardware costs of cross-platform page event tracking. Therefore, an abstract syntax tree can be used to find the interface interaction code corresponding to the event tracking instructions and parameters; the interface interaction code is modified to obtain interface interaction code carrying event tracking information; and the interface interaction code carrying event tracking information is sent to a cloud server for terminal devices on different platforms to download and update. (Reference) Figure 10 , Figure 10This is a schematic diagram illustrating the process of setting up the interface interaction code file for synchronous event tracking in an embodiment of the present invention. After setting the relevant event tracking instructions and parameters, the abstract syntax tree of the restricted expressive editing language is used to locate the row and column positions of the corresponding node code in the interface interaction code. The event tracking parameters are then instrumented, automatically modifying the original interface interaction code. After modification, the page event tracking process automatically uploads the new JS-Bundle to the cloud for download, parsing, and rendering by other devices.
[0079] To better illustrate the working process of the cross-platform page tracking method provided in this application, the following explanation uses the tracking process of a mini-program component in an instant messaging client as an example. Figure 11 , Figure 11 This is a schematic diagram illustrating the effect of the event tracking processing in an embodiment of the present invention. When the page event tracking process is used to test the mini-program process, it obtains a virtual test account for logging into the mini-program server and presents the virtual test account in the interactive interface of the page event tracking. In response to the selection operation for the virtual test account, it logs into the mini-program server based on each selected virtual test account and displays a mini-program window in the logged-in state in the interactive interface. In response to a test request for the mini-program, it displays the debugging information output when the page event tracking method is executed in the mini-program window. For example, Figure 11 As shown, the interactive interface displays an automated test status component, which can respond to test requests for the mini-program; a login status component is also displayed, which can control testers' login and logout, and check login information through target verification methods; through... Figure 11 The web-based visual interface shown allows for remote management. The web interface includes a "Run Test" button; by clicking this button, testers can send commands to the development machine to control it to run tests, log into developer tools, and enable test result notifications. This is achieved through triggering... Figure 11 The login status component allows users to view event tracking information via QR code verification, preventing the omission of elements that require event tracking.
[0080] Figure 12 An optional flowchart of the cross-platform page tracking method provided in this embodiment of the invention is shown, which specifically includes the following steps: Step 1201: Select the client, run the Hippy js-bundle file, generate the abstract syntax tree of the DSL configuration in real time based on the js-bundle, and render the corresponding page.
[0081] Step 1202: Client connection page tracking process.
[0082] Step 1203: Synchronize the application interface running on the client through the page tracking process and automatically establish a relationship with the abstract syntax tree configured by the DSL.
[0083] Figure 13 This diagram illustrates an optional use case of the cross-platform page tracking method provided in this invention. To simplify the tracking operation, the user selects the "Voltron Vue" element by moving the cursor and clicking the left mouse button. Simultaneously, this node is also selected in the DSL configuration syntax tree. On the far right, the tracking instruction type (e.g., click tracking and exposure tracking) can be selected. The page's operational business parameters can also be configured. Finally, clicking "Save Synchronize Tracking Configuration" generates the relevant associated configurations and uploads them synchronously for use by other clients, completing the entire tracking process. This reduces the difficulty of tracking and effectively improves the user experience.
[0084] Step 1204: Select the elements on the page that need to be tracked.
[0085] Step 1205: The page tracking process tracks elements selected on the page. After selection, the device will automatically locate the node on the abstract syntax tree and provide tracking instructions and parameter selection.
[0086] Step 1206: Configure the event tracking instructions and parameters for the selected elements and upload them synchronously to complete the event tracking process.
[0087] In some embodiments of the present invention, after the data collection process is completed, the business data reported by the target business process through the triggering of the data collection can be obtained; based on the reported business data and the corresponding terminal identification information, the data source for reporting the business data is determined, and the reported business data is saved to the corresponding process reporting set; based on the business data saved in the process reporting set, a matching data detection process is triggered; the business data saved in the process reporting set is detected by the data detection process to obtain the corresponding business data detection results. Figure 14 This is a schematic diagram illustrating an optional use scenario of the cross-platform page tracking method provided in this embodiment of the invention. In some embodiments, the operator can set a specific duration according to the needs of the webpage to be tracked; for example, setting the specific duration to 1 day or 1 week; in a specific example, setting the specific duration to 1 day, and obtaining the tracking data of each target function node within that day to form a tracking data set; such as... Figure 14As shown, in browser webpage 61, the system retrieves the data from Tencent Video 601, HD Movies 602, Tencent News 603, Maps 604, and QQ Mail 605 over a day. For example, if the data is page views, the system retrieves the number of times users click on Tencent Video 601, HD Movies 602, Tencent News 603, Maps 604, and QQ Mail 605 over a day.
[0088] To ensure the accuracy of user click counts in the event tracking statistics, a protocol field detection process can be used to check the field information of the business data stored in the process reporting set; an accuracy detection process can be used to check the accuracy of the business data stored in the process reporting set based on matching rules; and a multi-report timing detection process can be used to check the number parameters and timing information of the business data stored in the process reporting set. The protocol field validation process requires first defining validation rules for each field of the reported data, including but not limited to: field type restrictions, field enumeration restrictions, and field range restrictions, to ensure the validity of different fields in the reported data and to serve as the first layer of validation.
[0089] The present invention has the following beneficial technical effects: This invention, through the interface interaction code of a cross-platform development framework, simultaneously performs event tracking on pages developed in multiple platform languages, reducing the manpower and hardware costs of cross-platform page event tracking. This facilitates the large-scale promotion of automated cross-platform page event tracking. Furthermore, by utilizing event tracking instructions and parameters, event tracking can be visually processed within the page environment, reducing the difficulty of event tracking and effectively improving the user experience.
[0090] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A cross-platform page tracking method, characterized in that, The method includes: Obtain the interface interaction code of the cross-platform development framework running in the target client, wherein the target client is a terminal device running any of the development languages supported by the cross-platform development framework; Based on the type of the target client, determine the editing engine for the interface interaction code; edit the interface interaction code using the editing engine to obtain an abstract syntax tree of a restricted expressive language; render the nodes of the abstract syntax tree of the restricted expressive language using the editing engine to obtain a rendered node tree; and render the layout of the rendered node tree to obtain an abstract syntax tree page. The target client triggers a page tracking process, and establishes an association between the abstract syntax tree and the target client's application through the page tracking process; Select the element that needs to be embedded in the application's display interface; Based on the elements requiring event tracking, nodes of the abstract syntax tree are determined in the abstract syntax tree page. When a user selects an element displayed on the application's interface, a distance calculation page is triggered. In the structure of the abstract syntax tree, each node renders its top boundary, left boundary, width, and height on the application's interface. When the click point corresponding to the element requiring event tracking satisfies the following conditions, the subtree containing the selected element is determined: the distance between the click point and the top boundary of the application's interface is greater than or equal to the top boundary and less than or equal to the sum of the top boundary and the height; and the distance between the click point and the left boundary of the application's interface is greater than or equal to the left boundary and less than or equal to the sum of the left boundary and the width. After determining the subtree containing the element that needs to be embedded, the element is associated with the first element in the subtree that has the largest depth and the smallest area. Configure the node of the abstract syntax tree with the instrumentation instructions and parameters; According to the tracking instructions and the tracking parameters, the elements that need tracking processing are tracked, and the interface interaction code corresponding to the tracking instructions and the tracking parameters is found through the abstract syntax tree of the restricted expressive editing language; the interface interaction code is modified to obtain interface interaction code carrying tracking information; the interface interaction code carrying tracking information is sent to the cloud server for the target client to download and update.
2. The method according to claim 1, characterized in that, The step of establishing a relationship between the abstract syntax tree and the target client's application through the page tracking process includes: The target client responds to the recording start command sent by the page tracking process and configures a callback function for the application; The callback function is used to associate the application's display interface with the corresponding node of the abstract syntax tree. The page tracking process receives the file update command sent by the target client; In response to the file update instruction, the page tracking process updates the structure of the abstract syntax tree to establish a relationship between the abstract syntax tree and the application of the target client.
3. The method according to claim 1, characterized in that, Configure the node tracking instructions and tracking parameters for the nodes of the abstract syntax tree, including: Based on the needs of the event tracking business, determine the event tracking instruction type, which includes: element click event tracking and element exposure event tracking; The abstract syntax tree is used to determine the business name and parameter values corresponding to all elements in the application's display interface. Write the business name and parameter values into the event tracking instruction type to obtain event tracking parameters that match the business requirements.
4. The method according to claim 1, characterized in that, The method further includes: Once the event tracking is completed, the business data reported by the target business process through the triggered event tracking is obtained. Based on the reported business data and the corresponding terminal identification information, determine the reporting data source of the business data, and save the reported business data to the corresponding process reporting set; Based on the business data stored in the process reporting set, a matching data detection process is triggered. The data detection process detects the business data stored in the process reporting set and obtains the corresponding business data detection results.
5. The method according to claim 4, characterized in that, The step of triggering a matching data detection process based on the business data stored in the process reporting set includes: The process involves detecting the field information of the business data stored in the process reporting set by means of protocol field detection; The accuracy of the business data stored in the process reporting set is detected through an accuracy detection process based on matching rules. The multi-report timing detection process detects the number parameters and timing information of the business data stored in the process reporting set.
6. A cross-platform page tracking device, characterized in that, The device includes: The information transmission module is used to acquire the interface interaction code of the cross-platform development framework running in the target client, wherein the target client is a terminal device running any development language supported by the cross-platform development framework; The information processing module is used to determine the editing engine of the interface interaction code according to the type of the target client; edit the interface interaction code through the editing engine to obtain the abstract syntax tree of the restricted expressive editing language; render the nodes of the abstract syntax tree of the restricted expressive editing language through the editing engine to obtain the rendering node tree; and render the layout of the rendering node tree to obtain the abstract syntax tree page. The information processing module is used by the target client to trigger the page tracking process, and to establish a relationship between the abstract syntax tree and the application of the target client through the page tracking process. The information processing module is used to select the element that needs to be embedded in the display interface of the application. The information processing module is used to determine the nodes of the abstract syntax tree (AST) in the abstract syntax tree page according to the elements that need to be tracked. Specifically, when a user selects an element displayed on the application's screen, a distance calculation page is triggered. In the structure of the AST, each node renders its top boundary, left boundary, width, and height on the application's screen. The subtree containing the element to be tracked is determined when the click point corresponding to the element meets the following conditions: the distance from the click point to the top boundary of the application's screen is greater than or equal to the top boundary and less than or equal to the sum of the top boundary and the height; and the distance from the click point to the left boundary of the application's screen is greater than or equal to the left boundary and less than or equal to the sum of the left boundary and the width. After determining the subtree containing the element to be tracked, the element is associated with the first element in the subtree that has the largest depth and the smallest area. The information processing module is used to configure the node embedding instructions and embedding parameters for the nodes of the abstract syntax tree; The information processing module is used to perform tracking processing on the elements requiring tracking based on the tracking instructions and the tracking parameters, and to find the interface interaction code corresponding to the tracking instructions and the tracking parameters through the abstract syntax tree of the restricted expressive editing language; modify the interface interaction code to obtain interface interaction code carrying tracking information; and send the interface interaction code carrying tracking information to the cloud server for the target client to download and update.
7. The apparatus according to claim 6, characterized in that, The information processing module is also used to configure a callback function for the application in response to the recording start command sent by the page tracking process; The callback function is used to associate the application's display interface with the corresponding node of the abstract syntax tree. The page tracking process receives the file update command sent by the target client; In response to the file update instruction, the page tracking process updates the structure of the abstract syntax tree to establish a relationship between the abstract syntax tree and the application of the target client.
8. The apparatus according to claim 6, characterized in that, The information processing module is also used to determine the type of tracking instruction according to the tracking business requirements, wherein the tracking instruction type includes: element click tracking and element exposure tracking; The abstract syntax tree is used to determine the business name and parameter values corresponding to all elements in the application's display interface. Write the business name and parameter values into the event tracking instruction type to obtain event tracking parameters that match the business requirements.
9. The apparatus according to claim 6, characterized in that, The information processing module is also used to obtain the business data reported by the target business process through the triggering of the event tracking after the event tracking is completed. Based on the reported business data and the corresponding terminal identification information, determine the reporting data source of the business data, and save the reported business data to the corresponding process reporting set; Based on the business data stored in the process reporting set, a matching data detection process is triggered. The data detection process detects the business data stored in the process reporting set and obtains the corresponding business data detection results.
10. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the cross-platform page tracking method according to any one of claims 1 to 5.
11. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the cross-platform page tracking method according to any one of claims 1 to 5.
12. A computer-readable storage medium storing executable instructions, characterized in that, When the executable instructions are executed by the processor, they implement the cross-platform page tracking method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for adding burying points, processor, storage medium and program product
CN114047924A