iOS Seamless Data Collection and Analysis Method, Device, Computer Equipment and Storage Medium
By establishing data paths in iOS applications and corresponding to life cycle and control functions, collecting and uploading data to the server to generate analysis results, the problems of low efficiency and instability of iOS data acquisition and development are solved, and efficient data acquisition and analysis display are achieved.
Patent Information
- Application Number
- CN202210709723.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-22
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2042-06-22
AI Technical Summary
In the prior art, iOS data acquisition and development are inefficient and instability problems, especially in mobile data acquisition and analysis, which requires multi-party communication and code modification, resulting in a long development cycle and difficult to meet complex business needs.
The data path of each page is established in the target iOS application, including the page path and control path from the controller to the page, and establish a correspondence with the application life cycle and control functions. After collecting the data, the rules are satisfied and written to the database and uploaded to the server to generate analysis data. The target user displays the analysis results in the application.
It solves the problem of long and inefficient data acquisition and development cycle, avoids the instability caused by invasive data acquisition methods, and realizes efficient data acquisition and analysis display.
Smart Images

Figure CN115202996B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data collection and analysis, and particularly to an iOS seamless data collection and analysis method, device, computer device, and storage medium. Background Art
[0002] In the field of data collection and analysis, especially for mobile data collection and analysis, the existing technology requires software developers to fill in buried point content during code writing. This process involves communication among product personnel, testers, operators, etc., and there is also a process approval for the buried point content in the code, resulting in a long data collection development cycle and low efficiency.
[0003] Meanwhile, in the data collection SDK access function provided by a third-party company, a full buried point solution is provided, which can perform simple automatic collection of basic data, but cannot meet the requirements for more complex business data collection. Moreover, this data collection SDK uses an invasive system method, which is invasive and unstable at the code level. Summary of the Invention
[0004] Embodiments of the present invention provide an iOS seamless data collection and analysis method, device, computer device, and storage medium to solve the problems of low development efficiency, invasiveness, and instability in iOS data collection in the existing technology.
[0005] An iOS seamless data collection and analysis method includes:
[0006] Establish a first data path for each page in a target iOS application, where the first data path includes a page path from a controller to the page and a control path from a root node in the page to each control;
[0007] Establish a target correspondence between the page path and the application life cycle and controller life cycle of the target iOS application respectively, and establish a target correspondence between the control path and a target function corresponding to the control;
[0008] Obtain first data generated by the first data path of the page, where the first data includes page data generated corresponding to the page path during the operation of the application life cycle and controller life cycle of the target iOS application and control data generated corresponding to the control path during the operation of the target function of the control;
[0009] When the first data meets a preset first rule, write the first data cached in memory into a first database;
[0010] When the first data stored in the first database meets the preset second rule, upload the first data to the server side according to the preset upload method, so that the first data is processed on the server side to generate analysis data;
[0011] The target user with the first permission in the target iOS application receives the update notification of the analysis data pushed by the server side, and the target user obtains the analysis data for display in the target iOS application from the server side according to the update notification.
[0012] An iOS traceless data collection and analysis device, comprising:
[0013] A path establishment module, configured to establish a first data path for each page in the target iOS application, where the first data path includes a page path from a controller to the page and a control path from a root node in the page to each control;
[0014] A relationship establishment module, configured to establish a target correspondence relationship between the page path and the application life cycle and the controller life cycle of the target iOS application respectively, and establish a target correspondence relationship between the control path and the target function corresponding to the control;
[0015] A data collection module, configured to obtain the first data generated by the first data path of the page, where the first data includes page data generated corresponding to the page path during the operation of the application life cycle and the controller life cycle of the target iOS application and control data generated corresponding to the control path during the operation of the target function of the control;
[0016] A data saving module, configured to write the first data cached in the memory into the first database when the first data meets the preset first rule;
[0017] A data upload module, configured to upload the first data to the server side according to the preset upload method when the first data stored in the first database meets the preset second rule, so that the first data is processed on the server side to generate analysis data;
[0018] An analysis and display module, configured to enable the target user with the first permission in the target iOS application to receive the update notification of the analysis data pushed by the server side, and the target user obtains the analysis data for display in the target iOS application from the server side according to the update notification.
[0019] A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above iOS traceless data acquisition and analysis method when executing the computer program.
[0020] A computer-readable storage medium storing a computer program, wherein the computer program implements the steps of the above iOS traceless data acquisition and analysis method when executed by a processor.
[0021] The above iOS traceless data acquisition and analysis method, device, computer device, and storage medium establish a first data path for each page in the target iOS application, and respectively establish a target correspondence between the page path and the application life cycle and the controller life cycle of the target iOS application, establish a target correspondence between the control path and the target function corresponding to the control, then obtain the first data generated by the first data path of the page, write the first data cached in the memory into the first database, and upload the first data to the server side, so that the first data is processed on the server side to generate analysis data, and finally display the analysis data in the target iOS application. It not only solves the problems of long data acquisition development cycle and low efficiency in the prior art, but also avoids the instability problems brought by the invasive data acquisition method. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0023] Figure 1 is a schematic diagram of an application environment of the iOS traceless data acquisition and analysis method in an embodiment of the present invention;
[0024] Figure 2 is a flowchart of the iOS traceless data acquisition and analysis method in an embodiment of the present invention;
[0025] Figure 3 is a schematic structural diagram of the iOS traceless data acquisition and analysis device in an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of a computer device in an embodiment of the present invention;
[0027] Figure 5 is a schematic diagram of the life cycle state transition of an iOS application in an embodiment of the present invention. Detailed implementation manners
[0028] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. 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] The iOS trace - less data collection and analysis method provided by this application can be applied in an application environment such as Figure 1 , where the terminal device communicates with the server through a network. Among them, the terminal device can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of multiple servers.
[0030] In one embodiment, as Figure 2 shown, an iOS trace - less data collection and analysis method is provided. Taking the terminal device in Figure 1 as an example, the method includes the following steps S101 to S106:
[0031] S101. Establish a first data path for each page in the target iOS application, where the first data path includes the page path from the controller to the page and the control path from the root node in the page to each control.
[0032] Specifically, first, obtain all the controllers in the target iOS application and traverse the page paths of each page that each controller can reach. For example, for a news page in a certain iOS application, establish a page path of UITabarController - UINavigationController - NewsViewController. Then, obtain the root node of the page in the target iOS application and traverse the control paths of each control in the page that the root node of the page can reach. For example, for a "like" button on a certain page in a certain iOS application, establish a control path of UIWindow - UIViewController - UIView - UIButton_Content. Finally, for each page, merge the page path and the control path as the first data path.
[0033] Among them, the controller in the target iOS application is the basis for constructing the user interface in the iOS system. The controller includes, but is not limited to: UIViewController, UINavigationController, UITableViewController, UICollectionViewController, UITabBarController, UIPageViewController, UISearchController, UISplitViewController. The controls on the page include, but are not limited to: UIView, UILabel, UIButton, UITextField, UIBarButtonItem, UIImageView. It should be further noted that all the content of the controller and the control can be found in the corresponding official iOS developer materials. The controller and the control in this embodiment include not only the controllers and controls officially provided by the iOS system, but also the controllers and controls that will be officially provided by the future iOS system, as well as various custom controllers and custom controls extended from the officially provided controllers and controls.
[0034] S102. Establish a target correspondence between the page path and the application life cycle of the target iOS application, and establish a target correspondence between the control path and the target function corresponding to the control.
[0035] Specifically, first, establish a target correspondence between the page path and the application life cycle of the target iOS application; then, cluster the page path according to the controller, and establish a target correspondence between each controller and the corresponding page path; finally, cluster the control path according to the control, and establish a target correspondence between the target function of each control and the corresponding control path.
[0036] Among them, as Figure 5Schematic diagram of the life cycle state transition of the iOS application shown. The application life cycle of the target iOS application refers to the switching of the target iOS application among states such as not running, not activated, activated, background, and suspended. Among them, the not-activated state and the activated state are visible to the user, and the background state is invisible to the user. At the same time, the functions included in the application life cycle include but are not limited to: applicationDidBecomeActive, applicationDidEnterBackground, applicationDidFinishLaunchingWithOptions, applicationWillEnterForeground, applicationWillResignActive, etc.
[0037] Among them, the target function of the control refers to the function triggered and called when the control changes. For example, when the login button control on the login interface of the target iOS application is clicked, the click event function of the login button control is triggered. The changes that occur to the control include but are not limited to: being clicked, being long-pressed, being swiped, being dragged, being double-clicked, the change of the text content, the change of the visible state, the change of the clickable state, etc.
[0038] S103. Obtain the first data generated by the first data path of the page. Among them, the first data includes the page data corresponding to the page path collected during the operation of the application life cycle and the controller life cycle of the target iOS application and the control data corresponding to the control path collected during the operation of the target function of the control.
[0039] S104. When the first data meets the preset first rule, write the first data cached in the memory into the first database.
[0040] Specifically, first, collect the first data generated by the first data path of the page in the target iOS application, and insert the collected first data into the memory. Then, if the total number of the first data in the memory is greater than a preset first quantity, and / or the memory space occupied by the first data in the memory is greater than a preset first memory space. Finally, write the first data in the memory into the first database, and clear the first data cached in the memory. Among them, the total number of the first data and / or the preset first memory space need to be flexibly set according to the total memory size of the hardware device where the target iOS application is located, that is, increase the total number of the first data and / or the preset first memory space when the total memory of the hardware device is larger, and decrease the total number of the first data and / or the preset first memory space when the total memory of the hardware device is smaller. It should be further noted that the total memory size of the hardware device refers to the total memory size that can be used together by all software applications (including system software applications and third-party software applications) on the hardware device. Another concept derived therefrom is the remaining memory size on the hardware device, that is, the remaining memory size that can still be allocated to software applications for use on the hardware device. The remaining memory size is equal to the total memory size minus the software size occupied by all software applications. When the remaining memory size reaches a certain numerical range, the first data cached in the memory should also be written into the database in a timely manner, so that the first data is persisted and the memory space is released. On the one hand, it avoids affecting the operation of software applications on the hardware device when the remaining memory size becomes smaller, such as software applications becoming stuck or crashing. On the other hand, it avoids triggering the system memory recycling mechanism and causing the first data saved in the memory to be recycled by the system without being persisted.
[0041] S105. When the first data saved in the first database meets a preset second rule, upload the first data to the server side according to a preset upload method, so that the first data is processed on the server side to generate analysis data.
[0042] Specifically, first, create a first thread for uploading the first data to the server, and then use the first thread to monitor whether the first data is newly added to the first database and upload the newly added first data to the server side. At the same time, create a first scheduled task for monitoring the total number of the first data and the total storage size in the first database, and then start the first scheduled task to detect the total number and / or the total storage size every first preset duration. If the total number is greater than the preset first threshold number, and / or the total storage size is greater than the preset first threshold storage size, then upload the first data saved in the first database to the server. At the same time, delete the first data that has been uploaded and saved in the first database. It should be further noted that the first preset duration is not fixed. The first thread not only monitors whether the first data is newly added to the first database, but also monitors the growth rate of the first data in the first database, that is, monitors the growth rate of the total number and the total storage size of the first data. When the growth rate increases, it is necessary to reduce the first preset duration to ensure that the first data can be transferred and stored to the server side more quickly. When the growth rate decreases, it is necessary to extend the first preset duration to reduce the access frequency of the first thread to the first database and avoid more system resource consumption. At the same time, the growth rate can be set to a reasonable speed range according to the change history of the growth rate during the operation of the target iOS application, and accordingly reduce or increase the first preset duration.
[0043] Further, the first data is processed at the server side to generate analysis data, and the generated analysis data is also saved in the database of the server. The processing method of the analysis data is based on the prior art, so it will not be elaborated here. It should be particularly noted that the first data also includes the crash data of the target iOS application. For example, the target iOS application crashes when entering a certain page or after the user clicks a certain button control in the target iOS application. The server side also analyzes the crash data. It should be particularly noted that the crash data is encrypted during the transmission from the hardware device where the target iOS application is located to the server side, and the key required for decryption is saved on the server side. The server side obtains the target code segment that causes the crash from the crash data, runs the target code segment in a pre-deployed code running environment, and checks whether there are problems or defects in the target code segment according to the running result of the target code segment. Further, according to the above-mentioned analysis process of the server side for the crash data, a corresponding crash data analysis model is established, and the server side uses the crash data to train the crash data analysis model. After the crash data analysis model is trained, the server side uses the crash data analysis model for intelligent analysis.
[0044] S106. The target user with the first permission in the target iOS application receives the update notification of the analysis data pushed by the server side, and the target user obtains the analysis data for display in the target iOS application from the server side according to the update notification.
[0045] Specifically, first, the target user receives the update notification on the mobile device where the target iOS application is located. Then, receive the setting instruction input by the target user according to the update notification. The setting instruction is used to set the target page and the target time period in the network request for obtaining the analysis data sent to the server. Finally, receive the analysis data returned by the server, and display the analysis data within the target time period on the target page of the target iOS application. It should be particularly noted that the target user has special permissions for the target iOS application, that is, the target user is a target user such as a developer, an operator, a tester, etc. related to the target iOS application, rather than an ordinary user of the target iOS application. The page display effect of the analysis data in the target iOS application is developed by the software developer of the target iOS application according to the display requirements provided by the target user and / or the display methods in the prior art, and at the same time, multiple switching functions of the display effect are provided.
[0046] Further, start a second timing task in the target iOS application used by the target user; the second timing task obtains the analysis data of the target page within the target time period from the server side at a preset time interval. It should be further noted that the preset time interval in the second timing task can be adjusted by the target user according to actual needs. For example, during the peak period of user activity in the target iOS application (such as holding an online event), the target user can narrow the preset time interval to quickly obtain the analysis data from the server and judge the effect of the online event based on the analysis data. During the period of low user activity in the target iOS application, the target user can increase the preset time interval and tend to obtain the historical situation of the analysis data to analyze the historical operation situation of the target iOS application.
[0047] The iOS seamless data collection and analysis method proposed in this embodiment establishes a first data path for each page in the target iOS application, and establishes a target correspondence between the page path and the application life cycle and the controller life cycle of the target iOS application respectively, and establishes a target correspondence between the control path and the target function corresponding to the control. Then, obtain the first data generated by the first data path of the page, write the first data cached in the memory into the first database, and upload the first data to the server side so that the first data is processed on the server side to generate analysis data. Finally, the analysis data is also displayed in the target iOS application. It not only solves the problems of long data collection development cycle and low efficiency in the prior art, but also avoids the instability problems brought by the intrusive data collection method.
[0048] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0049] In one embodiment, an iOS seamless data collection and analysis device 100 is provided. The iOS seamless data collection and analysis device 100 corresponds one-to-one with the iOS seamless data collection and analysis method in the above embodiment. As Figure 3 shown, the iOS seamless data collection and analysis device 100 includes a path establishment module 11, a relationship establishment module 12, a data collection module 13, a data storage module 14, a data upload module 15, and an analysis display module 16. The detailed descriptions of each functional module are as follows:
[0050] A path establishment module 11 is used to establish a first data path for each page in a target iOS application. The first data path includes a page path from a controller to the page and a control path from a root node in the page to each control.
[0051] A relationship establishment module 12 is used to establish target corresponding relationships between the page path and the application life cycle and the controller life cycle of the target iOS application respectively, and establish a target corresponding relationship between the control path and a target function corresponding to the control.
[0052] A data collection module 13 is used to obtain first data generated by the first data path of the page. The first data includes page data corresponding to the page path collected during the operation of the application life cycle and the controller life cycle of the target iOS application, and control data corresponding to the control path collected during the operation of the target function of the control.
[0053] A data saving module 14 is used to write the first data cached in memory into a first database when the first data meets a preset first rule.
[0054] A data uploading module 15 is used to upload the first data to a server side according to a preset uploading method when the first data saved in the first database meets a preset second rule, so that the first data is processed on the server side to generate analysis data.
[0055] An analysis and display module 16 is used for a target user with a first permission in the target iOS application to receive an update notification of the analysis data pushed by the server side, and the target user obtains the analysis data for display in the target iOS application from the server side according to the update notification.
[0056] Furthermore, the path establishment module 11 further includes:
[0057] A page path sub-module is used to obtain all controllers in the target iOS application and traverse the page paths of each page that each controller can reach.
[0058] A control path sub-module is used to obtain the root node of the page in the target iOS application and traverse the control paths of each control in the page that the root node of the page can reach.
[0059] A data path sub-module is used to, for each page, merge the page path and the control path as the first data path.
[0060] Furthermore, the relationship establishment module 12 further includes:
[0061] The first correspondence sub-module is used to establish a target correspondence between the page path and the application life cycle of the target iOS application;
[0062] The second correspondence sub-module is used to cluster the page paths according to the controller, and establish a target correspondence between each controller and the corresponding page path;
[0063] The third correspondence sub-module is used to cluster the control paths according to the control, and establish a target correspondence between the target function of each control and the corresponding control path.
[0064] Further, the data acquisition module 13 further includes:
[0065] The data insertion sub-module is used to collect the first data generated by the first data path of the page, and insert the collected first data into the memory;
[0066] The data judgment sub-module is used to determine if the total number of the first data in the memory is greater than a preset first quantity, and / or the memory space occupied by the first data in the memory is greater than a preset first memory space;
[0067] The data storage sub-module is used to write the first data in the memory into the first database, and clear the first data cached in the memory.
[0068] Further, the data upload module 15 further includes:
[0069] The thread creation sub-module is used to create a first thread for uploading the first data to the server;
[0070] The data monitoring sub-module is used to use the first thread to monitor whether new first data is added to the first database, and upload the newly added first data to the server side;
[0071] The scheduled task sub-module is used to create a first scheduled task for monitoring the total number and total storage size of the first data in the first database;
[0072] The scheduled detection sub-module is used to start the first scheduled task, and detect the total number and / or the total storage size every first preset duration;
[0073] The data synchronization sub-module is used to, if the total number is greater than a preset first threshold number, and / or the total storage size is greater than a preset first threshold storage size, upload the first data saved in the first database to the server, and delete the first data that has been uploaded and saved in the first database.
[0074] Furthermore, the analysis and display module 16 further includes:
[0075] An update notification sub-module, configured to receive the update notification by the target user on the mobile device where the target iOS application is located;
[0076] A request setting sub-module, configured to receive a setting instruction input by the target user according to the update notification, where the setting instruction is used to set a target page and a target time period in a network request for obtaining the analysis data sent to the server;
[0077] An analysis data display sub-module, configured to receive the analysis data returned by the server and display the analysis data within the target time period on the target page of the target iOS application.
[0078] Furthermore, the analysis data display sub-module further includes:
[0079] A second timing task sub-unit, configured to start a second timing task in the target iOS application used by the target user;
[0080] A timing update data sub-unit, configured to enable the second timing task to obtain the analysis data of the target page within the target time period from the server side according to a preset time interval.
[0081] The meanings of "first" and "second" in the above modules / units are only used to distinguish different modules / units, and are not used to limit which module / unit has a higher priority or other limiting meanings. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or modules does not necessarily have to be limited to those clearly listed steps or modules, but may include other steps or modules that are not clearly listed or are inherent to these processes, methods, products or devices. The division of modules in this application is only a logical division, and there may be other division methods in actual implementation.
[0082] For the specific limitations of the iOS seamless data collection and analysis device, reference can be made to the limitations of the iOS seamless data collection and analysis method described above, which will not be elaborated here. Each module in the above iOS seamless data collection and analysis device can be implemented in whole or in part by software, hardware and their combinations. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to the above respective modules.
[0083] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in Figure 4 . The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it implements an iOS traceless data collection and analysis method.
[0084] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the iOS traceless data collection and analysis method in the above embodiment, such as Figure 2 the steps S101 to S106 shown and the extensions and related steps of the method. Or, when the processor executes the computer program, it implements the functions of each module / unit of the iOS traceless data collection and analysis device in the above embodiment, such as Figure 3 the functions of modules 11 to 16 shown. To avoid repetition, it will not be elaborated here.
[0085] The processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The processor is the control center of the computer device, and connects various parts of the entire computer device through various interfaces and lines.
[0086] The memory can be used to store the computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and invoking the data stored in the memory, the processor realizes various functions of the computer device. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, video data, etc.).
[0087] The memory can be integrated in the processor or separately provided from the processor.
[0088] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it realizes the steps of the iOS seamless data collection and analysis method in the above embodiment, such as Figure 2 the steps S101 to S106 shown and the extensions and related steps of other extensions of the method. Or, when the computer program is executed by a processor, it realizes the functions of each module / unit of the iOS seamless data collection and analysis device in the above embodiment, such as Figure 3 the functions of the modules 11 to 16 shown. To avoid repetition, it will not be elaborated here.
[0089] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0090] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0091] The above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. An iOS traceless data collection and analysis method, characterized in that including: establishing a first data path for each page in the target iOS application, where the first data path includes a page path from a controller to the page and a control path from a root node in the page to each control; establishing a target correspondence between the page path and the application life cycle and the controller life cycle of the target iOS application respectively, and establishing a target correspondence between the control path and a target function corresponding to the control; obtaining first data generated by the first data path of the page, where the first data includes page data generated corresponding to the page path collected during the operation of the application life cycle and the controller life cycle of the target iOS application and control data generated corresponding to the control path collected during the operation of the target function of the control; when the first data meets a preset first rule, writing the first data cached in memory into a first database; when the first data saved in the first database meets a preset second rule, uploading the first data to a server side according to a preset uploading method so that the first data is processed on the server side to generate analysis data; a target user having a first permission in the target iOS application receives an update notification of the analysis data pushed by the server side, and the target user obtains the analysis data for display in the target iOS application from the server side according to the update notification.
2. The iOS traceless data collection and analysis method according to claim 1, characterized in that, The establishing a first data path for each page in the target iOS application, where the first data path includes a page path from a controller to the page and a control path from a root node in the page to each control includes: obtaining all controllers in the target iOS application and traversing the page paths of each page that each controller can reach; obtaining the root node of the page in the target iOS application and traversing the control paths of each control in the page that the root node of the page can reach; for each page, merging the page path and the control path as the first data path.
3. The iOS traceless data acquisition and analysis method according to claim 1, characterized in that The establishing a target correspondence between the page path and the application life cycle and the controller life cycle of the target iOS application respectively, and establishing a target correspondence between the control path and a target function corresponding to the control includes: establishing a target correspondence between the page path and the application life cycle of the target iOS application; clustering the page path according to the controller and establishing a target correspondence between each controller and the corresponding page path; clustering the control path according to the control and establishing a target correspondence between the target function of each control and the corresponding control path.
4. The iOS seamless data collection and analysis method according to claim 1, characterized in that The when the first data meets a preset first rule, writing the first data cached in memory into a first database includes: collecting the first data generated by the first data path of the page and inserting the collected first data into memory; If the total number of the first data in the memory is greater than a preset first quantity, and / or the memory space occupied by the first data in the memory is greater than a preset first memory space; Write the first data in the memory to the first database, and clear the first data cached in the memory.
5. The iOS seamless data collection and analysis method according to claim 1, wherein, When the first data saved in the first database meets a preset second rule, uploading the first data to the server side according to a preset uploading method includes: Create a first thread for uploading the first data to the server; Use the first thread to monitor whether new first data is added to the first database, and upload the newly added first data to the server side; Create a first timing task for monitoring the total number of the first data and the total storage size in the first database; Start the first timing task, and detect the total number and / or the total storage size every first preset duration; If the total number is greater than a preset first threshold number, and / or the total storage size is greater than a preset first threshold storage size, upload the first data saved in the first database to the server, and delete the first data that has been uploaded and saved in the first database.
6. The iOS seamless data collection and analysis method according to claim 1, characterized in that The target user obtaining the analysis data for displaying on each page of the target iOS application from the server side according to the update notification includes: The target user receives the update notification on the mobile device where the target iOS application is located; Receive a setting instruction input by the target user according to the update notification, where the setting instruction is used to set a target page and a target time period in a network request for obtaining the analysis data sent to the server; Receive the analysis data returned by the server, and display the analysis data within the target time period on the target page of the target iOS application.
7. The iOS seamless data collection and analysis method according to claim 6, characterized in that, After the target user obtains the analysis data for displaying on the target iOS application from the server side according to the update notification, it further includes: Start a second timing task in the target iOS application used by the target user; The second timing task obtains the analysis data of the target page within the target time period from the server side according to a preset time interval.
8. An iOS traceless data acquisition and analysis device, characterized in that Include: A path establishment module for establishing a first data path for each page in the target iOS application, where the first data path includes a page path from a controller to the page and a control path from a root node in the page to each control; A relationship establishment module for establishing a target correspondence relationship between the page path and the application life cycle and the controller life cycle of the target iOS application respectively, and establishing a target correspondence relationship between the control path and a target function corresponding to the control; A data acquisition module, configured to obtain first data generated by the first data path of the page, wherein the first data includes page data corresponding to the page path collected during the application life cycle and the controller life cycle of the target iOS application, and control data corresponding to the control path collected during the operation of the target function of the control; A data saving module, configured to write the first data cached in the memory into a first database when the first data meets a preset first rule; A data uploading module, configured to upload the first data to a server side according to a preset uploading method when the first data saved in the first database meets a preset second rule, so that the first data is processed on the server side to generate analysis data; An analysis and display module, configured to enable a target user with a first permission in the target iOS application to receive an update notification of the analysis data pushed by the server side, and the target user obtains the analysis data for display in the target iOS application from the server side according to the update notification.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the iOS traceless data acquisition and analysis method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the steps of the iOS traceless data acquisition and analysis method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Event tracking processing method and device, computer device and storage medium
CN107818162A
Data association method and device for data acquisition triggered by control
CN110489312A