Automatic data reporting method and system based on mobile application life cycle

Through automatic monitoring of the full-link life cycle algorithm and cooling authentication data protection algorithm, combined with custom event point burial technology, the high development cost, data consistency and security problems in mobile application data reporting are solved, and the intelligent, accurate and secure data reporting is realized.

CN120295855APending Publication Date: 2025-07-11BEIJING BIG DATA CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510311301.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing mobile application data reporting technology has problems such as high development costs, complex maintenance, difficult data consistency, omission or delay in key data, inability to effectively store data without authentication, and lack of dynamic authentication management during transmission.

Method used

Automatic monitoring of full-link life cycle algorithm is used to monitor application events, combined with custom and system event burying technology, and the cooling authentication data protection algorithm is used to temporarily store data when it is not authenticated and batch report after the authentication is completed. Data security and integrity are achieved through full-link monitoring, precise burying and authentication protection.

Benefits of technology

It realizes non-invasive event monitoring, ensures the integrity and real-time nature of data collection, improves the accuracy of data analysis, ensures the security and integrity of data in the authentication state, and improves the reliability and traceability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295855A_ABST
    Figure CN120295855A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic data reporting method and system based on a mobile application life cycle, and belongs to the technical field of automatic data reporting. Monitoring each page life cycle event of the mobile terminal application by using an automatic monitoring full-link life cycle algorithm; automatically capturing a corresponding hook function return value; key index data are collected through a custom event burying point and system event burying point technology; a cooling authentication data protection algorithm is used for storing and managing data to be reported, when a user does not complete authentication, the data are temporarily stored in a global stack, and after the user completes authentication, the stored data are automatically reported to a server in batches; and uploading the collected data to a server side based on a preset rule, and providing state code feedback. According to the invention, through full-link monitoring, accurate point burying, authentication protection and efficient reporting, intelligentization, accuracy and security of automatic acquisition of mobile application data are realized, and powerful support is provided for data-driven service decision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic data reporting, and particularly to a method and system for automatic data reporting based on the life cycle of mobile applications. Background Art

[0002] In recent years, with the rapid development of mobile Internet technology, mobile applications (APPs) have been widely penetrated into various industries, covering multiple fields such as social, finance, e-commerce, and government affairs. In order to optimize the user experience, improve system stability, and enhance product functions, the data collection and analysis of mobile applications have become an important basis for enterprise operation and decision-making. Traditional data collection methods usually rely on manual code embedding or passive data collection based on front-end SDKs, but this method has problems such as high development costs, complex maintenance, and difficulty in ensuring data consistency. In addition, some applications cannot effectively store and manage key data without user authentication, resulting in the loss or delayed reporting of important information.

[0003] The existing mobile application data reporting technologies have the following deficiencies: First, the traditional code embedding method mainly relies on developers to manually insert code for data collection. Once the application architecture changes, the code embedding rules need to be manually adjusted, resulting in high maintenance costs and easy to cause incomplete data collection or data anomalies. Second, in a complex application environment with multiple pages and state switches, some data reporting mechanisms are difficult to accurately capture events throughout the life cycle, easily causing key data omission or delay. Third, the existing data reporting methods rely strongly on user authentication. Without user authentication, some data cannot be effectively stored, affecting data integrity and consistency. In addition, the existing technologies lack a dynamic authentication management mechanism during data transmission, easily losing data due to authentication failure and reducing data reliability. Summary of the Invention

[0004] The purpose of the present invention is to provide a method and system for automatic data reporting based on the life cycle of mobile applications to solve the problems raised in the above background art.

[0005] To solve the above technical problems, the present invention provides the following technical solutions:

[0006] A data automatic reporting method based on the mobile application life cycle. This method includes the following steps: Step S1: Use the automatic listening full-link life cycle algorithm to listen to the life cycle events of each page of the mobile application; and automatically capture the return values of the corresponding hook functions. Step S2: Collect key indicator data through custom event data logging and system event data logging techniques. Step S3: Use the cooling authentication data protection algorithm to store and manage the data to be reported. When the user has not completed authentication, the data is temporarily stored in the global stack. After the user completes authentication, the stored data is automatically reported to the server in batches. Step S4: Based on preset rules, upload the collected data to the server side and provide status code feedback.

