WO2019091017A1 - 动态页面中的埋点处理方法、装置和计算机设备 - Google Patents
动态页面中的埋点处理方法、装置和计算机设备 Download PDFInfo
- Publication number
- WO2019091017A1 WO2019091017A1 PCT/CN2018/077007 CN2018077007W WO2019091017A1 WO 2019091017 A1 WO2019091017 A1 WO 2019091017A1 CN 2018077007 W CN2018077007 W CN 2018077007W WO 2019091017 A1 WO2019091017 A1 WO 2019091017A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- dynamic
- buried point
- identifier
- point
- path
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3636—Debugging of software by tracing the execution of the program
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/3644—Debugging of software by instrumenting at runtime
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Prevention of errors by analysis, debugging or testing of software
- G06F11/362—Debugging of software
- G06F11/366—Debugging of software using diagnostics
Definitions
- the present application relates to the field of computer technology, and in particular, to a buried point processing method, apparatus, and computer device in a dynamic page.
- the APP page includes static pages and dynamic pages.
- the content of the static page does not change substantially. After the burying point in the static page is set, the corresponding buried point data can be collected smoothly.
- the content in the dynamic page can change over time or the user's operation, and the buried point in the dynamic page changes.
- each page can be considered as a view tree, and the buried point can be regarded as a node in the view tree.
- Each node can have a corresponding path, and the collected data can be uploaded according to its path.
- the path corresponding to the node in the view tree may be disordered, and the uploaded data is inconsistent with the buried point.
- a buried point processing method, apparatus, computer device, and storage medium in a dynamic page are provided.
- a buried point processing method in a dynamic page comprising:
- the page includes a dynamic page
- the buried point includes a static buried point and a dynamic buried point
- the touched burying point is a dynamic burying point
- the dynamic burying point corresponding dynamic identifier is obtained, and the corresponding path is obtained according to the dynamic identifier
- a buried point processing device in a dynamic page comprising:
- a buried point pulling module configured to pull a buried point of multiple pages of the application; the page includes a dynamic page, and the buried point includes a static buried point and a dynamic buried point;
- An event capture module configured to capture a touch event corresponding to a buried point in the dynamic page
- a path obtaining module configured to acquire a dynamic identifier corresponding to the dynamic buried point when the touched buried point is a dynamic buried point, and obtain a corresponding path according to the dynamic identifier; when the touched buried point is a static buried point, Obtaining an index identifier corresponding to the static burying point, and obtaining a corresponding path according to the index identifier; and
- the communication module is configured to upload the touch event of the dynamic buried point to the server by using the path corresponding to the dynamic identifier, and upload the touch event of the static buried point to the server by using the path corresponding to the index identifier.
- a computer device comprising a memory and one or more processors having stored therein computer readable instructions, the computer readable instructions being executable by the processor to cause the one or more processors to execute The following steps:
- the page includes a dynamic page
- the buried point includes a static buried point and a dynamic buried point
- the touched burying point is a dynamic burying point
- the dynamic burying point corresponding dynamic identifier is obtained, and the corresponding path is obtained according to the dynamic identifier
- One or more computer readable non-volatile storage media storing computer readable instructions, when executed by one or more processors, cause one or more processors to perform the steps of:
- the page includes a dynamic page
- the buried point includes a static buried point and a dynamic buried point
- the touched burying point is a dynamic burying point
- the dynamic burying point corresponding dynamic identifier is obtained, and the corresponding path is obtained according to the dynamic identifier
- FIG. 1 is an application scenario diagram of a buried point processing method in a dynamic page in an embodiment
- FIG. 2 is a flow chart of a method for processing a buried point in a dynamic page in an embodiment
- FIG. 3 is a block diagram of a buried point processing apparatus in a dynamic page in an embodiment
- FIG. 4 is a block diagram of a computer device in one embodiment.
- the present application provides a buried point processing method in a dynamic page, which can be applied to an application environment as shown in FIG. 1.
- the first terminal 102 is in communication connection with the server 104 via a network.
- the second terminal 106 is in communication connection with the server 104 via a network.
- the first terminal 102 may be a mobile terminal, such as a tablet computer, a smart phone, a personal digital assistant, a wearable device, or the like.
- the second terminal can be a desktop computer or a laptop computer.
- the second terminal 106 sets a buried point for a plurality of pages of the application.
- the second terminal 106 uploads the set buried point data to the server 104.
- An application is installed on the first terminal 102.
- the first terminal 102 pulls the corresponding buried point data on the server 104.
- the buried point data may include a buried point name, a buried point type, an index identifier corresponding to the static buried point, and a dynamic identifier corresponding to the dynamic buried point.
- the first terminal 102 captures an operation of the user on the page through the application, and acquires a touch event corresponding to the buried point when the buried point in the captured dynamic page is touched.
- the touched buried point is a dynamic buried point
- the first terminal 102 acquires a dynamic buried point corresponding dynamic identifier, and acquires a corresponding path according to the dynamic identifier.
- the first terminal 102 When the touched burying point is a static burying point, the first terminal 102 acquires an index identifier corresponding to the static burying point, and acquires a corresponding path according to the index identifier. The first terminal 102 uploads the dynamic buried point touch event to the server 104 by using the path corresponding to the dynamic identifier, and the first terminal 102 uploads the static buried point touch event to the server 104 by using the path corresponding to the index identifier. Since the dynamic identification is the unique identifier of the dynamic buried point, and the dynamic does not affect the index identification of the static buried point, it can ensure that the path of each buried point in the dynamic page is accurate.
- a method for processing a buried point in a dynamic page is provided.
- the method is applied to the first terminal in FIG. 1 as an example, and specifically includes the following steps:
- Step 202 Pulling a buried point of multiple pages of the application; the page includes a dynamic page, and the buried point includes a static buried point and a dynamic buried point.
- Step 204 Capture a touch event corresponding to a buried point in the dynamic page.
- the application is installed in the first terminal, and the application includes multiple pages, and the page includes a static page and a dynamic page.
- the page can contain content such as controls, text, images, or videos.
- Each page can be thought of as a view tree, and controls, text, images, or video can be considered nodes in the view tree.
- Each node in the view tree can be numbered so that each node can have a corresponding index identifier.
- the index identifier can be an index number. Since the content in the dynamic page can change over time or user operations, the nodes in the view tree of the dynamic page will change. For example, a dynamic page will add a "register" control after a preset time. Nodes in the view tree can be set to bury points in the page.
- a buried point that does not change in a static page can be called a static buried point
- a buried point that changes in a dynamic page (such as a newly added or deleted buried point) can be called a dynamic buried point.
- the developer can visually set static burial points and dynamic burying points through the second terminal.
- the second terminal uploads the set buried point data to the server.
- the buried point data may include a buried point name, a buried point type, an index identifier corresponding to the static buried point, and a dynamic identifier corresponding to the dynamic buried point.
- the first terminal captures the user's operation on the page through the application, and when the buried point in the captured dynamic page is touched, the touch event corresponding to the buried point is acquired.
- Step 206 When the touched buried point is a dynamic buried point, obtain a dynamic buried point corresponding dynamic identifier, and obtain a corresponding path according to the dynamic identifier.
- Step 208 When the touched buried point is a static buried point, obtain an index identifier corresponding to the static buried point, and obtain a corresponding path according to the index identifier.
- Step 210 Upload the touch event of the dynamic buried point to the server by using the path corresponding to the dynamic identifier, and upload the touch event of the static buried point to the server by using the path corresponding to the index identifier.
- each node in the view tree of the page can be set with a corresponding index identifier.
- Each index identifier has a unique path through which the first terminal can upload a touch event corresponding to the buried point to the server. For example, if there are three nodes in the dynamic page whose buried point type is a control, the corresponding index identifiers of the three nodes may be 0, 1, and 2, respectively. These 3 nodes can be set to static burying points. When the static buried point is touched, the first terminal generates a corresponding event message.
- the first terminal acquires the index identifier corresponding to the static burying point, queries the path corresponding to the static burying point according to the index identifier, and uploads the event message of the static burying point to the server according to the path. If a dynamic page is added with a user's operation, the node is dynamically buried. The newly added node (that is, the dynamic buried point) is inserted between the 0 node and the 1 node in the view tree, and the index of the newly added node of the first terminal is 1 by default, and the index of the original 1 node and the original 2 node are correspondingly changed. For 2 and 3.
- the path of the newly added node ie, dynamic buried point
- the original 1 node, and the original 2 node is disordered. Therefore, the uploaded data of the newly added node (ie, dynamic buried point), the original 1 node, and the original 2 node are inconsistent with the buried point.
- the deleted node is also dynamically buried. Assuming that the index of the dynamic buried point is 1, after the deletion, the first terminal defaults to the original 2 node index, and the path of the original 2 node is also disordered.
- the research and development personnel may pre-categorize a plurality of nodes in each page of the application through the second terminal, thereby obtaining a plurality of buried point categories.
- the control can be a category
- the text can be a category
- the image can be a category
- the video can be a category.
- Each buried category is set with the corresponding index identifier.
- nodes in each buried category can contain dynamic buried points.
- the second terminal sets a unique dynamic identifier for each dynamic buried point.
- the dynamic identifier is an identifier different from the index identifier.
- the dynamic identifier can be a buried point name or other tags.
- the dynamic identity does not change and does not cause the index to change. That is to say, for the view tree, the index of each node does not change with the change of the dynamic buried point.
- the index identifier in the view tree can be stable.
- steps in the flowchart of FIG. 2 are sequentially displayed as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these steps is not strictly limited, and the steps may be performed in other sequences. Moreover, at least some of the steps in FIG. 2 may include a plurality of sub-steps or stages, which are not necessarily performed at the same time, but may be executed at different times, the execution of these sub-steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of the other steps.
- the buried point in the dynamic page can be a dynamic buried point, a static buried point, a dynamic buried point, and a static buried point.
- the corresponding buried point category is obtained according to the name of the touched buried point.
- the touched buried point is a dynamic buried point
- the first terminal traverses in the corresponding buried point category to obtain a dynamic identification of the dynamic buried point.
- the first terminal acquires a corresponding path according to the dynamic identifier.
- the touched buried point is a static buried point
- the first terminal traverses in the corresponding buried point category to obtain an index of the static buried point.
- the first terminal uploads the event message of the dynamic burying point to the server by using the path corresponding to the dynamic identifier, and the first terminal uploads the event message of the static burying point to the server by using the path corresponding to the index identifier. Since the dynamic identifier does not affect the index identifier, the first terminal can obtain the corresponding path according to the touched buried point category, regardless of whether the touched static buried point and the touched dynamic buried point belong to the same category. Since the index of the static buried point is not affected by the dynamic identification of the dynamic buried point, not only the path of each buried point in the dynamic page is accurate, but also the path of each buried point in the static page is accurate. Therefore, it is ensured that the path of each buried point is accurate, so that the buried path in each page in the application is accurate.
- multiple pages of the application are pre-set with a buried point to capture a touch event of a buried point in the dynamic page. Since the dynamic burying point is preset with a unique dynamic identifier, when the touched burying point is a dynamic burying point, the first terminal can obtain a dynamic burying point corresponding dynamic identifier, and obtain a corresponding path according to the dynamic identifier, thereby passing the path Dynamically buried touch events are uploaded to the server.
- the first terminal may obtain an index identifier corresponding to the static burying point, and obtain a corresponding path according to the index identifier, so that the touch event of the static burying point is uploaded to the server by using the path. Since the dynamic identification is the unique identifier of the dynamic buried point, and the dynamic does not affect the index identification of the static buried point, the path of each buried point in the application dynamic page is accurate.
- the method further includes: when the dynamic buried point is deleted, acquiring a corresponding buried point category according to the deleted dynamic buried point; acquiring a dynamic identifier corresponding to the remaining buried point in the buried point category; and when the remaining buried point When being touched, the corresponding path is obtained according to the dynamic identifier corresponding to the remaining buried point; and the touch event for generating the buried point is uploaded to the server according to the path corresponding to the dynamic identifier.
- Dynamic budding in dynamic pages can be new or deleted.
- the second terminal can directly set a corresponding dynamic identifier according to the buried point category.
- the dynamic buried point has a corresponding position in the view tree before being deleted. If the second terminal sets the dynamic identification for the dynamic burying point in advance, and sets the index identification for other burying points of the same category, it will cause additional work for the developer, which brings inconvenience to the developer. If the position of the dynamic buried point in the view tree is miscalculated, it may cause the path of other buried points to be disordered.
- the second terminal can acquire the buried point category of the dynamic buried point, and set all the buried points in the buried point category. Corresponding dynamic identification. This avoids the situation where the position of the dynamic buried point in the view tree is miscalculated.
- the first terminal acquires the corresponding burying point category according to the deleted dynamic burying point, and acquires the dynamic identifier corresponding to the remaining burying point in the burying point category.
- the first terminal captures a user operation in the dynamic page, and when the remaining buried point in the dynamic page is touched, acquires a corresponding touch event.
- the first terminal traverses in the submerged point category according to the dynamic identifier corresponding to the remaining buried point, and acquires the corresponding path.
- the first terminal uploads the touch event of the remaining buried point to the server by using the path corresponding to the dynamic identifier.
- the dynamic identifiers corresponding to the plurality of remaining buried points are respectively acquired according to the foregoing manner.
- the first terminal uploads the touch events of the plurality of remaining buried points to the server by using the path corresponding to the dynamic identifier. Therefore, when there is a buried point in the dynamic page, it is still possible to ensure that the path of each buried point is accurate.
- the method further includes: displaying a plurality of sliding views in the dynamic page; the method further comprising: monitoring a change of the dynamic page, acquiring a current view identifier of the currently displayed sliding view; and obtaining a corresponding buried point according to the current view identifier Loading the buried point to the sliding view; obtaining the sliding view adjacent to the currently displayed sliding view to obtain the adjacent view identifier; acquiring the corresponding buried point according to the adjacent view identifier, and loading the obtained buried point to the adjacent one Swipe the view.
- a dynamic page may be provided with a ViewPager control (view slide switching control) and multiple sliding views. Switching between multiple sliding views in a dynamic page can be achieved through the ViewPager control. Different sliding views can reflect different content, and the sliding view can also be configured with corresponding buried points.
- ViewPager control view slide switching control
- the ViewPager control only collects the currently displayed sliding view and the sliding operation of the left and right sliding views, it cannot capture all the sliding operations of the sliding view, in order to ensure that the buried points in the multiple sliding views under the ViewPager control will not be Conflict and coverage, in this embodiment, the buried point of the sliding view is loaded in batches.
- the first terminal monitors the change of the dynamic page, and obtains the view identifier of the sliding view currently displayed in the dynamic page. This view ID can also be referred to as the current view ID.
- the first terminal acquires a sliding view adjacent to the currently displayed sliding view, and obtains a corresponding view identifier, that is, an adjacent view identifier.
- the server obtains the corresponding buried point according to the adjacent view identifier, and loads the obtained buried point into the adjacent sliding view.
- the dynamic page includes five sliding views. If the currently displayed sliding view is view 1, the first terminal loads the buried point of the view 1, and loads the buried point of the view 2. Assuming that the currently displayed sliding view is view 3, the first terminal loads the buried point of view 2 and the buried point of view 4 in addition to the buried point of view 3. Therefore, in the face of multiple sliding views under the ViewPager control, the problem of conflicting and covering between the sliding views is effectively avoided.
- the method before the step of pulling the buried point of the plurality of pages of the application, the method further includes: detecting, by the application, a speed at which the first terminal is shaken; when the speed at which the first terminal is shaken exceeds a threshold, establishing and Communication between the second terminal; drawing a view tree corresponding to the current page, and taking a screenshot of the current page; transmitting a screenshot of the view tree and the current page to the second terminal, so that the second terminal is on the current page according to the screenshot and the view tree Set the buried point in the middle.
- the embedded point of the application may be preset before the application is released, or may be set by the developer at any time through the second terminal as needed.
- the speed at which the first terminal is shaken is detected by the application, and when the speed at which the first terminal is shaken exceeds a threshold, the first terminal transmits a connection request to the second terminal.
- the second terminal receives the link request and returns a request for acquiring the first terminal device information.
- the device information of the first terminal includes a device name, a model, an operating system, and the like.
- the first terminal sends its device information to the second terminal, and the second terminal verifies the device information of the first terminal, and passes the verification to establish a communication connection between the first terminal and the second terminal.
- the second terminal sends a drawing screen request to the first terminal, and the first terminal acquires each node in the current page according to the drawing screen request, draws a view tree corresponding to the current page by using each node, and performs a screenshot on the current page.
- the first terminal transmits the view tree of the current page and the screenshot to the second terminal.
- the second terminal acquires the position and shape of the buryable point according to the view tree and the screenshot.
- the developer queries the corresponding control from the view tree through the second terminal, generates positioning information of the control, and visualizes the current page by using the positioning information of the control and the control.
- the set buried point is uploaded to the server.
- the application can pull the corresponding buried point data in the server, thereby realizing that the buried point of the application can be updated at any time.
- the application includes a React-Native application; the page includes a control; before the step of pulling the buried point of the multiple pages of the application, the method further includes: acquiring a touch event of the control through the Native layer, and touching the event Sending to the React layer for processing; after returning the processed touch event to the Native layer in the React layer, modifying the processing state of the touch event; according to the modified processing state, continuing the touch event to the touched control; The name and path of the touched control, the name and path of the touched control are sent to the second terminal, so that the second terminal sets the buried point according to the name and path of the touched control.
- the application can be either a native application or a hybrid application.
- hybrid applications including React-Native applications.
- React-Native applications when the user touches the control, the Native layer first acquires the touch event and forwards the touch event to the React layer for processing. After the processing of the React layer is finished, the processed trigger event is returned to the Native layer, and the Native layer ends the response to the touch event. As a result, the touch event cannot be continued, making the visual burying scheme unsuitable for the React-Native application.
- the second terminal modifies the native layer code of the application.
- the first terminal modifies the processing state of the touch event at the Native layer. For example, from the end state to the unfinished state. Native passes the touch event to the touched control based on the modified processing state. Thereby the first terminal acquires the control name and path of the touched control. The first terminal sends the obtained control name and path of the touched control to the second terminal. The second terminal visually buryes the control according to the name and path of the touched control. This enables visualization of the buried point settings in the React-Native application.
- the present application also provides a buried point processing apparatus in a dynamic page.
- the apparatus includes a buried point pull module 302, an event capture module 304, a path acquisition module 306, and a communication module 308, each of which may be implemented by software, hardware, or a combination thereof. among them:
- the burying point drawing module 302 is configured to pull a burying point of multiple pages of the application; the page includes a dynamic page, and the burying point includes a static burying point and a dynamic burying point.
- the event capture module 304 is configured to capture a touch event corresponding to a buried point in the dynamic page.
- the path obtaining module 306 is configured to: when the touched buried point is a dynamic buried point, obtain a dynamic buried point corresponding dynamic identifier, and obtain a corresponding path according to the dynamic identifier; when the touched buried point is a static buried point, obtain a static buried The corresponding index of the point is obtained, and the corresponding path is obtained according to the index identifier.
- the communication module 308 is configured to upload a dynamic buried point touch event to the server by using a path corresponding to the dynamic identifier, and upload the static buried point touch event to the server by using the path corresponding to the index identifier.
- the path obtaining module 306 is further configured to: when the dynamic buried point is deleted, acquire a corresponding buried point category according to the deleted dynamic buried point; acquire a dynamic identifier corresponding to the remaining buried point in the buried point category; When the burying point is touched, the corresponding path is obtained according to the dynamic identifier corresponding to the remaining burying point; the uploading module 308 is further configured to upload the touch event for generating the burying point to the server according to the path corresponding to the dynamic identifier.
- the dynamic page includes a plurality of sliding views.
- the device further includes: a monitoring module, configured to monitor a change of the dynamic page, obtain a current view identifier of the currently displayed sliding view, and obtain a corresponding buried according to the current view identifier. Point, load the buried point to the sliding view; obtain the sliding view adjacent to the currently displayed sliding view to obtain the adjacent view identifier; obtain the corresponding buried point according to the adjacent view identifier, and load the obtained buried point to the adjacent Sliding view.
- a monitoring module configured to monitor a change of the dynamic page, obtain a current view identifier of the currently displayed sliding view, and obtain a corresponding buried according to the current view identifier. Point, load the buried point to the sliding view; obtain the sliding view adjacent to the currently displayed sliding view to obtain the adjacent view identifier; obtain the corresponding buried point according to the adjacent view identifier, and load the obtained buried point to the adjacent Sliding view.
- the apparatus further includes: a communication connection module and a synchronization module, wherein:
- the communication connection module is configured to detect, by the application, a speed at which the first terminal is shaken; when the speed at which the first terminal is shaken exceeds a threshold, establishing communication with the second terminal.
- a synchronization module configured to draw a view tree corresponding to the current page, and perform a screenshot on the current page; and transmit a screenshot of the view tree and the current page to the second terminal, so that the second terminal is buried in the current page according to the screenshot and the view tree. point.
- the application includes a React-Native application; the page includes a control; the device further includes: a state modification module, configured to acquire a touch event of the control through the Native layer, and send the touch event to the React layer for processing; After the processed touch event is returned to the Native layer by the React layer, the processing state of the touch event is modified; according to the modified processing state, the touch event is continuously transmitted to the touched control; the name of the touched control is obtained and The communication module is further configured to send the name and path of the touched control to the second terminal, so that the second terminal sets the buried point according to the name and path of the touched control.
- the buried point processing device in the dynamic page described above can be implemented in the form of a computer readable instruction that can be executed on a computer device as shown in FIG.
- the computer device can be a mobile terminal.
- a computer device such as a mobile terminal, including a processor, memory, and network interface connected by a system bus.
- the processor of the computer device is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium, an internal memory.
- the non-volatile storage medium of the computer device stores an operating system and computer readable instructions.
- the internal memory of the computer device provides an environment for the operation of an operating system and computer readable instructions in a non-volatile storage medium.
- the network interface of the computer device is used to communicate with an external terminal via a network connection.
- the computer readable instructions are executed by the processor to implement a buried point processing method in a dynamic page.
- FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation of the computer device to which the solution of the present application is applied.
- the specific computer device may It includes more or fewer components than those shown in the figures, or some components are combined, or have different component arrangements.
- a computer apparatus comprising a memory and one or more processors having stored therein computer readable instructions that, when executed by a processor, cause one or more processors to execute The steps in the various method embodiments described above are implemented.
- one or more computer readable non-volatile storage media having computer readable instructions, when executed by one or more processors, causing one or more processors.
- the steps in the various method embodiments described above are implemented at the time of execution.
- the dysfunctional computer can be readable in a storage medium, which when executed, can include the flow of an embodiment of the methods described above.
- the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
- Stored Programmes (AREA)
Abstract
本申请涉及一种动态页面中的埋点处理方法,所述方法包括:拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括静态埋点和动态埋点;捕捉动态页面中的埋点所对应的触摸事件;当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据所述动态标识获取对应的路径;当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸事件上传至服务器。
Description
本申请要求于2017年11月10日提交中国专利局、申请号为2017111057295、发明名称为“动态页面中的埋点处理方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及计算机技术领域,特别是涉及一种动态页面中的埋点处理方法、装置和计算机设备。
通过在APP(Application,应用程序)中设置埋点,利用埋点采集用户行为已经成为目前用户分析的一种常见方式。APP的页面中包括静态页面和动态页面。静态页面的内容基本上不会发生变化。静态页面中的埋点设置好之后,可以顺利采集到相应的埋点数据。而动态页面中的内容可以随着时间或用户的操作而发生变化,动态页面中的埋点会发生变化。
在传统的方式中,每个页面都可以视为一颗视图树,埋点可以视为视图树中的节点。每个节点可以有相应的路径,采集到的数据可以按照其路径被上传。但是对于在动态页面而言,由于动态页面中的埋点是可以发生变化的,埋点变化之后,视图树中的节点所对应的路径可能会发生错乱,导致上传后的数据与埋点不一致。
发明内容
根据本申请公开的各种实施例,提供一种动态页面中的埋点处理方法、装置、计算机设备和存储介质。
一种动态页面中的埋点处理方法,包括:
拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括 静态埋点和动态埋点;
捕捉动态页面中的埋点所对应的触摸事件;
当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据所述动态标识获取对应的路径;
当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;及
利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸事件上传至服务器。
一种动态页面中的埋点处理装置,包括:
埋点拉取模块,用于拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括静态埋点和动态埋点;
事件捕捉模块,用于捕捉动态页面中的埋点所对应的触摸事件;
路径获取模块,用于当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据所述动态标识获取对应的路径;当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;及
通信模块,用于利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸事件上传至服务器。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:
拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括静态埋点和动态埋点;
捕捉动态页面中的埋点所对应的触摸事件;
当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据 所述动态标识获取对应的路径;
当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;及
利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸事件上传至服务器。
一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括静态埋点和动态埋点;
捕捉动态页面中的埋点所对应的触摸事件;
当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据所述动态标识获取对应的路径;
当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;及
利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸事件上传至服务器。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为一个实施例中动态页面中的埋点处理方法的应用场景图;
图2为一个实施例中动态页面中的埋点处理方法的流程图;
图3为一个实施例中动态页面中的埋点处理装置的框图;
图4为一个实施例中计算机设备的框图。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供动态页面中的埋点处理方法,可以应用于如图1所示的应用环境中。第一终端102通过网络与服务器104进行通信连接。第二终端106通过网络与服务器104进行通信连接。其中,第一终端102可以是移动终端,例如,平板电脑、智能手机、个人数字助理以及可穿戴设备等。第二终端可以是台式电脑和笔记本电脑等。第二终端106对应用程序的多个页面设置了埋点。第二终端106将设置后的埋点数据上传至服务器104。第一终端102上安装了应用程序,当应用程序启动时,第一终端102在服务器104上拉取相应的埋点数据。埋点数据可以包括埋点名称、埋点类别、静态埋点对应的索引标识以及动态埋点对应的动态标识等。第一终端102通过应用程序捕捉用户对页面中的操作,当捕捉到动态页面中的埋点被触摸时,获取该埋点对应的触摸事件。当被触摸的埋点为动态埋点时,第一终端102获取动态埋点对应动态标识,根据动态标识获取对应的路径。当被触摸的埋点为静态埋点时,第一终端102获取静态埋点对应的索引标识,根据索引标识获取对应的路径。第一终端102利用动态标识对应的路径将动态埋点的触摸事件上传至服务器104,第一终端102利用索引标识对应的路径将静态埋点的触摸事件上传至服务器104。由于动态标识是动态埋点的唯一标识,而且动态不会对静态埋点的索引标识产生影响,因此能够确保动态页面中的每个埋点的路径是准确无误的。
在一个实施例中,如图2所示,提供了一种动态页面中的埋点处理方法,以该方法应用于图1中的第一终端为例进行说明,具体包括以下步骤:
步骤202,拉取应用程序多个页面的埋点;页面包括动态页面,埋点包括静态埋点和动态埋点。
步骤204,捕捉动态页面中的埋点所对应的触摸事件。
第一终端中安装了应用程序,应用程序包括多个页面,页面包括静态页面和动态页面。页面中可以包含控件、文本、图片或视频等内容。每个页面可以视为一颗视图树,控件、文本、图片或视频等可以视为视图树中的节点。视图树中的每个节点可以被编号,使得每个节点都可以有相应的索引标识,例如,索引标识可以是索引编号。由于动态页面中的内容可以随着时间或用户操作发生变化,由此会使得动态页面的视图树中的节点发生变化。例如,动态页面在经过预设时间后会新增一个“注册”控件。视图树中的节点可以被设置为页面中的埋点。
对于静态页面中不会发生变化的埋点可以称为静态埋点,对于动态页面中会发生变化的埋点(如新增或被删除的埋点)可以称为动态埋点。开发人员通过第二终端可以对静态埋点以及动态埋点进行可视化设置。第二终端将设置后的埋点数据上传至服务器。应用程序在启动时,可以通过网络从服务器中拉取多个页面的埋点数据。埋点数据可以包括埋点名称、埋点类别、静态埋点对应的索引标识以及动态埋点对应的动态标识等。
第一终端通过应用程序捕捉用户对页面中的操作,当捕捉到动态页面中的埋点被触摸时,获取该埋点对应的触摸事件。
步骤206,当被触摸的埋点为动态埋点时,获取动态埋点对应动态标识,根据动态标识获取对应的路径。
步骤208,当被触摸的埋点为静态埋点时,获取静态埋点对应的索引标识,根据索引标识获取对应的路径。
步骤210,利用动态标识对应的路径将动态埋点的触摸事件上传至服务器,以及利用索引标识对应的路径将静态埋点的触摸事件上传至服务器。
在传统的方式中,页面的视图树中每个节点可以被设置相应的索引标识。每个索引标识具有唯一的路径,第一终端可以通过该路径将埋点对应的触摸事件上传至服务器。例如,某动态页面中的埋点类型为控件的节点有3个,则这3个节点相应的索引标识可以依次为0、1、2。这3个节点可以被设置为静态埋点。当静态埋点被触摸时,第一终端生成相应的事件消息。第一终端获取该静态埋点对应的索引标识,根据索引标识查询该静态埋点对应的路径,将该静态埋点的事件消息按照其路径上传至服务器。如果动态页面中随着用户的操作,增加了一个节点,该节点为动态埋点。新增节点(即动态埋点)在视图树中插入在0节点和1节点之间,则第一终端默认新增节点的索引标识为1,原1节点和原2节点的索引标识相应的变为2和3。由此使得新增节点(即动态埋点)、原1节点和原2节点的路径发生错乱。从而使得新增节点(即动态埋点)、原1节点和原2节点的上传后的数据与埋点不一致。如果动态页面中随着用户的操作删除了一个节点,被删除的节点也是动态埋点。假设该动态埋点的索引标识为1,则删除之后,第一终端默认原2节点索引标识变为1,原2节点的路径也会发生错乱。
本实施例中,研发人员可以通过第二终端对应用程序每个页面中的多个节点预先进行了分类,以此得到多个埋点类别。例如,控件可以为一类别,文本可以为一类别,图片可以为一类别,视频可以为一类别。每个埋点类别都被设置了相应的索引标识。对于动态页面而言,每个埋点类别中的节点都可以包含动态埋点。为了确保每个埋点的路径准确无误,第二终端对每个动态埋点设置了唯一的动态标识。动态标识是与索引标识不同的标识,动态标识可以是埋点名称,也可以是其他标记。动态标识不会发生变化,也不会引起索引标识发生变化。也就是说,对于视图树而言,各个节点的索引标识不会随着动态埋点的变化而变化。视图树中的索引标识可以是稳定的。
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它 的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
动态页面中被触摸的埋点可以是动态埋点,也可以是静态埋点,也可以是动态埋点以及静态埋点。第一终端捕捉到被触摸的埋点后,根据被触摸的埋点的名称获取对应的埋点类别。当被触摸的埋点为动态埋点时,第一终端在相应的埋点类别中进行遍历,得到动态埋点的动态标识。第一终端根据动态标识获取对应的路径。当被触摸的埋点为静态埋点时,第一终端在相应的埋点类别中进行遍历,得到静态埋点的索引标识。第一终端利用动态标识对应的路径将动态埋点的事件消息上传至服务器,第一终端利用索引标识对应的路径将静态埋点的事件消息上传至服务器。由于动态标识不会对索引标识造成影响,因此不论被触摸的静态埋点与被触摸的动态埋点是否属于同一类别,第一终端都可以按照被触摸的埋点类别获取到相应的路径。由于静态埋点的索引标识不会被动态埋点的动态标识所影响,不仅使得动态页面中的每个埋点的路径准确无误,而且使得静态页面中的每个埋点的路径准确无误。因此能够确保每个埋点的路径是准确无误的,从而实现了应用程序中每个页面中的埋点路径准确无误。
本实施例中,应用程序的多个页面预先设置了埋点,捕捉动态页面中的埋点的触摸事件。由于动态埋点被预先设置了唯一的动态标识,当被触摸的埋点为动态埋点时,第一终端可以获取动态埋点对应动态标识,根据动态标识获取到相应路径,从而通过该路径将动态埋点的触摸事件上传至服务器。当被触摸的埋点为静态埋点时,第一终端可以获取静态埋点对应的索引标识,根据索引标识获取到相应路径,从而利用该路径将静态埋点的触摸事件上传至服务器。由于动态标识是动态埋点的唯一标识,而且动态不会对静态埋点的索引标识产生影响,由此实现了应用程序动态页面中每个埋点的路径准确 无误。
在一个实施例中,该方法还包括:当动态埋点被删除时,根据被删除的动态埋点获取对应的埋点类别;获取埋点类别中剩余埋点对应的动态标识;当剩余埋点被触摸时,根据剩余埋点对应的动态标识获取对应的路径;根据动态标识对应的路径将生成埋点的触摸事件上传至服务器。
动态页面中的动态埋点可以是新增的,也可以是被删除的。对于新增的动态埋点,第二终端可以根据所属的埋点类别直接为其设置相应的动态标识。对于被删除的动态埋点,在被删除之前,该动态埋点在视图树中具有相应的位置。如果第二终端预先为该动态埋点设置动态标识,而对同类别的其他埋点设置索引标识,会给开发人员造成额外的工作,给开发人员带来不便。如果动态埋点在视图树中的位置被误算,则可能导致其他埋点的路径错乱。
为了确保每个埋点的路径准确无误,当动态页面中存在被删除的动态埋点时,第二终端可以获取该动态埋点的埋点类别,对该埋点类别中的所有埋点都设置相应的动态标识。由此避免了动态埋点在视图树中的位置为误算的情形。当第一终端中的动态页面随着用户操作删除了某个动态埋点后,第一终端根据被删除的动态埋点获取对应的埋点类别,获取埋点类别中剩余埋点对应的动态标识。第一终端对该动态页面中的用户操作进行捕捉,当该动态页面中的剩余埋点被触摸时,获取对应的触摸事件。第一终端根据剩余埋点对应的动态标识在其所属埋点类别中进行遍历,获取对应的路径。第一终端利用动态标识对应的路径将剩余埋点的触摸事件上传至服务器。当该动态页面中有多个剩余埋点被触摸时,按照上述方式,分别获取多个剩余埋点对应的动态标识。第一终端利用动态标识对应的路径将多个剩余埋点的触摸事件上传至服务器。由此在动态页面中存在被删除的埋点时,依然能够确保每个埋点的路径准确无误。
在一个实施例中,该方法还包括:动态页面中包括多个滑动视图;方法还包括:监测动态页面的变化,获取当前显示的滑动视图的当前视图标识;根据当前视图标识获取对应的埋点,将埋点加载至滑动视图;获取与当前显 示的滑动视图相邻的滑动视图,得到相邻视图标识;根据相邻视图标识获取对应的埋点,将获取到的埋点加载至相邻的滑动视图。
本实施例中,动态页面中可以设置有ViewPager控件(视图滑动切换控件)以及多个滑动视图。通过ViewPager控件可以实现动态页面中的多个滑动视图的切换。不同的滑动视图可以反映不同的内容,滑动视图中还可以被配置相应的埋点。
由于ViewPager控件只对当前显示的滑动视图以及左右两边的滑动视图的触摸操作进行采集,并不能对所有的滑动视图的触摸操作进行采集,为了确保ViewPager控件下多个滑动视图内的埋点不会冲突和覆盖,本实施例中对滑动视图的埋点分批加载。具体的,第一终端对动态页面的变化进行监测,获取动态页面中当前显示的滑动视图的视图标识。该视图标识也可以称为当前视图标识。第一终端获取与当前显示的滑动视图相邻的滑动视图,得到对应的视图标识,即相邻视图标识。服务器根据相邻视图标识获取对应的埋点,将获取到的埋点加载至相邻的滑动视图。例如,动态页面中包括5个滑动视图,假设当前显示的滑动视图为视图1,则第一终端加载视图1的埋点,以及加载视图2的埋点。假设当前显示的滑动视图为视图3,则第一终端除了加载视图3的埋点之外,还加载视图2的埋点以及视图4的埋点。由此在面对ViewPager控件下的多个滑动视图时,有效避免了滑动视图之间的埋点相互冲突以及覆盖的问题。
在一个实施例中,在拉取应用程序多个页面的埋点的步骤之前,还包括:通过应用程序检测第一终端被摇晃的速度;当第一终端被摇晃的速度超过阈值时,建立与第二终端之间的通信;绘制当前页面对应的视图树,以及对当前页面进行截图;将视图树与当前页面的截图传输至第二终端,以使得第二终端根据截图与视图树在当前页面中设置埋点。
本实施例中,应用程序的埋点可以是在应用程序发布之前预先设置好的,还可以是开发人员根据需要通过第二终端随时进行设置的。
通过应用程序检测第一终端被摇晃的速度,当第一终端被摇晃的速度超 过阈值时,第一终端向第二终端发送连接请求。第二终端接收该链接请求,返回获取第一终端设备信息的请求。第一终端的设备信息包括设备名称、型号和操作系统等。第一终端将其设备信息发送至第二终端,第二终端对第一终端的设备信息进行验证,验证通过,建立第一终端与第二终端之间的通信连接。
第二终端向第一终端发送绘制屏幕请求,第一终端根据绘制屏幕请求获取当前页面中的各个节点,利用各个节点绘制当前页面对应的视图树,以及对当前页面进行截图。第一终端将当前页面的视图树以及截图传输至第二终端。由此使得第一终端中的应用程序的页面与第二终端中的Web页面同步。第二终端根据视图树和截图,获取可埋点的位置和形状。开发人员通过第二终端从视图树中查询相应的控件、生成控件的定位信息,利用该控件及控件的定位信息对当前页面进行可视化埋点。设置后的埋点被上传至服务器。第一终端启动应用程序时,应用程序可以在服务器拉取相应的埋点数据,由此实现了应用程序的埋点能够随时进行更新。
在一个实施例中,应用程序包括React-Native应用程序;页面中包括控件;在拉取应用程序多个页面的埋点的步骤之前,还包括:通过Native层获取控件的触摸事件,将触摸事件发送至React层进行处理;在React层将处理后的触摸事件返回至Native层后,对触摸事件的处理状态进行修改;根据修改后的处理状态,将触摸事件继续传递至被触摸的控件;获取被触摸的控件的名称和路径,将被触摸的控件的名称和路径发送至第二终端,以使得第二终端根据被触摸的控件的名称和路径设置埋点。
应用程序可以是原生应用程序,也可以是混合应用程序。其中混合应用程序包括React-Native应用程序。在传统的React-Native应用程序中,当用户触摸控件后,Native层首先获取触摸事件,将触摸事件转发给React层处理。待React层处理结束后将处理后的触发事件返回至Native层,Native层结束对触摸事件的继续响应。由此使得触摸事件无法继续执行,从而使得可视化埋点方案无法适用于React-Native应用程序。
本实施例中,第二终端对应用程序的Native层代码进行了修改。当React层向Native层返回处理后的触发事件时,第一终端对触摸事件在Native层的处理状态进行修改。例如,由结束状态修改为未结束状态。Native根据修改后的处理状态将触摸事件继续传递至被触摸的控件。由此使得第一终端获取到被触摸控件的控件名称和路径。第一终端将获取的被触摸控件的控件名称和路径发送至第二终端。第二终端根据被触摸的控件的名称和路径对该控件进行可视化埋点设置。由此实现了React-Native应用程序中的可视化埋点设置。
如图3所示,本申请还提供了一种动态页面中的埋点处理装置。在一个实施例中,该装置包括:埋点拉取模块302、事件捕捉模块304、路径获取模块306和通信模块308,每个模块可以通过软件、硬件或其组合来实现。其中:
埋点拉取模块302,用于拉取应用程序多个页面的埋点;页面包括动态页面,埋点包括静态埋点和动态埋点。
事件捕捉模块304,用于捕捉动态页面中的埋点所对应的触摸事件。
路径获取模块306,用于当被触摸的埋点为动态埋点时,获取动态埋点对应动态标识,根据动态标识获取对应的路径;当被触摸的埋点为静态埋点时,获取静态埋点对应的索引标识,根据索引标识获取对应的路径。
通信模块308,用于利用动态标识对应的路径将动态埋点的触摸事件上传至服务器,以及利用索引标识对应的路径将静态埋点的触摸事件上传至服务器。
在一个实施例中,路径获取模块306还用于当动态埋点被删除时,根据被删除的动态埋点获取对应的埋点类别;获取埋点类别中剩余埋点对应的动态标识;当剩余埋点被触摸时,根据剩余埋点对应的动态标识获取对应的路径;上传模块308还用于根据动态标识对应的路径将生成埋点的触摸事件上传至服务器。
在一个实施例中,动态页面中包括多个滑动视图;该装置还包括:监测 模块,用于监测动态页面的变化,获取当前显示的滑动视图的当前视图标识;根据当前视图标识获取对应的埋点,将埋点加载至滑动视图;获取与当前显示的滑动视图相邻的滑动视图,得到相邻视图标识;根据相邻视图标识获取对应的埋点,将获取到的埋点加载至相邻的滑动视图。
在一个实施例中,该装置还包括:通信连接模块和同步模块,其中:
通信连接模块,用于通过应用程序检测第一终端被摇晃的速度;当第一终端被摇晃的速度超过阈值时,建立与第二终端之间的通信。
同步模块,用于绘制当前页面对应的视图树,以及对当前页面进行截图;将视图树与当前页面的截图传输至第二终端,以使得第二终端根据截图与视图树在当前页面中设置埋点。
在一个实施例中,应用程序包括React-Native应用程序;页面中包括控件;该装置还包括:状态修改模块,用于通过Native层获取控件的触摸事件,将触摸事件发送至React层进行处理;在React层将处理后的触摸事件返回至Native层后,对触摸事件的处理状态进行修改;根据修改后的处理状态,将触摸事件继续传递至被触摸的控件;获取被触摸的控件的名称和路径;通信模块还用于将被触摸的控件的名称和路径发送至第二终端,以使得第二终端根据被触摸的控件的名称和路径设置埋点。
上述的动态页面中的埋点处理装置可以实现为一种计算机可读指令的形式,计算机可读指令可在如图4所示的计算机设备上运行。其中,计算机设备可以是一种移动终端。
在一个实施例中,提供了一种计算机设备,如移动终端,如图4所示,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该计算机设备的非易失性存储介质存储有操作系统和和计算机可读指令。该计算机设备的内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时 以实现一种动态页面中的埋点处理方法。本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行时实现上述各个方法实施例中的步骤。
在一个实施例中,提供了一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行时实现上述各个方法实施例中的步骤。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一个或多个非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。
Claims (20)
- 一种动态页面中的埋点处理方法,包括:拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括静态埋点和动态埋点;捕捉动态页面中的埋点所对应的触摸事件;当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据所述动态标识获取对应的路径;当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;及利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸事件上传至服务器。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:当动态埋点被删除时,根据被删除的动态埋点获取对应的埋点类别;获取所述埋点类别中剩余埋点对应的动态标识;当剩余埋点被触摸时,根据所述剩余埋点对应的动态标识获取对应的路径;及根据所述动态标识对应的路径将生成埋点的触摸事件上传至服务器。
- 根据权利要求1所述的方法,其特征在于,所述动态页面中包括多个滑动视图;所述方法还包括:监测所述动态页面的变化,获取当前显示的滑动视图的当前视图标识;根据所述当前视图标识获取对应的埋点,将所述埋点加载至所述滑动视图;获取与当前显示的滑动视图相邻的滑动视图,得到相邻视图标识;及根据所述相邻视图标识获取对应的埋点,将获取到的埋点加载至相邻的滑动视图。
- 根据权利要求1所述的方法,其特征在于,在所述拉取应用程序多个 页面的埋点的步骤之前,还包括:通过应用程序检测第一终端被摇晃的速度;当所述第一终端被摇晃的速度超过阈值时,建立与第二终端之间的通信;绘制当前页面对应的视图树,以及对所述当前页面进行截图;及将所述视图树与所述当前页面的截图传输至所述第二终端,以使得所述第二终端根据所述截图与所述视图树在当前页面中设置埋点。
- 根据权利要求1所述的方法,其特征在于,所述应用程序包括React-Native应用程序;所述页面中包括控件;在所述拉取应用程序多个页面的埋点的步骤之前,还包括:通过Native层获取控件的触摸事件,将所述触摸事件发送至React层进行处理;在React层将处理后的触摸事件返回至Native层后,对所述触摸事件的处理状态进行修改;根据修改后的处理状态,将所述触摸事件继续传递至被触摸的控件;及获取所述被触摸的控件的名称和路径,将所述被触摸的控件的名称和路径发送至第二终端,以使得所述第二终端根据所述被触摸的控件的名称和路径设置埋点。
- 一种动态页面中的埋点处理装置,其特征在于,包括:埋点拉取模块,用于拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括静态埋点和动态埋点;事件捕捉模块,用于捕捉动态页面中的埋点所对应的触摸事件;路径获取模块,用于当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据所述动态标识获取对应的路径;当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;及通信模块,用于利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸 事件上传至服务器。
- 根据权利要求6所述的装置,其特征在于,所述路径获取模块还用于当动态埋点被删除时,根据被删除的动态埋点获取对应的埋点类别;获取所述埋点类别中剩余埋点对应的动态标识;当剩余埋点被触摸时,根据所述剩余埋点对应的动态标识获取对应的路径;及所述上传模块还用于根据所述动态标识对应的路径将生成埋点的触摸事件上传至服务器。
- 根据权利要求6所述的装置,其特征在于,所述装置还包括:通信连接模块,用于通过应用程序检测第一终端被摇晃的速度;当所述第一终端被摇晃的速度超过阈值时,建立与第二终端之间的通信;及同步模块,用于绘制当前页面对应的视图树,以及对所述当前页面进行截图;将所述视图树与所述当前页面的截图传输至所述第二终端,以使得所述第二终端根据所述截图与所述视图树在当前页面中设置埋点。
- 根据权利要求6所述的装置,其特征在于,所述动态页面中包括多个滑动视图;所述装置还包括:监测模块,用于监测所述动态页面的变化,获取当前显示的滑动视图的当前视图标识;根据所述当前视图标识获取对应的埋点,将所述埋点加载至所述滑动视图;获取与当前显示的滑动视图相邻的滑动视图,得到相邻视图标识;根据所述相邻视图标识获取对应的埋点,将获取到的埋点加载至相邻的滑动视图。
- 根据权利要求6所述的装置,其特征在于,所述应用程序包括React-Native应用程序;页面中包括控件;所述装置还包括:状态修改模块,用于通过Native层获取控件的触摸事件,将触摸事件发送至React层进行处理;在React层将处理后的触摸事件返回至Native层后,对触摸事件的处理状态进行修改;根据修改后的处理状态,将触摸事件继续传递至被触摸的控件;获取被触摸的控件的名称和路径;通信模块还用于将被触摸的控件的名称和路径发送至第二终端,以使得第二终端根据被触摸的控件的名称和路径设置埋点。
- 一种计算机设备,包括存储器和一个或多个处理器,所述存储器中 储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括静态埋点和动态埋点;捕捉动态页面中的埋点所对应的触摸事件;当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据所述动态标识获取对应的路径;当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;及利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸事件上传至服务器。
- 根据权利要求11所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器还执行以下步骤:当动态埋点被删除时,根据被删除的动态埋点获取对应的埋点类别;获取所述埋点类别中剩余埋点对应的动态标识;当剩余埋点被触摸时,根据所述剩余埋点对应的动态标识获取对应的路径;及根据所述动态标识对应的路径将生成埋点的触摸事件上传至服务器。
- 根据权利要求11所述的计算机设备,其特征在于,所述动态页面中包括多个滑动视图;所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器还执行以下步骤:监测所述动态页面的变化,获取当前显示的滑动视图的当前视图标识;根据所述当前视图标识获取对应的埋点,将所述埋点加载至所述滑动视图;获取与当前显示的滑动视图相邻的滑动视图,得到相邻视图标识;及根据所述相邻视图标识获取对应的埋点,将获取到的埋点加载至相邻的 滑动视图。
- 根据权利要求11-13任一项所述的计算机设备,其特征在于,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器还执行以下步骤:通过应用程序检测第一终端被摇晃的速度;当所述第一终端被摇晃的速度超过阈值时,建立与第二终端之间的通信;绘制当前页面对应的视图树,以及对所述当前页面进行截图;及将所述视图树与所述当前页面的截图传输至所述第二终端,以使得所述第二终端根据所述截图与所述视图树在当前页面中设置埋点。
- 根据权利要求14所述的计算机设备,其特征在于,所述应用程序包括React-Native应用程序;所述页面中包括控件;所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器还执行以下步骤:通过Native层获取控件的触摸事件,将所述触摸事件发送至React层进行处理;在React层将处理后的触摸事件返回至Native层后,对所述触摸事件的处理状态进行修改;根据修改后的处理状态,将所述触摸事件继续传递至被触摸的控件;及获取所述被触摸的控件的名称和路径,将所述被触摸的控件的名称和路径发送至第二终端,以使得所述第二终端根据所述被触摸的控件的名称和路径设置埋点。
- 一个或多个存储有计算机可读指令的计算机可读非易失性存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:拉取应用程序多个页面的埋点;所述页面包括动态页面,所述埋点包括静态埋点和动态埋点;捕捉动态页面中的埋点所对应的触摸事件;当被触摸的埋点为动态埋点时,获取所述动态埋点对应动态标识,根据 所述动态标识获取对应的路径;当被触摸的埋点为静态埋点时,获取所述静态埋点对应的索引标识,根据所述索引标识获取对应的路径;及利用所述动态标识对应的路径将所述动态埋点的触摸事件上传至服务器,以及利用所述索引标识对应的路径将所述静态埋点的触摸事件上传至服务器。
- 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:当动态埋点被删除时,根据被删除的动态埋点获取对应的埋点类别;获取所述埋点类别中剩余埋点对应的动态标识;当剩余埋点被触摸时,根据所述剩余埋点对应的动态标识获取对应的路径;及根据所述动态标识对应的路径将生成埋点的触摸事件上传至服务器。
- 根据权利要求16所述的存储介质,其特征在于,所述动态页面中包括多个滑动视图;所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:监测所述动态页面的变化,获取当前显示的滑动视图的当前视图标识;根据所述当前视图标识获取对应的埋点,将所述埋点加载至所述滑动视图;获取与当前显示的滑动视图相邻的滑动视图,得到相邻视图标识;及根据所述相邻视图标识获取对应的埋点,将获取到的埋点加载至相邻的滑动视图。
- 根据权利要求16-18任一项所述的存储介质,其特征在于,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:通过应用程序检测第一终端被摇晃的速度;当所述第一终端被摇晃的速度超过阈值时,建立与第二终端之间的通信;绘制当前页面对应的视图树,以及对所述当前页面进行截图;及将所述视图树与所述当前页面的截图传输至所述第二终端,以使得所述第二终端根据所述截图与所述视图树在当前页面中设置埋点。
- 根据权利要求19所述的存储介质,其特征在于,所述应用程序包括React-Native应用程序;所述页面中包括控件;所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:通过Native层获取控件的触摸事件,将所述触摸事件发送至React层进行处理;在React层将处理后的触摸事件返回至Native层后,对所述触摸事件的处理状态进行修改;根据修改后的处理状态,将所述触摸事件继续传递至被触摸的控件;及获取所述被触摸的控件的名称和路径,将所述被触摸的控件的名称和路径发送至第二终端,以使得所述第二终端根据所述被触摸的控件的名称和路径设置埋点。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201711105729.5A CN107832218B (zh) | 2017-11-10 | 2017-11-10 | 动态页面中的埋点处理方法、装置和计算机设备 |
| CN201711105729.5 | 2017-11-10 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2019091017A1 true WO2019091017A1 (zh) | 2019-05-16 |
Family
ID=61654079
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/077007 Ceased WO2019091017A1 (zh) | 2017-11-10 | 2018-02-23 | 动态页面中的埋点处理方法、装置和计算机设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN107832218B (zh) |
| WO (1) | WO2019091017A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114064425A (zh) * | 2020-08-02 | 2022-02-18 | 北京大杏科技有限责任公司 | 动态打点方法及装置 |
| CN114741251A (zh) * | 2021-01-07 | 2022-07-12 | 腾讯科技(深圳)有限公司 | 埋点的处理方法、装置、电子设备及计算机可读存储介质 |
Families Citing this family (21)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110489597A (zh) * | 2018-05-10 | 2019-11-22 | 华为技术有限公司 | 一种获取数据的方法和终端设备 |
| CN108733548A (zh) * | 2018-05-23 | 2018-11-02 | 北京五八信息技术有限公司 | 一种埋点设置方法、装置、设备及计算机可读存储介质 |
| CN109101425B (zh) * | 2018-08-14 | 2021-12-07 | 创新先进技术有限公司 | 一种动态化的页面ab测试的指标埋点方法和装置 |
| CN109521919B (zh) * | 2018-10-17 | 2022-03-01 | 深圳壹账通智能科技有限公司 | 基于浮层界面的埋点方法、装置、设备及存储介质 |
| CN109933317B (zh) * | 2018-12-24 | 2023-04-11 | 创新先进技术有限公司 | 埋点方法、装置、服务器及可读存储介质 |
| CN111435298A (zh) * | 2019-01-11 | 2020-07-21 | 北京京东尚科信息技术有限公司 | 埋点方法、装置、电子设备、存储介质 |
| CN111651336B (zh) * | 2019-03-04 | 2022-02-18 | 腾讯科技(深圳)有限公司 | 一种数据上报方法及装置 |
| CN111723134B (zh) * | 2019-03-19 | 2025-03-18 | 北京京东尚科信息技术有限公司 | 信息处理方法、装置、电子设备及存储介质 |
| CN109960633A (zh) * | 2019-03-28 | 2019-07-02 | 深圳市跃动运营科技有限公司 | 一种数据可视化埋点方法、存储介质及智能终端 |
| CN110175453B (zh) * | 2019-05-16 | 2021-07-16 | 珠海天燕科技有限公司 | 一种判断作弊操作的方法和装置 |
| CN110659191B (zh) * | 2019-09-02 | 2023-07-18 | 深圳市铭数信息有限公司 | 埋点数据分析方法、装置、计算机设备和存储介质 |
| CN110909284A (zh) * | 2019-10-11 | 2020-03-24 | 口碑(上海)信息技术有限公司 | 一种数据处理系统以及方法 |
| CN110795325B (zh) * | 2019-10-30 | 2022-09-23 | 贵阳山恩科技有限公司 | 一种可视化埋点方法、装置、设备和存储介质 |
| CN111552620B (zh) * | 2020-04-03 | 2023-07-11 | 北京字节跳动网络技术有限公司 | 数据获取方法、装置、终端及存储介质 |
| CN111597422B (zh) * | 2020-05-14 | 2025-08-22 | 腾讯科技(深圳)有限公司 | 埋点映射方法、装置、计算机设备和存储介质 |
| CN111736918B (zh) * | 2020-06-12 | 2023-11-28 | 北京字节跳动网络技术有限公司 | 埋点配置方法、装置及电子设备 |
| CN111866158B (zh) * | 2020-07-28 | 2021-06-18 | 企查查科技有限公司 | 路由方法、装置、计算机设备和存储介质 |
| CN112035722B (zh) * | 2020-08-04 | 2023-10-13 | 北京启明星辰信息安全技术有限公司 | 提取动态网页信息的方法、装置及计算机可读存储介质 |
| CN112817790B (zh) * | 2021-03-02 | 2024-06-28 | 腾讯音乐娱乐科技(深圳)有限公司 | 模拟用户行为的方法 |
| CN114548831B (zh) * | 2022-04-21 | 2022-08-05 | 深圳市龙光云众智慧科技有限公司 | 一种评价报告的生成方法、装置、电子设备及存储介质 |
| CN115269093B (zh) * | 2022-07-29 | 2026-03-06 | 抖音视界有限公司 | 一种页面的检测方法、装置、计算机设备及可读存储介质 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090150767A1 (en) * | 2007-12-06 | 2009-06-11 | Fujitsu Limited | Server having dynamic web page creating function |
| CN106598868A (zh) * | 2016-12-24 | 2017-04-26 | 上海亿账通互联网科技有限公司 | 对客户端的应用程序动态埋点的方法及系统 |
| CN106776247A (zh) * | 2016-11-23 | 2017-05-31 | 腾云天宇科技(北京)有限公司 | 一种监控应用中控件的方法、服务器及系统 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107609135B (zh) * | 2012-09-03 | 2020-08-21 | 阿里巴巴集团控股有限公司 | 页面元素确定方法及设备、用户行为路径确定方法及装置 |
| CN104572043B (zh) * | 2013-10-16 | 2018-01-19 | 阿里巴巴集团控股有限公司 | 一种对客户端应用的控件进行实时埋点的方法及装置 |
| CN105975599B (zh) * | 2016-05-11 | 2020-01-07 | 北京京东金融科技控股有限公司 | 一种监测网站的页面埋点的方法和装置 |
| CN106571949A (zh) * | 2016-09-23 | 2017-04-19 | 北京五八信息技术有限公司 | 埋点处理方法及装置 |
| CN106970873B (zh) * | 2017-01-10 | 2021-07-09 | 创新先进技术有限公司 | 线上mock测试方法、装置及系统 |
-
2017
- 2017-11-10 CN CN201711105729.5A patent/CN107832218B/zh active Active
-
2018
- 2018-02-23 WO PCT/CN2018/077007 patent/WO2019091017A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090150767A1 (en) * | 2007-12-06 | 2009-06-11 | Fujitsu Limited | Server having dynamic web page creating function |
| CN106776247A (zh) * | 2016-11-23 | 2017-05-31 | 腾云天宇科技(北京)有限公司 | 一种监控应用中控件的方法、服务器及系统 |
| CN106598868A (zh) * | 2016-12-24 | 2017-04-26 | 上海亿账通互联网科技有限公司 | 对客户端的应用程序动态埋点的方法及系统 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114064425A (zh) * | 2020-08-02 | 2022-02-18 | 北京大杏科技有限责任公司 | 动态打点方法及装置 |
| CN114741251A (zh) * | 2021-01-07 | 2022-07-12 | 腾讯科技(深圳)有限公司 | 埋点的处理方法、装置、电子设备及计算机可读存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107832218B (zh) | 2019-03-12 |
| CN107832218A (zh) | 2018-03-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2019091017A1 (zh) | 动态页面中的埋点处理方法、装置和计算机设备 | |
| AU2017201395B9 (en) | Content item-centric conversation aggregation in shared folder backed integrated workspaces | |
| JP6082005B2 (ja) | ゼロクリック写真アップロード | |
| JP6243038B2 (ja) | 複数のデバイス及び複数のユーザにわたるサーバサイドのストレージと断続的なネットワーク接続中のローカルの仮想的な状態を維持するシステム及び方法 | |
| US10153995B2 (en) | Method and apparatus for effecting web page access in a plurality of media applications | |
| US11385788B2 (en) | Sharing a file with a single contact | |
| US20150067536A1 (en) | Gesture-based Content Sharing Between Devices | |
| CN114793285B (zh) | 信息显示方法、装置、设备及介质 | |
| JP2016533609A (ja) | モバイルデバイス上での、クラウドベースのコンテンツマネージメントシステムへのアクセスの提供 | |
| US10341397B2 (en) | Non-transitory computer readable medium, information processing apparatus, and information processing system for recording minutes information | |
| CN112817493B (zh) | 内容共享方法、装置、计算机设备及存储介质 | |
| CN106572139A (zh) | 多终端控制方法、终端、服务器和系统 | |
| CN102662591B (zh) | 数据处理方法和装置 | |
| US20240086360A1 (en) | File saving method and electronic device | |
| WO2022188386A1 (zh) | 视频发布方法及装置、设备 | |
| CN112764857A (zh) | 信息处理方法、装置及电子设备 | |
| WO2014002812A1 (ja) | 端末装置及びアノテーション方法並びにコンピュータシステム及びコンピュータプログラム | |
| CN107102937B (zh) | 一种用户界面测试方法和装置 | |
| WO2018049879A1 (zh) | 数据迁移方法及装置 | |
| CN111159593A (zh) | 流程图的生成方法、装置、存储介质和电子设备 | |
| CN108476152B (zh) | 用于将由移动计算装置捕捉的媒体附加到电子文档的技术 | |
| WO2018049880A1 (zh) | 数据迁移方法及装置 | |
| CN109033393A (zh) | 贴纸处理方法、装置、存储介质及电子设备 | |
| CN114581580A (zh) | 渲染图像的方法、装置、存储介质及电子设备 | |
| CN106547485B (zh) | 数据迁移方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18876855 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.09.2020) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18876855 Country of ref document: EP Kind code of ref document: A1 |