Data reporting method and device, equipment, storage medium and program product
By using Post requests to report data buried in the preset interface protocol supported by the browser, the problem of insufficient data length limitation and security in the existing technology is solved, and the efficiency and security of data reporting are improved.
Patent Information
- Application Number
- CN202311656821.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-05
- Publication Date
- 2024-11-15
AI Technical Summary
In the existing buried point reporting method, Get request has low data reporting efficiency and poor security due to data length limitations and security issues.
When the browser supports preset interface protocol, data reporting is carried out using Post requests to avoid URL encoding and improve data security and reporting efficiency.
Through the characteristics of Post request, the problem that the length of the string reporting of Get requests is limited by the URL length is solved, and the security and efficiency of data reporting are improved.
Smart Images

Figure CN118964150A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data reporting method, device, equipment, storage medium and program product. Background Art
[0002] Tracking reporting is a common data collection and analysis method, mainly used to understand user operations, application usage, etc. Tracking refers to embedding specific code modules in applications to capture user operations and system events. These data are uploaded to the backend server for analysis to obtain valuable information to optimize products, improve user experience, or make other business decisions.
[0003] In the related technology, a unified tracking point reporting service is adopted, and a Get request is used based on a unified Application Programming Interface (API) to report click events, exposure events, etc. Based on this data reporting method, in order to accurately report the page dwell time before the page route jumps and not lose the tracking point request, a route delay of 300 milliseconds (ms) is designed to jump.
[0004] However, since the Get request uses a Uniform Resource Locator (URL) to encode data, there are data length limitations and data security issues, and the efficiency of data reporting is low and the security is poor. Summary of the invention
[0005] The embodiments of the present application provide a data reporting method, apparatus, device, storage medium and program product, which can improve the efficiency of data reporting. The technical solution is as follows.
[0006] On the one hand, a data reporting method is provided, the method comprising:
[0007] Running a first webpage through a browser, wherein the first webpage includes a tracking program, and the tracking program is used to report tracking data based on the first webpage;
[0008] In response to the tracking program being triggered, obtaining the tracking data recorded by the first web page;
[0009] In the case where the browser supports the preset interface protocol, the buried data is reported based on a first reporting method. The preset interface protocol stipulates the first reporting method, and the first reporting method is a method of submitting a Post request to report data.
[0010] In another aspect, a data reporting device is provided, the device comprising:
[0011] A processing module, used to run a first webpage through a browser, wherein the first webpage includes a tracking program, and the tracking program is used to report tracking data based on the tracking data recorded on the first webpage;
[0012] The processing module is further configured to obtain the tracking data recorded by the first web page in response to the tracking program being triggered;
[0013] The processing module is also used to report the buried data based on a first reporting method when the browser supports the preset interface protocol. The preset interface protocol stipulates the first reporting method, and the first reporting method is a method of submitting a Post request to report data.
[0014] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data reporting method as described in any of the above-mentioned embodiments of the present application.
[0015] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the data reporting method as described in any of the above-mentioned embodiments of the present application.
[0016] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the data reporting method described in any of the above embodiments.
[0017] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0018] By reporting the buried data based on the first reporting method of using Post request to report data specified in the preset interface protocol when the browser supports the preset interface protocol, the buried data reporting method of the first web page is optimized. Based on the characteristics of the Post request, there is no need to use URL encoding in the data reporting process, thereby avoiding data security issues caused by data exposure in the URL. At the same time, the problem that the length of the string reported by the Get request is limited by the URL length is solved, thereby improving data security and the amount of reported data in the data reporting process, thereby improving data reporting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 It is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0021] Figure 2 is a flow chart of a data reporting method provided by an exemplary embodiment of the present application;
[0022] Figure 3 It is a schematic diagram of a data reporting process provided by an exemplary embodiment of the present application;
[0023] Figure 4 is a flow chart of a method for batch reporting of data provided by an exemplary embodiment of the present application;
[0024] Figure 5 It is a schematic diagram of a data batch reporting process provided by an exemplary embodiment of the present application;
[0025] Figure 6 is a flow chart of a data reporting logic update method provided by an exemplary embodiment of the present application;
[0026] Figure 7 It is a schematic diagram of a data reporting logic update process provided by an exemplary embodiment of the present application;
[0027] Figure 8 is a data reporting interaction flow chart provided by an exemplary embodiment of the present application;
[0028] Fig. 9 is a schematic diagram of a data reporting request provided by an exemplary embodiment of the present application;
[0029] Fig.10is a structural block diagram of a data reporting device provided by an exemplary embodiment of the present application;
[0030] Fig.11 is a structural block diagram of a data reporting device module provided by an exemplary embodiment of the present application;
[0031] Fig.12 It is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0033] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0034] Tracking point reporting is a common data collection and analysis method, mainly used to understand user operations, application usage, etc. Tracking point refers to embedding a specific code module in the application to capture user operations and system events. This data is uploaded to the back-end server for analysis to obtain valuable information to optimize products, improve user experience, or make other business decisions. In the related technology, a unified tracking point reporting service is adopted, and a Get request is used based on a unified API to report click events, exposure events, etc. Based on this data reporting method, in order to accurately report the page dwell time before the page route jumps, and not to lose the tracking point request, the route delay jump is designed to be 300 milliseconds. However, since the Get request uses URL for data encoding, there is a data length limit and data security issues, the efficiency of data reporting is low and the security is poor.
[0035] The data reporting method provided in the embodiment of the present application optimizes the data reporting method of the first web page by reporting the buried data in a first reporting method based on the preset interface protocol using a Post request to report data when the browser supports the preset interface protocol. Based on the characteristics of the Post request, there is no need to use URL encoding in the data reporting process, thereby avoiding data security issues caused by data exposure in the URL. At the same time, it solves the problem that the length of the reporting string of the Get request is limited by the URL length, thereby improving data security and the amount of reported data in the data reporting process, thereby improving data reporting efficiency.
[0036] First, let's introduce the implementation environment of this application. Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, wherein the implementation environment includes: a terminal 110, a server 120 and a communication network 130.
[0037] The terminal 110 is used to run the first webpage through a browser, the server 120 is used to provide background services for the first webpage, and the terminal 110 and the server 120 perform data transmission through a communication network 130 .
[0038] In some embodiments, the first web page includes a tracking program, which is used to report tracking data based on the first web page. The tracking data includes user operation data, system event data, etc. corresponding to the first web page. The server 120 is used to receive the tracking data reported by the terminal 110 based on the first web page. The server 120 optimizes the background service for the first web page by analyzing the tracking data.
[0039] The terminal 110 runs the first web page through the browser, and in response to the tracking program in the first web page being triggered, obtains the tracking data recorded by the first web page, and when the browser supports the preset interface protocol, reports the tracking data based on the first reporting method. The preset interface protocol stipulates the above-mentioned first reporting method, and the first reporting method is a method of using a Post request to report data.
[0040] The above-mentioned terminal is optional. The terminal can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a smart TV, a smart car, and other forms of terminal devices, which are not limited to the embodiments of the present application.
[0041] It is worth noting that the above-mentioned servers can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud security, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0042] Among them, cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing.
[0043] In some embodiments, the above server can also be implemented as a node in a blockchain system.
[0044] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant regions. For example, the user operation data involved in this application are all obtained with full authorization.
[0045] To further explain, before collecting relevant user data (for example: the tracking data recorded based on the tracking program involved in this application, etc.) and during the process of collecting relevant user data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window, otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with relevant laws, regulations and standards in the relevant regions.
[0046] For illustration, please refer to Figure 2 , which shows a flow chart of a data reporting method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a terminal as an example for explanation. Figure 2 As shown, the method comprises the following steps:
[0047] Step 210: Run the first web page through a browser.
[0048] The first web page includes a tracking program, which is used to report tracking data based on the first web page records.
[0049] Optionally, the browser may be any application installed in the terminal for running the first web page, which is not limited in the present application.
[0050] The first webpage is an application program running on a browser, the first webpage realizes front-end page display based on the browser, and the first webpage is provided with back-end services by a corresponding back-end server. Optionally, the first webpage can be a webpage for any function such as retrieval, social networking, query, entertainment, payment, etc., which is not limited in this application.
[0051] The tracking program is a program code embedded in the first web page, which is used to report the tracking data based on the first web page. The tracking data refers to the user operation data recorded by the first web page based on the tracking program. The above-mentioned user operation data includes but is not limited to the length of time the user stays on the first web page, the click, slide, search and other operation data in the first web page. The terminal reports the tracking data of the first web page to the background server corresponding to the first web page, so that the background server can obtain the tracking data, analyze the tracking data, and count the user operations in the first web page and the usage of the first web page, so as to help optimize the functions of the first web page and improve the user experience.
[0052] In some embodiments, the first webpage corresponds to a first data reporting logic, and the first data reporting logic provides a data reporting method for the buried data of the first webpage. The above-mentioned first data reporting logic is a data reporting logic pre-set based on the interface protocol supported by the browser during the development of the first webpage. Since the interface protocol supported by the browser usually includes a method of using Get request to report data, the first data reporting logic provides a method of using Get request to report data, and the buried data program is used to report data based on the buried data recorded on the first webpage based on the first data reporting logic.
[0053] Step 220, in response to the tracking program being triggered, obtaining the tracking data recorded in the first web page.
[0054] Optionally, the tracking program is triggered based on page loading, user operation, page jump, etc. of the first web page.
[0055] Illustratively, taking page loading as an example, in response to the first web page being run, the tracking program is triggered, and the number of visits recorded in the first web page is obtained as the tracking data; taking user operation as an example, in response to the user clicking on the operation control corresponding to the tracking program, the tracking program is triggered, and the click operation data recorded in the first web page is obtained as the tracking data; taking page jump as an example, in response to the first web page jumping, the tracking program is triggered, and the page dwell time recorded in the first web page is obtained as the tracking data.
[0056] In some embodiments, in response to the burying point program being triggered, after obtaining the burying point data recorded in the first web page, the burying point data is immediately reported.
[0057] In some embodiments, after acquiring the buried point data recorded in the first web page, the buried point data is stored in a pre-built buried point data queue, and batch data reporting is performed on the buried point data based on the data volume of the buried point data in the buried point data queue.
[0058] Illustratively, in response to the triggering of the buried point program, the buried point data recorded on the first web page are obtained and stored in the buried point data queue. When the first web page does not jump to the page, in response to the amount of buried point data in the buried point data queue reaching a preset quantity threshold, the buried point data in the buried point data queue are reported in batches according to the preset quantity threshold. Specifically, when the amount of buried point data in the buried point data queue is greater than the preset quantity threshold, the first N buried point data are reported in batches according to the time when the buried point data enters the buried point data queue, where N is not the preset quantity threshold.
[0059] Step 230: When the browser supports the preset interface protocol, the buried data is reported based on the first reporting method.
[0060] The preset interface protocol specifies a first reporting method, which is to submit a Post request to report data.
[0061] In some embodiments, the first web page corresponds to a second data reporting logic, and the second data reporting logic provides a first reporting method and a third reporting method as candidate reporting methods, and the third reporting method is a method of using a Get request to report data. The first web page reports the buried data based on the above-mentioned second data reporting logic. Optionally, before the first web page reports the buried data based on the above-mentioned second data reporting logic, the data reporting logic of the first web page needs to be updated, that is, the first data reporting logic corresponding to the first web page is updated to the second data reporting logic.
[0062] Optionally, the third reporting mode and the second reporting mode may be the same data reporting mode or different data reporting modes.
[0063] Illustratively, the preset interface protocol is the beacon application programming interface Beacon API (including sendBeacon API), the first reporting method is the Post reporting method specified in the Beacon API, and the preset third reporting method is the image get reporting method.
[0064] In some embodiments, before step 230, it is necessary to obtain the browser's support information for the preset interface protocol, and the support information is used to indicate whether the browser supports the preset interface protocol. In response to the support information indicating that the browser supports the above-mentioned preset interface protocol, the buried data is reported based on the first reporting method; in response to the support information indicating that the browser does not support the above-mentioned preset interface protocol, the buried data is reported based on the preset third reporting method. The preset third reporting method is the data reporting method specified in the interface protocol supported by the browser, and the third reporting method is a method of using a Get request to report data.
[0065] For illustration, please refer to Figure 3 , Figure 3 is a schematic diagram of a data reporting process provided by an exemplary embodiment of the present application, such as Figure 3 As shown, in the process of reporting the buried data of the first web page, step 310 is executed to trigger the buried program; in response to the buried program being triggered, step 320 is executed to determine whether the browser supports the preset interface protocol; in response to the browser supporting the preset interface protocol, step 331 is executed to report the buried data based on the first reporting method; in response to the browser not supporting the preset interface protocol, step 332 is executed to report the buried data based on the preset third reporting method.
[0066] To summarize, the method provided in the embodiment of the present application optimizes the method of reporting buried data of the first web page by reporting buried data in a first reporting method based on the preset interface protocol using a Post request to report data when the browser supports the preset interface protocol. Based on the characteristics of the Post request, there is no need to use URL encoding in the data reporting process, thereby avoiding data security issues caused by data exposure in the URL. At the same time, it solves the problem that the length of the string reported by the Get request is limited by the URL length, thereby improving data security and the amount of reported data in the data reporting process, thereby improving data reporting efficiency.
[0067] Please refer to Figure 4 , which shows a flowchart of a method for batch reporting of data provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a terminal as an example for explanation. Figure 4 As shown, the above step 230 includes the following steps:
[0068] Step 231: Detect a window uninstall event based on the first web page to obtain a detection result.
[0069] The window unload (beforeunload) event refers to a page jump of a web page, and the detection result is used to indicate the page jump status of the first web page.
[0070] In some embodiments, the window uninstallation event of the first webpage is automatically detected by a preset program to obtain a detection result, which includes two situations: the first webpage is about to perform a page jump, and the first webpage does not perform a page jump.
[0071] Step 232: Based on the detection results, the first reporting method is used to report the buried data in batches.
[0072] In some embodiments, when the detection result does not indicate that the first web page should jump to a page, the buried point data is reported in batches based on the data volume of the buried point data; when the detection result indicates that the first web page should jump to a page, the buried point data is directly reported in batches.
[0073] In some embodiments, step 232 includes the following steps:
[0074] The first step is to build a tracking data queue.
[0075] Among them, the buried data queue is used to store the buried data recorded by the first web page.
[0076] In the second step, based on the detection results and the amount of buried data in the buried data queue, the buried data is reported in batches using the first reporting method.
[0077] Optionally, according to the detection result, the second step includes at least the following two situations:
[0078] The first one is that when the detection result does not indicate that the first web page should jump to a page, in response to the amount of buried point data in the buried point data queue reaching a preset quantity threshold, batch data reporting is performed on the buried point data in the buried point data queue according to the preset quantity threshold based on the first reporting method.
[0079] In some embodiments, when the detection result does not indicate that the first web page should perform a page jump, in response to the amount of buried point data in the buried point data queue reaching a preset quantity threshold, the method waits for the amount of buried point data to reach the preset quantity threshold, or waits for the detection result to indicate that the first web page should perform a page jump, and batch data reporting is performed on the buried point data in the buried point data queue based on the first reporting method.
[0080] The second method is to respond to the detection result indicating that the first web page performs a page jump and use the first reporting method to report the buried data in the buried data queue in batches.
[0081] For illustration, please refer to Figure 5 , Figure 5 This is a schematic diagram of a batch data reporting process provided by an exemplary embodiment of the present application. Figure 5 As shown, during the batch reporting process of the buried point data of the first web page, step 510 is executed to record the buried point data in the buried point data queue; step 520 is to determine whether the data volume of the buried point data in the buried point data queue reaches the preset quantity threshold; in response to the data volume of the buried point data in the buried point data queue reaching the preset quantity threshold, step 531 is executed to batch report the buried point data according to the preset quantity threshold; otherwise, step 532 is executed to determine whether the detection result indicates that the first web page should perform a page jump; in response to the detection result indicating that the first web page should perform a page jump, step 541 is executed to batch report the buried point data in the buried point data queue; otherwise, return to step 520.
[0082] In some embodiments, different buried point data queues are used for classified storage of different categories of buried point data, and the construction of the buried point data queues is implemented by constructing multiple buried point data queues based on multiple preset buried point data categories, wherein the i-th buried point data queue is used to store the buried point data corresponding to the i-th buried point data category, and the buried point data queue has a priority identifier, which is used to indicate the reporting priority of the buried point data in the multiple buried point data queues during the data reporting process.
[0083] Schematically, a buried data queue A is constructed for the buried data of the number of visits, a buried data queue B is constructed for the buried data of click operations, and a buried data queue C is constructed for the buried data of the dwell time. Among them, the buried data queue A, the buried data queue B and the buried data queue C correspond to priority identifier a, priority identifier b and priority identifier c, respectively. Priority identifier a, priority identifier b and priority identifier c are used to indicate that the data reporting priorities corresponding to the above-mentioned buried data queues are from high to low: buried data queue A, buried data queue C and buried data queue B.
[0084] In some embodiments, for the first case of batch data reporting based on detection results, when the detection results do not indicate a page jump for the first web page, in response to the data volume of the buried point data in at least two buried point data queues reaching a preset quantity threshold at the same time, the buried point data in at least two buried point data queues are reported in batches in sequence according to the preset quantity threshold based on the reporting priority indicated by the priority identifier.
[0085] Schematically, taking the example in which the priority identifiers corresponding to the buried point data queue A and the buried point data queue B respectively indicate that the data reporting priority of the buried point data queue A is higher than that of the buried point data queue B, when the detection result does not indicate a page jump for the first web page, in response to the data volume of the buried point data in the buried point data queue A and the buried point data queue B reaching a preset quantity threshold at the same time, the buried point data in the buried point data queue A and the buried point data queue B are reported in batches in turn according to the preset quantity threshold based on the reporting priority indicated by the priority identifier.
[0086] In some embodiments, for the second situation of batch data reporting based on detection results, in response to the detection result indicating a page jump of the first web page, batch data reporting is performed on the buried point data in multiple buried point data queues in turn based on the reporting priority indicated by the priority identifier and at least one of the data volumes of the buried point data in the multiple buried point data queues.
[0087] Optionally, based on at least one of the reporting priority indicated by the priority identifier and the data volume of the buried point data in the multiple buried point data queues, batch data reporting is performed on the buried point data in the multiple buried point data queues in sequence, including at least the following three situations:
[0088] The first one is that in response to the detection result indicating that the first web page jumps, batch data reporting is performed on the buried data in multiple buried data queues in sequence based on the reporting priority indicated by the priority identifier.
[0089] The second method is to respond to the detection result indicating that the first web page jumps to a page, and to report the buried point data in the multiple buried point data queues in batches based on the data volume of the buried point data in the multiple buried point data queues.
[0090] The third type is to report the buried data in multiple buried data queues in batches in response to the detection result indicating that the first web page jumps, based on the reporting priority indicated by the priority identifier and the data volume of the buried data in the multiple buried data queues. Among them, batch data reporting of the buried data in multiple buried data queues is prioritized based on the data volume of the buried data in the multiple buried data queues, and when there are at least two buried data queues with the same amount of buried data, batch data reporting of the buried data in the at least two buried data queues is performed based on the priority identifiers corresponding to the at least two buried data queues.
[0091] In some embodiments, after multiple burial point data queues are constructed based on multiple preset burial point data categories, priority identifiers need to be configured for the multiple burial point data queues.
[0092] Optionally, multiple fixed priority identifiers may be configured for multiple burial point data queues, or priority identifiers may be dynamically configured for multiple burial point data queues during the data reporting process.
[0093] Taking a fixed priority identifier as an example, priority identifiers corresponding to multiple buried data queues are configured according to a preset list. The preset list includes the correspondence between buried data categories and priority identifiers. For example, the data reporting priority indicated by the priority identifier configured for the buried data queue of the dwell time category according to the preset list is higher than that of other buried data queues.
[0094] Taking the dynamic configuration of priority identifiers as an example, according to the order relationship between the multiple first storage moments corresponding to the multiple buried data queues, the priority identifiers corresponding to the multiple buried data queues are configured. The first storage moment is the moment when the first buried data in the buried data queue enters the buried data queue. The earlier the first storage moment, the higher the data reporting priority indicated by the priority identifier. During the data reporting process, the fewer times the buried data in the buried data queue reports data, the higher the data reporting priority indicated by the priority identifier. For example, the first storage times corresponding to the buried point data queue A, the buried point data queue B and the buried point data queue C are t1, t2 and t3 respectively. Taking t1<t2<t3 as an example, the data reporting priority from high to low is: buried point data queue A, buried point data queue B and buried point data queue C. Assume that the times when the buried point data queue A, the buried point data queue B and the buried point data queue C first report the buried point data in batches are t4, t5 and t6 respectively, among which, t1<t2<t4<t5<t3<t6, then before t4, the data reporting priority from high to low is: buried point data queue A, buried point data queue B and buried point data queue C; between t4 and t5, the buried point data in the buried point data queue A has been reported once, and the buried point data queue B and buried data queue C have not reported data, and the data reporting priority is updated, from high to low: buried data queue B, buried data queue C and buried data queue A; between t5 and t6, the buried data in buried data queue A and buried data queue C have reported data once, and buried data queue C has not reported data, and the data reporting priority is updated, from high to low: buried data queue C, buried data queue A and buried data queue B; after t6, the buried data in buried data queue A, buried data queue B and buried data queue C have reported data once, and the data reporting priority is re-determined according to the order of time when the buried data enters the buried data queue A, buried data queue B and buried data queue C respectively after the data is reported.
[0095] To sum up, the method provided in the embodiment of the present application obtains a detection result by detecting a window uninstall event based on the first web page, and batch reports the buried data using a first reporting method based on the detection result. The batch reporting reduces the number of data reports, thereby reducing the computing resources required for data reporting and improving data reporting performance.
[0096] The method provided in the embodiment of the present application, by constructing a buried point data queue, in response to the data amount of the buried point data in the buried point data queue reaching a preset quantity threshold, batch data reporting is performed on the buried point data in the buried point data queue according to the preset quantity threshold based on the first reporting method, when the detection result does not indicate that the first web page is to jump to a page; in response to the detection result indicating that the first web page is to jump to a page, the buried point data is reported using the first reporting method, and two batch reporting methods based on the page jump situation of the first web page are clarified, among which, in the case of no page jump, batch reporting is performed according to the preset quantity threshold, which can both reduce the number of data reports and avoid the impact of too much buried point data on data reporting performance in a single data report.
[0097] The method provided in the embodiment of the present application constructs multiple buried point data queues based on multiple preset buried point data categories, and reports different categories of buried point data respectively based on the multiple buried point data queues, which can reduce the classification work of the server when performing data analysis based on the buried point data, and improve the efficiency of buried point data analysis; in response to the data volume of the buried point data in at least two buried point data queues reaching a preset quantity threshold at the same time when the detection result does not indicate that the first web page jumps, the buried point data in at least two buried point data queues are sequentially reported according to the preset quantity threshold based on the reporting priority indicated by the priority identifier. Batch reporting; in response to the detection result indicating that the first web page jumps, based on the reporting priority indicated by the priority identifier and at least one of the data volumes of the buried data in the multiple buried data queues, batch data reporting is performed on the buried data in the multiple buried data queues in turn, and an implementation method for batch data reporting in turn based on the priority identifiers of the buried data queues corresponding to different categories for two detection results is provided. While realizing data classification reporting and data batch reporting, it avoids the situation where multiple buried data are reported in batches at the same time, which leads to data reporting congestion, and improves the efficiency of data classification reporting and data batch reporting.
[0098] The method provided in the embodiment of the present application configures the priority identifiers corresponding to multiple buried point data queues according to a preset list, or configures the priority identifiers corresponding to multiple buried point data queues according to the chronological relationship between multiple first storage moments corresponding to the multiple buried point data queues. It provides two priority identifier determination methods, namely, configuring a fixed priority identifier and dynamically configuring a priority identifier, thereby improving the flexibility in the data reporting priority determination process.
[0099] In some embodiments, the first webpage corresponds to a first data reporting logic, and the first data reporting logic provides a second reporting method as a reporting method for buried data. The second reporting method is a method of using a Get request to report data. By default, the first webpage uses the first data reporting logic to report data. In order to enable the first webpage to report buried data based on the first reporting method when the browser supports the preset interface protocol, the data reporting logic of the first webpage needs to be updated, that is, the above step 230 also includes a data reporting logic update process. Please refer to Figure 6 , which shows a flowchart of a data reporting logic update method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a terminal as an example for explanation. Figure 6 As shown, the method comprises the following steps:
[0100] Step 610: reporting the buried data of the first web page based on the first data reporting logic.
[0101] Among them, the first data reporting logic provides a second reporting method as a reporting method for buried point data, and the second reporting method is a method of using a Get request to report data.
[0102] The first data reporting logic is a data reporting logic pre-set during the development of the first webpage based on the interface protocol supported by the browser.
[0103] In some embodiments, before the data reporting logic is updated, in response to the tracking program being triggered, the tracking data of the first web page is reported based on the first data reporting logic.
[0104] Step 620: Obtain the second data reporting logic.
[0105] The second data reporting logic provides a first reporting method and a third reporting method as candidate reporting methods, and the third reporting method is a method of using a Get request to perform data reporting.
[0106] Optionally, the third reporting mode and the second reporting mode may be the same data reporting mode, or may be different data reporting modes. This application takes the third reporting mode, which is the image get reporting mode, as an example for explanation.
[0107] In some embodiments, the second data reporting logic is a data reporting logic that is reset during the update optimization process of the first webpage. During the data reporting logic update process, the first data reporting logic and the second data reporting logic are respectively used to simultaneously report the buried data, and the update scheme of the data reporting logic is determined based on the data reporting amount.
[0108] Step 630: Update the data reporting logic based on the data reporting amounts corresponding to the first data reporting logic and the second data reporting logic respectively.
[0109] In some embodiments, the second data reporting logic needs to be verified. When the data reporting amount of the second data reporting logic is greater than or equal to the first data reporting logic, the second data reporting logic is verified to be available, and the first data reporting logic is updated to the second data reporting logic, so that the first web page can report the buried data based on the first reporting method when the browser supports the preset interface protocol; conversely, when the data reporting amount of the second data reporting logic is less than the first data reporting logic, the second data reporting logic is unavailable, then the first data reporting logic is retained, and the second data reporting logic is checked and adjusted.
[0110] Optionally, the above step 630 includes the following three steps:
[0111] The first step is to report the buried data of the first web page based on the first data reporting logic to determine the first data reporting amount.
[0112] Among them, the first data reporting amount is the amount of data reported on the buried data based on the first data reporting logic.
[0113] The second step is to report the buried data of the first web page based on the second data reporting logic and determine the second data reporting amount.
[0114] Among them, the second data reporting amount is the amount of data reported on the buried data based on the second data reporting logic.
[0115] It is worth noting that the first and second steps are performed in parallel, that is, the first data reporting logic and the second data reporting logic are used to report the same buried data respectively.
[0116] The third step is to update the data reporting logic based on the comparison result between the first data reporting amount and the second data reporting amount.
[0117] Optionally, the comparison result includes: the second data reporting amount is greater than or equal to the first data reporting amount, or the second data reporting amount is less than the first data reporting amount.
[0118] Taking the above-mentioned comparison result as an example in which the second data reporting amount is greater than or equal to the first data reporting amount, in some embodiments, the update data reporting logic is implemented as, in response to the second data reporting amount being greater than or equal to the first data reporting amount, updating from the first data reporting logic to the second data reporting logic, and updating the data reporting method based on the browser's support information for the preset interface protocol and the second data reporting logic.
[0119] Optionally, based on the browser's support information for the preset interface protocol and the second data reporting logic, the update data reporting method includes the following two cases:
[0120] The first method is to update the buried data reporting mode of the first webpage to the first reporting mode in response to the browser supporting the preset interface protocol, and cancel the routing delay corresponding to the second reporting mode, where the routing delay is used to indicate that the first webpage delays page jump;
[0121] The second one is to update the buried data reporting method of the first web page to a third reporting method in response to the browser not supporting the preset interface protocol.
[0122] Taking the above comparison result that the second data reporting amount is less than the first data reporting amount as an example, in some embodiments, the update of the data reporting logic is implemented as: in response to the second data reporting amount being less than the first data reporting amount, checking the log record corresponding to the data reporting of the buried data based on the target data reporting method; and updating the second data reporting logic based on the inspection result of the log record. That is, in response to the second data reporting amount being less than the first data reporting amount, retain the first data reporting logic, and check and adjust the second data reporting logic.
[0123] For illustration, please refer to Figure 7 , Figure 7 FIG. 1 is a schematic diagram of a data reporting logic update process provided by an exemplary embodiment of the present application. Figure 7 As shown, during the data reporting logic update process of the first web page, execute step 710 to obtain the comparison result; based on the comparison result, execute step 720 to determine whether the second data reporting amount is less than the first data reporting amount; in response to the second data reporting amount being less than the first data reporting amount, execute step 731 to check the log records; in response to the second data reporting amount being greater than or equal to the first data reporting amount, execute step 732 to determine whether the browser supports the preset interface protocol; in response to the browser supporting the preset interface protocol, execute step 741 to delete the routing delay logic and the first data reporting logic; in response to the browser not supporting the preset interface protocol, execute step 742 to delete the first data reporting logic.
[0124] To summarize, the method provided in the embodiment of the present application updates the data reporting logic based on the data reporting amounts corresponding to the first data reporting logic and the second data reporting logic respectively, so that when the data reporting amount corresponding to the second data reporting logic is greater than or equal to the first data reporting logic, the first data reporting logic corresponding to the first web page is updated to the second data reporting logic, thereby enabling the terminal to report the buried data based on the first reporting method when the browser supports the preset interface protocol, thereby providing an implementation basis for reporting the buried data based on the first reporting method, while ensuring the data reporting amount.
[0125] The method provided in the embodiment of the present application updates the data reporting logic based on the comparison result between the first data reporting amount and the second data reporting amount, thereby ensuring that the updated data reporting logic can accurately report data, avoid the loss of buried data, and improve the success rate of data reporting.
[0126] The method provided in the embodiment of the present application, in response to the second data reporting amount being greater than or equal to the first data reporting amount, updates from the first data reporting logic to the second data reporting logic, thereby ensuring that the second data reporting logic can accurately report data, avoiding loss of buried data, and improving the success rate of data reporting; based on the browser's support information for the preset interface protocol and the second data reporting logic, updates the data reporting method, ensuring that the candidate reporting method provided by the second data reporting logic can comply with the reporting method supported by the browser, thereby ensuring that the second data reporting logic can successfully report data.
[0127] The method provided in the embodiment of the present application updates the data reporting method of the first web page to the first reporting method in response to the browser supporting the preset interface protocol, and cancels the routing delay corresponding to the second reporting method, so that when the browser supports the preset interface protocol, data reporting can be performed based on the first reporting method, and routing delays are avoided, thereby improving page jump efficiency, improving user page experience, and thus improving human-computer interaction efficiency.
[0128] The method provided in the embodiment of the present application, in response to the second data reporting amount being less than the first data reporting amount, checks the log records corresponding to the data reporting of the buried data based on the target data reporting method; updates the second data reporting logic based on the inspection results of the log records, and in the case that there is buried data loss in the second data reporting logic, promptly checks and adjusts the second data reporting logic, so as to update the first data reporting logic to the second data reporting logic, so that when the browser supports the preset interface protocol, data reporting can be performed based on the first reporting method, thereby improving the updating efficiency of the data reporting logic.
[0129] In some embodiments, the first web page adopts the above-mentioned second data reporting logic. When the browser supports the preset interface protocol, in response to the point-of-sale program in the first web page being triggered, the point-of-sale data recorded by the first web page is reported based on the above-mentioned first reporting method. For example, please refer to Figure 8 , Figure 8 is a data reporting interaction flow chart provided in an embodiment of the present application, such as Figure 8 As shown, the execution body of the data reporting method provided in the embodiment of the present application includes a business page 810, a front-end basic service 820, a front-end routing bottom layer 830, a transit server 840 and a back-end server 850, wherein the business page 810 is a page displayed when the first web page runs in a browser, the front-end basic service 820 is used to implement the tracking data reporting logic of the first web page, the front-end routing bottom layer 830 is used to execute the page jump logic, the transit server 840 is used to process tracking data reporting requests, and the back-end server 850 is used to receive the reported tracking data and analyze the tracking data. In the data reporting process provided in the embodiment of the present application, the first web page is run through the browser, and the business page 810 executes step 811 to enter the first web page and trigger the tracking program; the front-end tracking basic service 820 responds to the tracking program being triggered and executes step 821 to send a tracking data reporting request to the relay server 840 based on the first reporting method; the relay server 840 executes step 841 based on step 821, forwards the tracking data reporting request to the background server 850, and reports the tracking data to the background server 850. After executing step 811, the business page 810 executes step 812 while staying on the first web page, triggering the tracking program based on the user operation in the first web page; in response to the triggering of the tracking program, the front-end tracking basic service 820 executes step 822, sending a tracking data reporting request to the transfer server 840 based on the first reporting method; based on step 822, the transfer server 840 executes step 842, forwards the tracking data reporting request to the background server 850, and reports the tracking data to the background server 850. After executing step 811, the business page 810 executes step 813, receiving a page jump operation on the first web page; the front-end routing bottom layer 830 detects a page unloading event of the first web page based on the page jump operation, executes step 831, cancels the routing delay and executes the page jump logic; the front-end routing bottom layer 830 executes step 832, and returns the page jump result to the business page 810.
[0130] For illustration, please refer to Fig. 9 , Fig. 9 is a schematic diagram of a data reporting request provided in an embodiment of the present application, such as Fig. 9As shown, taking the data reporting interaction shown in 8 as an example, when the browser running the first web page supports the preset interface protocol, the terminal reports the buried data of the first web page based on the first reporting method, and the reporting request example 900 includes 5 Beacon API Post requests, wherein Post request a and Post request b are executed at the 55th millisecond in response to entering the first web page, and the duration of executing Post request a and Post request b are 36 milliseconds and 33 milliseconds respectively, wherein the duration identifier 910 is used to characterize that the duration of Post request a is 36 milliseconds, and when the first web page does not jump to the page, at the 80th millisecond in response to the buried data in the buried data queue reaching the preset quantity threshold, Post request c, Post request d, Post request e, Post request f and Post request g corresponding to the buried data in the buried data queue are executed in batches.
[0131] In summary, the method provided in the embodiment of the present application uses the sendBeacon API of the navigator navigator provided by the browser standard to support the first web page to report data based on the first reporting method. The asynchronous and data transmission mechanism before the page is unloaded by the sendBeacon API can effectively solve the problem of lost points when the page is switched, and can also optimize the performance of the asynchronous scripting language and the problem caused by the extensible markup language (Asynchronous JavaScript and XML, Ajax) request reporting method. The data reporting method provided in the embodiment of the present application adopts a method in which asynchronous reporting does not affect the normal jump of the page (no need to delay the jump), and can not cause the loss of the buried point. It can maximize the accuracy of the buried point reporting data while prompting the page user experience. Since the data reporting based on the Beacon API can also be sent successfully after the page is closed, the route jump does not need to delay waiting for 300ms, which is conducive to improving the page experience. And the data reporting request supported by the Beacon API is a non-blocking request, which can improve the page performance and avoid a large number of Get requests from being initiated, resulting in page blockage.
[0132] Fig.10 is a structural block diagram of a data reporting device provided by an exemplary embodiment of the present application, such as Fig.10 As shown, the device includes the following parts:
[0133] The processing module 1010 is used to run a first webpage through a browser, wherein the first webpage includes a tracking program, and the tracking program is used to report tracking data based on the first webpage.
[0134] The processing module 1010 is further configured to obtain the tracking data recorded in the first web page in response to the tracking program being triggered;
[0135] The processing module 1010 is also used to report the buried data based on a first reporting method when the browser supports a preset interface protocol. The preset interface protocol stipulates the first reporting method, and the first reporting method is a method of submitting a Post request to report data.
[0136] Please refer to Fig.11 , Fig.11 is a structural block diagram of a data reporting device module provided by an exemplary embodiment of the present application, such as Fig.11 As shown, in some embodiments, the processing module 1010 includes:
[0137] A detection unit 1011 is used to detect a window unloading event based on the first webpage to obtain a detection result, wherein the window unloading event refers to a page jump of the webpage, and the detection result is used to indicate the page jump status of the first webpage;
[0138] The reporting unit 1012 is used to report the buried data in batches based on the detection result using the first reporting method.
[0139] In some embodiments, the reporting unit 1012 includes:
[0140] The queue construction subunit 1013 is used to construct a buried point data queue, and the buried point data queue is used to store the buried point data recorded by the first web page;
[0141] The batch reporting subunit 1014 is used to report the buried data in batches using the first reporting method based on the detection result and the data volume of the buried data in the buried data queue.
[0142] In some embodiments, the batch reporting subunit 1014 is used to:
[0143] In the case where the detection result does not indicate that the first web page is to jump to a page, in response to the amount of the buried point data in the buried point data queue reaching a preset quantity threshold, batch data reporting is performed on the buried point data in the buried point data queue according to the preset quantity threshold based on the first reporting method; or
[0144] In response to the detection result indicating that the first web page performs a page jump, the first reporting method is used to batch report the buried data in the buried data queue.
[0145] In some embodiments, the queue construction subunit 1013 is used to construct multiple buried point data queues based on multiple preset buried point data categories, wherein the i-th buried point data queue is used to store the buried point data corresponding to the i-th buried point data category, and the buried point data queue corresponds to a priority identifier, and the priority identifier is used to indicate the reporting priority of the buried point data in the multiple buried point data queues in the data reporting process;
[0146] In some embodiments, the batch reporting subunit 1014 is used to:
[0147] In the case where the detection result does not indicate that the first web page is to jump to a page, in response to the data volume of the buried point data in at least two buried point data queues reaching a preset quantity threshold at the same time, the buried point data in the at least two buried point data queues are reported in batches in sequence according to the preset quantity threshold based on the reporting priority indicated by the priority identifier; or
[0148] In response to the detection result indicating that the first web page performs a page jump, based on the reporting priority indicated by the priority identifier and at least one of the data volumes of the buried point data in the multiple buried point data queues, batch data reporting is performed on the buried point data in the multiple buried point data queues in turn.
[0149] In some embodiments, the reporting unit 1012 further includes a priority configuration subunit 1015, which is used to:
[0150] The priority identifiers corresponding to the plurality of point-of-care data queues are configured according to a preset list, wherein the preset list includes a correspondence between the point-of-care data categories and the priority identifiers; or
[0151] According to the chronological relationship between the multiple first storage moments corresponding to the multiple buried point data queues, the priority identifiers corresponding to the multiple buried point data queues are configured respectively, and the first storage moment is the moment when the first buried point data in the buried point data queue enters the buried point data queue.
[0152] In some embodiments, the apparatus further includes an updating module 1020, configured to:
[0153] Reporting the buried data of the first webpage based on the first data reporting logic, wherein the first data reporting logic provides a second reporting method as a reporting method for the buried data, and the second reporting method is a method of using a Get request to report the data;
[0154] Acquire a second data reporting logic, wherein the first reporting mode and the third reporting mode are provided as candidate reporting modes, and the third reporting mode is a mode of using a Get request to perform data reporting;
[0155] The data reporting logic is updated based on the data reporting amounts respectively corresponding to the first data reporting logic and the second data reporting logic.
[0156] In some embodiments, the update module 1020 includes:
[0157] A first reporting unit 1021 is used to report the buried data of the first webpage based on the first data reporting logic, and determine a first data reporting amount, where the first data reporting amount is the amount of data reported on the buried data based on the first data reporting logic;
[0158] A second reporting unit 1022 is used to report the buried data of the first webpage based on the second data reporting logic, and determine a second data reporting amount;
[0159] The logic updating unit 1023 is used to update the data reporting logic based on the comparison result between the first data reporting amount and the second data reporting amount.
[0160] In some embodiments, the logic update unit 1023 includes:
[0161] A first updating subunit 1001, configured to update the first data reporting logic to the second data reporting logic in response to the second data reporting amount being greater than or equal to the first data reporting amount;
[0162] The second updating subunit 1002 is used to update the data reporting method based on the browser's support information for the preset interface protocol and the second data reporting logic.
[0163] In some appropriate time and amount, the second updating subunit 1002 is used to:
[0164] In response to the browser supporting the preset interface protocol, updating the buried data reporting mode of the first webpage to the first reporting mode, canceling the routing delay corresponding to the second reporting mode, wherein the routing delay is used to indicate that the first webpage delays page jump;
[0165] In response to the browser not supporting the preset interface protocol, the method for reporting the buried data of the first web page is updated to the third reporting method.
[0166] In some embodiments, the logic update unit 1023 is used to:
[0167] In response to the second data reporting amount being less than the first data reporting amount, checking a log record corresponding to data reporting of the buried data based on the target data reporting mode;
[0168] The second data reporting logic is updated based on the inspection result of the log record.
[0169] In some embodiments, the preset interface protocol is a beacon application programming interface Beacon API, the first reporting method is a Post reporting method specified in the Beacon API, and the preset third reporting method is an image get reporting method.
[0170] To summarize, the device provided in the embodiment of the present application optimizes the method of reporting buried data of the first web page by reporting buried data in a first reporting method based on the preset interface protocol using a Post request to report data when the browser supports the preset interface protocol. Based on the characteristics of the Post request, there is no need to use URL encoding in the data reporting process, thereby avoiding data security issues caused by data exposure in the URL. At the same time, it solves the problem that the length of the string reported by the Get request is limited by the URL length, thereby improving data security and the amount of reported data in the data reporting process, thereby improving data reporting efficiency.
[0171] It should be noted that the data reporting device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0172] Fig.12 The structure block diagram of a terminal 1200 provided by an exemplary embodiment of the present application is shown. The terminal 1200 may be: a smart phone, a tablet computer, an MP3 player, an MP4 player, a notebook computer or a desktop computer. The terminal 1200 may also be called a user equipment, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0173] Typically, the terminal 1200 includes: a processor 1201 and a memory 1202 .
[0174] The processor 1201 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1201 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1201 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1201 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1201 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0175] The memory 1202 may include one or more computer-readable storage media, which may be non-transitory. The memory 1202 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1202 is used to store at least one instruction, which is used to be executed by the processor 1201 to implement the data reporting method provided in the method embodiment of the present application.
[0176] In some embodiments, the terminal 1200 also includes other components, which can be understood by those skilled in the art. Fig.12 The structure shown in the figure does not constitute a limitation on the terminal 1200, and the terminal 1200 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0177] The embodiment of the present application also provides a computer device, which can be implemented as follows: Figure 1 The computer device includes a processor and a memory, wherein at least one instruction, at least one program, code set or instruction set is stored in the memory, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the data reporting method provided by the above-mentioned method embodiments.
[0178] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the data reporting method provided by the above-mentioned method embodiments.
[0179] The embodiments of the present application also provide a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the data reporting method provided by the above-mentioned method embodiments.
[0180] Optionally, the computer readable storage medium may include: Read Only Memory (ROM), Random Access Memory (RAM), Solid State Drives (SSD) or optical disks, etc. Among them, the random access memory may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0181] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0182] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A data reporting method, characterized in that: The method comprises: Running a first webpage through a browser, wherein the first webpage includes a tracking program, and the tracking program is used to report tracking data based on the first webpage; In response to the tracking program being triggered, obtaining the tracking data recorded by the first web page; In the case where the browser supports the preset interface protocol, the buried data is reported based on a first reporting method. The preset interface protocol stipulates the first reporting method, and the first reporting method is a method of submitting a Post request to report data.
2. The method according to claim 1, characterized in that The step of reporting the buried data based on the first reporting method includes: Detecting a window unloading event based on the first webpage to obtain a detection result, wherein the window unloading event refers to a page jump of the webpage, and the detection result is used to indicate the page jump of the first webpage; Based on the detection result, the first reporting method is used to report the buried data in batches.
3. The method according to claim 2, characterized in that The step of reporting the buried data in batches based on the detection result using the first reporting method includes: Constructing a buried point data queue, wherein the buried point data queue is used to store the buried point data recorded by the first web page; Based on the detection result and the amount of buried point data in the buried point data queue, the first reporting method is used to report the buried point data in batches.
4. The method according to claim 3, characterized in that: The step of reporting the buried point data in batches based on the detection result and the amount of buried point data in the buried point data queue by using the first reporting method includes: In the case where the detection result does not indicate that the first web page is to jump to a page, in response to the amount of the buried point data in the buried point data queue reaching a preset quantity threshold, batch data reporting is performed on the buried point data in the buried point data queue according to the preset quantity threshold based on the first reporting method; or In response to the detection result indicating that the first web page performs a page jump, the first reporting method is used to batch report the buried data in the buried data queue.
5. The method according to claim 4, characterized in that The step of constructing a tracking point data queue includes: Based on multiple preset buried point data categories, multiple buried point data queues are constructed, wherein the i-th buried point data queue is used to store the buried point data corresponding to the i-th buried point data category, and the buried point data queue corresponds to a priority identifier, and the priority identifier is used to indicate the reporting priority of the buried point data in the multiple buried point data queues in the data reporting process; In a case where the detection result does not indicate that the first webpage performs a page jump, in response to the amount of the buried point data in the buried point data queue reaching a preset quantity threshold, batch data reporting is performed on the buried point data in the buried point data queue according to the preset quantity threshold based on the first reporting method, including: In a case where the detection result does not indicate that the first web page performs a page jump, in response to the data volume of the buried point data in at least two buried point data queues reaching a preset quantity threshold at the same time, the buried point data in the at least two buried point data queues are reported in batches in sequence according to the preset quantity threshold based on the reporting priority indicated by the priority identifier; In response to the detection result indicating that the first webpage performs a page jump, the first reporting method is used to perform batch data reporting on the buried point data in the buried point data queue, including: In response to the detection result indicating that the first web page performs a page jump, based on the reporting priority indicated by the priority identifier and at least one of the data volumes of the buried point data in the multiple buried point data queues, batch data reporting is performed on the buried point data in the multiple buried point data queues in turn.
6. The method according to claim 5, characterized in that After building multiple buried point data queues based on multiple preset buried point data categories, the method further includes: The priority identifiers corresponding to the plurality of point-of-care data queues are configured according to a preset list, wherein the preset list includes a correspondence between the point-of-care data categories and the priority identifiers; or According to the chronological relationship between the multiple first storage moments corresponding to the multiple buried point data queues, the priority identifiers corresponding to the multiple buried point data queues are configured respectively, and the first storage moment is the moment when the first buried point data in the buried point data queue enters the buried point data queue.
7. The method according to any one of claims 1 to 6, characterized in that: In the case where the browser supports the preset interface protocol, before reporting the buried data based on the first reporting method, the method further includes: Reporting the buried data of the first webpage based on the first data reporting logic, wherein the first data reporting logic provides a second reporting method as a reporting method for the buried data, and the second reporting method is a method of using a Get request to report the data; Acquire a second data reporting logic, wherein the first reporting mode and the third reporting mode are provided as candidate reporting modes, and the third reporting mode is a mode of using a Get request to perform data reporting; The data reporting logic is updated based on the data reporting amounts respectively corresponding to the first data reporting logic and the second data reporting logic.
8. The method according to claim 7, characterized in that The updating of the data reporting logic based on the data reporting amounts respectively corresponding to the first data reporting logic and the second data reporting logic includes: Reporting the buried data of the first webpage based on the first data reporting logic, and determining a first data reporting amount, where the first data reporting amount is the amount of data reported on the buried data based on the first data reporting logic; Report the buried data of the first webpage based on the second data reporting logic to determine a second data reporting amount; Based on a comparison result between the first data reporting amount and the second data reporting amount, the data reporting logic is updated.
9. The method according to claim 8, characterized in that The updating of the data reporting logic based on the comparison result between the first data reporting amount and the second data reporting amount includes: In response to the second data reporting amount being greater than or equal to the first data reporting amount, updating from the first data reporting logic to the second data reporting logic; Based on the browser's support information for the preset interface protocol and the second data reporting logic, the data reporting method is updated.
10. The method according to claim 9, characterized in that The updating of the data reporting method based on the browser's support information for the preset interface protocol and the second data reporting logic includes: In response to the browser supporting the preset interface protocol, updating the buried data reporting mode of the first webpage to the first reporting mode, canceling the routing delay corresponding to the second reporting mode, wherein the routing delay is used to indicate that the first webpage delays page jump; In response to the browser not supporting the preset interface protocol, the method for reporting the buried data of the first web page is updated to the third reporting method.
11. The method according to claim 8, characterized in that The updating of the data reporting logic based on the comparison result between the first data reporting amount and the second data reporting amount includes: In response to the second data reporting amount being less than the first data reporting amount, checking a log record corresponding to data reporting of the buried data based on the target data reporting mode; The second data reporting logic is updated based on the inspection result of the log record.
12. A data reporting device, characterized in that: The device comprises: A processing module, used to run a first webpage through a browser, wherein the first webpage includes a tracking program, and the tracking program is used to report tracking data based on the tracking data recorded on the first webpage; The processing module is further configured to obtain the tracking data recorded by the first web page in response to the tracking program being triggered; The processing module is also used to report the buried data based on a first reporting method when the browser supports the preset interface protocol. The preset interface protocol stipulates the first reporting method, and the first reporting method is a method of submitting a Post request to report data.
13. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the data reporting method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the data reporting method according to any one of claims 1 to 11.
15. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the data reporting method according to any one of claims 1 to 11.