[0007] As a preferred solution of the data automatic reporting method based on the mobile application life cycle according to the present invention, the life cycle events include application startup, display, hiding, page loading, page hiding, and page sharing; the automatic listening full-link life cycle algorithm intercepts each life cycle event through an event proxy mechanism, independently records the event triggering situation, and does not affect the original system hook functions.

[0008] As a preferred solution of the data automatic reporting method based on the mobile application life cycle according to the present invention, the key indicator data includes user access volume data, function usage data, and legal person login method data.

[0009] As a preferred solution of the data automatic reporting method based on the mobile application life cycle according to the present invention, the data logging techniques include automatic data logging and custom data logging; the automatic data logging is based on system life cycle events and captures application startup, page display, and page hiding operations; the custom data logging supports users to customize data logging rules to collect specific operation behaviors, and the specific operation behaviors include clicks on specific functions, form submissions, and jump events.

[0010] As a preferred solution of the data automatic reporting method based on the mobile application life cycle according to the present invention, the cooling authentication data protection algorithm saves all data through the global stack and judges whether the current authentication has passed; if the authentication passes, the request is sent to the server side at one time according to the remaining situation in the current stack, and the data that has occurred is saved by the server side; if the authentication fails, all such data is saved in the stack according to the user's behavior. After the user completes authentication, all resources in the stack are released, and the process returns to the step of judging whether the authentication has passed to start looping.

[0011] It should be noted that the main purpose of the cooling authentication data protection algorithm is to temporarily store data when the authentication status is uncertain or fails, and then process and report the data after the authentication is passed to ensure the security and accuracy of the data. At the same time, through this method, data can be effectively managed to avoid data loss or incorrect reporting; for example, in a mobile application, when the reporting conditions are not met, a cooling period is automatically started, and the data is stored in the queue memory (i.e., Stacks). When the reporting conditions are met, the data in the queue memory is reported to the server at one time. This can achieve the security protection and effective reporting of data without affecting the normal operation of the business system.

[0012] A data automatic reporting system based on the mobile application life cycle. This system includes: a full-link life cycle monitoring module, a buried point data collection module, a data cooling authentication module, and a data reporting module.

[0013] The full-link life cycle monitoring module: uses the automatic listening full-link life cycle algorithm to listen to the life cycle events of each page of the mobile application; and automatically captures the return values of the corresponding hook functions.

[0014] The buried point data collection module: collects key indicator data through custom event buried point and system event buried point technologies.

[0015] The data cooling authentication module: uses the cooling authentication data protection algorithm to store and manage the data to be reported. When the user has not completed the authentication, the data is temporarily stored in the global stack. After the user completes the authentication, the stored data is automatically reported to the server in batches.

[0016] The data reporting module: uploads the collected data to the server side based on preset rules and provides status code feedback.

[0017] Furthermore, the full-link life cycle monitoring module includes a full-link life cycle monitoring unit.

[0018] The full-link life cycle monitoring unit: uses the automatic listening full-link life cycle algorithm to intercept each life cycle event through the event proxy mechanism, and independently records the event triggering situation without affecting the original system hook function, realizing the complete separation of monitoring and business logic.

[0019] Furthermore, the buried point data collection module includes a buried point data collection unit.

[0020] The buried point data collection unit: The buried point technology includes automatic buried points and custom buried points; The automatic buried points are based on system life cycle events and capture application startup, page display, and page hiding operations; The custom buried points support users to customize buried point rules to collect specific operation behaviors, and the specific operation behaviors include clicks on specific functions, form submissions, and jump events.

[0021] It should be noted that the buried point configuration is independent of the business code and will not affect each other. Based on the different life cycles of government affairs mini-programs, corresponding configuration items are generated. With the help of these configuration items, data such as the page access volume and the access volume of various functions can be automatically monitored. When the data reporting conditions are not met, the system will automatically start a cooling period, and during the cooling period, the data will be stored in the queue memory. Once the reporting conditions are met, the data stored in the queue memory will be reported to the server at one time.

[0022] Furthermore, the data cooling authentication module includes a data cooling authentication unit.

[0023] The data cooling authentication unit: uses the cooling authentication data protection algorithm to save all data through the global stack and judges whether the current authentication has passed; If the authentication passes, the request will be sent to the server side at one time according to the remaining situation in the current stack, and the server side will save the generated data; If the authentication fails, all such data will be saved in the stack according to the user's behavior. After the user's authentication is completed, all resources in the stack will be released, and it will return to the step of judging whether the authentication passes and start to execute in a loop.

[0024] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: In a data automatic reporting method and system based on the mobile application life cycle provided by the present invention, by automatically listening to the full-link life cycle algorithm to monitor the life cycle events of the application (such as application startup, display, hiding, page loading, etc.) and capturing the return values of system hook functions, non-invasive event listening is achieved, ensuring the integrity and real-time nature of data collection without affecting the original system functions. Subsequently, custom event logging and system event logging technologies are used to collect key metric data, including user access volume, function usage, and legal person login methods, etc., so as to accurately obtain user interaction information and improve the accuracy of data analysis. Then, through the cooling authentication data protection algorithm, the data is stored and managed. When the user has not completed authentication, the data is temporarily stored in the global stack and reported in batches after authentication is completed, ensuring the security and integrity of the data in the authenticated state and avoiding data loss or abnormal reporting. Finally, based on preset rules, the collected data is uploaded to the server and a status code feedback is provided to ensure the reliability and traceability of data transmission. Generally speaking, through full-link listening, accurate logging, authentication protection, and efficient reporting, the present invention realizes the intelligence, accuracy, and security of automatic mobile application data collection, providing strong support for data-driven business decisions. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention.

[0026] Figure 1 is a step schematic diagram of a data automatic reporting method based on the mobile application life cycle of the present invention;

[0027] Figure 2 is a structural schematic diagram of a data automatic reporting system based on the mobile application life cycle of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0029] Please refer to Figure 1 , in the first embodiment: A data automatic reporting method based on the mobile application life cycle is provided, and the method includes the following steps:

[0030] Step S1: Use the automatic full-link life cycle monitoring algorithm to monitor the life cycle events of each page of the mobile application; and automatically capture the return values of the corresponding hook functions.

[0031] The life cycle events include application startup, display, hiding, page loading, page hiding, and page sharing; the automatic full-link life cycle monitoring algorithm intercepts each life cycle event through an event proxy mechanism, independently records the event triggering situation, and does not affect the original system hook functions.

[0032] Exemplarily, the specific operation of the automatic full-link life cycle monitoring algorithm is as follows. First, define a variable "page" and make it equal to "Page". Then create a function named "eventProxy" that receives three parameters: "obj", "event", and "callFn". Inside the "eventProxy" function, first check if "event" exists in "obj". If it exists, redefine "obj[event]" as a new function. In this new function, first try to execute "callFn" with relevant parameters. If an error occurs during the execution, print the error message in the console, and then execute the original "fn". If "event" does not exist in "obj", directly define "obj[event]" as a function that executes "callFn". After that, redefine the "Page" function. In the new "Page" function, call the "eventProxy" function to handle the "onShow" and "onLoad" events respectively, and then execute the original "page" function after the processing is completed.

[0033] Step S2: Collect key metric data through custom event tagging and system event tagging technologies.

[0034] The key metric data includes user access volume data, function usage data, and corporate login method data.

[0035] The tagging technologies include automatic tagging and custom tagging; the automatic tagging is based on system life cycle events and captures application startup, page display, and page hiding operations; the custom tagging supports users to define custom tagging rules to collect specific operation behaviors, and the specific operation behaviors include clicks on specific functions, form submissions, and jump events.

[0036] Step S3: Use the cooling authentication data protection algorithm to store and manage the data to be reported. When the user has not completed authentication, the data is temporarily stored in the global stack. After the user completes authentication, the stored data is automatically reported to the server in batches.

[0037] The cooling authentication data protection algorithm saves all data through a global stack and determines whether the current authentication has passed; if the authentication passes, the requests are sent to the server side at one time according to the remaining situation in the current stack, and the server side saves the generated data; if the authentication fails, all such data is saved in the stack according to the user's behavior. After the user completes the authentication, all resources in the stack are released, and the process returns to the step of determining whether the authentication passes and starts to execute in a loop.

[0038] In the present invention, the cooling authentication data protection algorithm is implemented as follows: first, a global stack "Stacks" is created to save all sample data. Then, it is determined whether the current authentication status has passed. If the authentication passes, according to the remaining data in the "Stacks" stack, relevant requests are sent to the server side at one time, and the data in the stack is cleared after the sending is completed. If the authentication fails, the relevant data is temporarily saved in the "Stacks" stack. After the user completes the authentication, all resources in the stack are released, and then the above process is repeated in a loop. During the data reporting process, it is determined whether the reporting is successful based on the "err_code" in the "response header". If the value of "err_code" is 0, it means the reporting is successful; otherwise, the reporting logic is adjusted according to the specific error code.

[0039] Step S4: Based on preset rules, upload the collected data to the server side and provide a status code feedback to indicate whether the reporting result is successful.

[0040] Please refer to Figure 2 , in the second embodiment: Provide a data automatic reporting system based on the mobile application life cycle. The system includes: a full-link life cycle monitoring module, a buried point data collection module, a data cooling authentication module, and a data reporting module.

[0041] The full-link life cycle monitoring module: uses the automatic listening full-link life cycle algorithm to listen to the life cycle events of each page of the mobile application; and automatically captures the return values of the corresponding hook functions.

[0042] The buried point data collection module: collects key metric data through custom event buried points and system event buried points technology.

[0043] The data cooling authentication module: uses the cooling authentication data protection algorithm to store and manage the data to be reported. When the user has not completed the authentication, the data is temporarily stored in the global stack. After the user completes the authentication, the stored data is automatically reported to the server in batches.

[0044] The data reporting module: based on preset rules, uploads the collected data to the server side and provides a status code feedback.

[0045] Furthermore, the full-link lifecycle monitoring module includes a full-link lifecycle monitoring unit.

[0046] The full-link lifecycle monitoring unit: utilizes the automatic listening full-link lifecycle algorithm to intercept each lifecycle event through the event proxy mechanism, and independently records the event triggering situation without affecting the original system hook function, realizing the complete separation of monitoring and business logic.

[0047] Furthermore, the buried point data collection module includes a buried point data collection unit.

[0048] The buried point data collection unit: The buried point technology includes automatic buried points and custom buried points; the automatic buried points are based on system lifecycle events and capture application startup, page display, and page hiding operations; the custom buried points support users to customize buried point rules to collect specific operation behaviors, and the specific operation behaviors include clicks on specific functions, form submissions, and jump events.

[0049] It should be noted that the buried point configuration and business code are independent of each other and will not affect each other. Corresponding configuration items are generated based on the different lifecycles of government affairs mini-programs. With the help of these configuration items, data such as the page access volume and the access volume of various functions can be automatically monitored. When the data reporting conditions are not met, the system will automatically start a cooling period, and the data will be stored in the queue memory during the cooling period. Once the reporting conditions are met, the data stored in the queue memory will be reported to the server at one time.

[0050] Furthermore, the data cooling authentication module includes a data cooling authentication unit.

[0051] The data cooling authentication unit: utilizes the cooling authentication data protection algorithm to save all data through the global stack and determines whether the current authentication has passed; if the authentication passes, the request will be sent to the server side at one time according to the remaining situation in the current stack, and the server side will save the occurred data; if the authentication fails, all such data will be saved in the stack according to the user's behavior. After the user's authentication is completed, all resources in the stack will be released, and the process will return to the step of determining whether the authentication passes and start looping.

[0052] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device.

[0053] Finally, it should be noted that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A method for automatically reporting data based on the mobile application life cycle, characterized in that, The method includes the following steps: Step S1: Use the automatic monitoring full-link lifecycle algorithm to monitor the lifecycle events of each page of the mobile application; and automatically capture the return values of the corresponding hook functions; Step S2: Collect key metric data through custom event data logging and system event data logging techniques; Step S3: Use the cooling authentication data protection algorithm to store and manage the data to be reported. When the user has not completed authentication, the data is temporarily stored in the global stack. After the user completes authentication, the stored data is automatically reported to the server in batches; Step S4: Based on preset rules, upload the collected data to the server side and provide status code feedback.

2. The data automatic reporting method based on the mobile application life cycle according to claim 1, wherein, The lifecycle events include application startup, display, hiding, page loading, page hiding, and page sharing; the automatic monitoring full-link lifecycle algorithm intercepts each lifecycle event through an event proxy mechanism, independently records the event trigger situation, and does not affect the original system hook function.

3. The data automatic reporting method based on the mobile application life cycle according to claim 2, wherein The key metric data includes user access volume data, function usage data, and legal person login method data.

4. A data automatic reporting method based on the mobile application life cycle according to claim 3, characterized in that, The data logging techniques include automatic data logging and custom data logging; the automatic data logging captures application startup, page display, and page hiding operations based on system lifecycle events; the custom data logging supports users to define custom data logging rules to collect specific operation behaviors, and the specific operation behaviors include clicks on specific functions, form submissions, and jump events.

5. A data automatic reporting method based on the mobile application life cycle according to claim 4, characterized in that, The cooling authentication data protection algorithm saves all data through the global stack and judges whether the current authentication has passed; if the authentication passes, the requests are sent to the server side at one time according to the remaining situation in the current stack, and the server side saves the generated data; if the authentication fails, all such data is saved in the stack according to the user's behavior. After the user completes authentication, all resources in the stack are released, and the process returns to the step of judging whether the authentication has passed to start looping.

6. A data automatic reporting system based on the mobile application life cycle, which executes a data automatic reporting method based on the mobile application life cycle as described in any one of claims 1-5, characterized in that, The system includes: a full-link lifecycle monitoring module, a data logging data collection module, a data cooling authentication module, and a data reporting module; The full-link lifecycle monitoring module: Use the automatic monitoring full-link lifecycle algorithm to monitor the lifecycle events of each page of the mobile application; and automatically capture the return values of the corresponding hook functions; The data logging data collection module: Collect key metric data through custom event data logging and system event data logging techniques; The data cooling authentication module: Use the cooling authentication data protection algorithm to store and manage the data to be reported. When the user has not completed authentication, the data is temporarily stored in the global stack. After the user completes authentication, the stored data is automatically reported to the server in batches; The data reporting module: Based on preset rules, upload the collected data to the server side and provide status code feedback.

7. The data automatic reporting system based on the mobile application life cycle according to claim 6, characterized in that: The full-link lifecycle monitoring module includes a full-link lifecycle monitoring unit; The full-link lifecycle monitoring unit: Use the automatic monitoring full-link lifecycle algorithm to intercept each lifecycle event through an event proxy mechanism, and independently record the event trigger situation without affecting the original system hook function, realizing the complete separation of monitoring and business logic.

8. The data automatic reporting system based on the mobile application life cycle according to claim 7, characterized in that: The described buried point data acquisition module includes a buried point data acquisition unit; The buried point data acquisition unit: The buried point technology includes automatic buried point and custom buried point; The automatic buried point captures application startup, page display, and page hiding operations based on system lifecycle events; The custom buried point supports users to define custom buried point rules and collect specific operation behaviors. The specific operation behaviors include clicks on specific functions, form submissions, and jump events.

9. The data automatic reporting system based on the mobile application life cycle according to claim 8, characterized in that: The data cooling authentication module includes a data cooling authentication unit; The data cooling authentication unit: uses the cooling authentication data protection algorithm to save all data through a global stack and determine whether the current authentication has passed; If the authentication passes, the request is sent to the server - side at one time according to the remaining situation in the current stack, and the server - side saves the occurred data; If the authentication fails, all such data is saved in the stack according to the user's behavior. After the user's authentication is completed, all resources in the stack are released, and it returns to the step of determining whether the authentication passes to start a loop execution.