Big data tracking method, device, equipment and medium for application
By adding a point buried plug-in and performing class loading operations when the application is started, the time-consuming and labor-intensive and risky problems caused by modifying the original code in the existing technology are solved, and non-invasive big data point buried and precise data analysis are achieved.
Patent Information
- Application Number
- CN202111440057.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-11-30
AI Technical Summary
When the existing technology uses big data burial points in applications, the original code needs to be modified, which leads to time-consuming, labor-intensive, risky and high maintenance costs.
By creating a buried point plug-in and adding it to the application's initial startup command, performing class loading operations when the application starts, obtaining configuration files and class object files, establishing a buried point record list, performing class definitions and data acquisition, and realizing non-invasive buried points.
No need to modify the original code, reduces abnormal risks, reduces development costs, and enables accurate data analysis and push.
Smart Images

Figure CN114185776B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data technology, and in particular to a method, device, equipment and medium for burying big data points in an application. Background Art
[0002] As major companies continue to expand their businesses, the functions of the applications they develop are becoming more and more numerous, and the number of users is also increasing. Therefore, in order to analyze various user behaviors, it is necessary to embed data in the applications in order to provide better services to users.
[0003] The currently commonly used tracking solution involves modifying the corresponding backend business code and performing a series of operations such as packaging, testing, publishing, and online release. This tracking solution has the following main problems:
[0004] (1) The original code must be modified and re-released for each tracking requirement, which is time-consuming and labor-intensive;
[0005] (2) Since the modification is done in the original code, the logic of the original code is changed. Once abnormal code appears, it will affect the operation of the entire code, which is a high risk;
[0006] (3) Since the modification is made in the original code and the embedding scenarios are diverse, the form of the modified code is also diverse, which is not easy to read and has a high maintenance cost. Summary of the Invention
[0007] In view of the above, it is necessary to provide a method, device, equipment and medium for big data tracking of applications, aiming to solve the problems of high risk and high cost of big data tracking of applications.
[0008] A method for tracing data points of an application using big data, the method comprising:
[0009] Establish a tracking plug-in, and add the tracking plug-in to the initial startup command of the application to be tracked, to obtain the target startup command of the tracking plug-in;
[0010] When the target startup command is used to start the application to be embedded, a class loading operation is performed;
[0011] After the class loading operation is completed, the class object file is obtained, and the tracking configuration file stored in the specified database is obtained;
[0012] Create a tracking record list according to the class object file and the tracking configuration file;
[0013] Define the class according to the buried point record list to obtain the target class object file after the buried point;
[0014] When it is detected that the target class object file is executed, the embedded point data of the target class object file is obtained.
[0015] According to a preferred embodiment of the present invention, adding the tracking plug-in to the initial startup command of the application to be tracked to obtain the target startup command of the tracking plug-in to be tracked includes:
[0016] Obtain the storage path of the tracking plug-in;
[0017] The storage path of the tracking plug-in is added to the initial startup command to obtain the target startup command.
[0018] According to a preferred embodiment of the present invention, performing the class loading operation includes:
[0019] Start the virtual machine container corresponding to the application to be embedded;
[0020] Obtain the storage path of the tracking plug-in from the target startup command;
[0021] Call the tracking plug-in from the storage path and obtain the file stored in the tracking plug-in;
[0022] The file stored in the tracking plug-in is loaded into the memory of the virtual machine container.
[0023] According to a preferred embodiment of the present invention, before obtaining the tracking configuration file stored in the designated database, the method further includes:
[0024] Obtaining historical tracking records, determining tracking requirements based on the historical tracking records, and generating the tracking configuration file based on the tracking requirements; and / or
[0025] Collect the tracking requirements issued by the configuration page, and generate the tracking configuration file according to the tracking requirements issued by the configuration page.
[0026] According to a preferred embodiment of the present invention, establishing a burying point record list according to the class object file and the burying point configuration file includes:
[0027] Identify a tracking point file name from the tracking point configuration file;
[0028] Matching the class object file according to the embedded point file name;
[0029] Determine the file with the embedding file name in the class object file as the object to be embedded;
[0030] Generate the buried point record list based on the object to be buried point.
[0031] According to a preferred embodiment of the present invention, the class definition is performed according to the buried point record list, and the target class object file after the buried point is obtained includes:
[0032] Obtaining the function in the object to be embedded;
[0033] Obtaining the embedding function of the object to be embedded from the embedding configuration file;
[0034] Add the embedding function before the function function in the object to be embedded, and obtain the code block of the object to be embedded;
[0035] The code block of the object to be embedded is determined as the target class object file.
[0036] According to a preferred embodiment of the present invention, after obtaining the embedded data of the target class object file, the method further includes:
[0037] Obtaining the number of executions of the target function within a preset time range from the embedded data;
[0038] Calculate the daily activity of the target function according to the number of executions and the preset time range;
[0039] When the daily active users are greater than or equal to a configured threshold, determining the target content corresponding to the target function;
[0040] In each pre-configured period, associated content of the target content is obtained and pushed.
[0041] A big data tracking device for an application, comprising:
[0042] An establishing unit, configured to establish a tracking plug-in, and add the tracking plug-in to an initial startup command of an application to be tracked, thereby obtaining a target startup command of the tracking plug-in to be tracked;
[0043] An execution unit, configured to perform a class loading operation when the target application is started using the target startup command;
[0044] An acquisition unit, configured to acquire the class object file and the tracking configuration file stored in the specified database after the class loading operation is completed;
[0045] The establishing unit is further configured to establish a burying point record list according to the class object file and the burying point configuration file;
[0046] A class definition unit is used to define a class according to the embedding record list and obtain a target class object file after embedding;
[0047] The acquisition unit is further configured to acquire the embedded point data of the target class object file when it is detected that the target class object file is executed.
[0048] A computer device, comprising:
[0049] a memory storing at least one instruction; and
[0050] A processor executes instructions stored in the memory to implement the big data tracking method of the application.
[0051] A computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement a big data tracking method for the application.
[0052] It can be seen from the above technical solutions that the present invention can establish a tracing plug-in and add the tracing plug-in to the initial startup command of the application to be tracing, obtain the target startup command of the plug-in to be tracing, and when the application to be tracing is started, the tracing plug-in can be run without perception in the back-end system. When the application to be tracing is started using the target startup command, a class loading operation is performed so that the class object file can be processed subsequently. After the class loading operation is completed, the class object file is obtained, and the tracing configuration file stored in the specified database is obtained. A tracing record list is established according to the class object file and the tracing configuration file, and the class object file is screened based on the tracing configuration file to facilitate subsequent targeted tracing. Class definition is performed according to the tracing record list to obtain the target class object file after tracing. The original code is not changed. When performing big data tracing, the original code will not be affected. When it is detected that the target class object file is executed, the tracing data of the target class object file is obtained, thereby realizing non-intrusive tracing of the application. Since the logic of the original code is not changed, even if an exception occurs, it will not affect the running logic of the overall code, thereby reducing the risk of exceptions. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flow chart of a preferred embodiment of the big data tracking method of the application of the present invention.
[0054] Figure 2 It is a functional module diagram of a preferred embodiment of the big data tracking device of the application of the present invention.
[0055] Figure 3 It is a structural diagram of a computer device of a preferred embodiment of the present invention for implementing a big data tracking method for an application. DETAILED DESCRIPTION
[0056] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0057] like Figure 1 FIG. 1 is a flow chart of a preferred embodiment of the big data tracking method for an application of the present invention. The order of the steps in the flow chart can be changed and some steps can be omitted according to different requirements.
[0058] The big data tracking method of the application is applied to one or more computer devices. The computer device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0059] The computer device may be any electronic product that can interact with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive network television (IPTV), a smart wearable device, etc.
[0060] The computer device may also include a network device and / or a user device, wherein the network device includes, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.
[0061] The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0062] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0063] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0064] The network where the computer device is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.
[0065] S10: Create a tracking plug-in and add the tracking plug-in to the initial startup command of the application to be tracked, so as to obtain the target startup command of the tracking plug-in.
[0066] In this embodiment, the buried point plug-in can be a .jar file, such as bigdata-buried-point.jar.
[0067] In at least one embodiment of the present invention, adding the tracking plug-in to the initial startup command of the application to be tracked to obtain the target startup command of the tracking plug-in includes:
[0068] Obtain the storage path of the tracking plug-in;
[0069] The storage path of the tracking plug-in is added to the initial startup command to obtain the target startup command.
[0070] For example, when the initial startup command is java-jar and the buried-point plug-in created is bigdata-buried-point.jar, the corresponding target startup command is java-javaagent: / xxx / bigdata-buried-point.jar.
[0071] Through the above implementation, when the application to be embedded is started, the embedding plug-in can be run without the back-end system being aware of it.
[0072] S11, when the target startup command is used to start the application to be embedded, a class loading operation is performed.
[0073] Specifically, the executing class loading operation includes:
[0074] Start the virtual machine container corresponding to the application to be embedded;
[0075] Obtain the storage path of the tracking plug-in from the target startup command;
[0076] Call the tracking plug-in from the storage path and obtain the file stored in the tracking plug-in;
[0077] The file stored in the tracking plug-in is loaded into the memory of the virtual machine container.
[0078] For example, the virtual machine container may be a JVM (Java Virtual Machine).
[0079] Through the above implementation, class loading can be achieved so that the class object file can be processed subsequently.
[0080] S12, after the class loading operation is completed, obtain the class object file and the tracking configuration file stored in the specified database.
[0081] In this embodiment, the class object file is stored in the memory of the virtual machine container.
[0082] In this embodiment, the designated database may be any type of database, and the designated database is used to store tracking demand data of each associated application, such as the tracking configuration file.
[0083] In this embodiment, the burying point configuration file records the burying point location, burying point function, etc.
[0084] In at least one embodiment of the present invention, before obtaining the tracking configuration file stored in the designated database, the method further includes:
[0085] Obtaining historical tracking records, determining tracking requirements based on the historical tracking records, and generating the tracking configuration file based on the tracking requirements; and / or
[0086] Collect the tracking requirements issued by the configuration page, and generate the tracking configuration file according to the tracking requirements issued by the configuration page.
[0087] Among them, the configuration page is used to collect the tracking point requirements configured by relevant staff in real time to achieve real-time update of the tracking point requirements.
[0088] Through the above implementation method, the configuration file is generated by combining historical tracking records and real-time tracking requirements so that tracking can be carried out in a targeted manner according to actual needs.
[0089] S13, establishing a burying point record list according to the class object file and the burying point configuration file.
[0090] In at least one embodiment of the present invention, establishing a tracing record list according to the class object file and the tracing configuration file includes:
[0091] Identify a tracking point file name from the tracking point configuration file;
[0092] Matching the class object file according to the embedded point file name;
[0093] Determine the file with the embedding file name in the class object file as the object to be embedded;
[0094] Generate the buried point record list based on the object to be buried point.
[0095] Through the above implementation, class object files are screened based on the tracking configuration file, which facilitates subsequent targeted tracking.
[0096] S14, define the class according to the buried point record list to obtain the target class object file after the buried point.
[0097] Specifically, the class definition is performed according to the buried point record list, and the target class object file obtained after the buried point is obtained includes:
[0098] Obtaining the function in the object to be embedded;
[0099] Obtaining the embedding function of the object to be embedded from the embedding configuration file;
[0100] Add the embedding function before the function function in the object to be embedded, and obtain the code block of the object to be embedded;
[0101] The code block of the object to be embedded is determined as the target class object file.
[0102] In the above embodiment, by adding the embedding function before the functional function in the object to be embedded, the logic code of data embedding can be executed when the object to be embedded is called, which is equivalent to modifying the underlying bytecode without changing the original code. While embedding big data, it will not affect the original code.
[0103] S15, when it is detected that the target class object file is executed, obtaining the embedded data of the target class object file.
[0104] Through the above implementation, non-intrusive tracking of application programs can be achieved without making any modifications to the original code, effectively saving development costs. Moreover, since the logic of the original code is not changed, even if an exception occurs, it will not affect the operating logic of the entire code, thereby reducing the risk of exceptions.
[0105] In at least one embodiment of the present invention, after obtaining the embedded data of the target class object file, the method further includes:
[0106] Obtaining the number of executions of the target function within a preset time range from the embedded data;
[0107] Calculate the daily activity of the target function according to the number of executions and the preset time range;
[0108] When the daily active users are greater than or equal to a configured threshold, determining the target content corresponding to the target function;
[0109] In each pre-configured period, associated content of the target content is obtained and pushed.
[0110] The preset time range can be customized, such as 1 month.
[0111] The configuration threshold can be customized, such as 4.
[0112] The configured period may be every day, every two days, etc., which is not limited in the present invention.
[0113] For example, when it is obtained from the buried data that a user clicks on the page of product A 150 times within one month, the daily active volume is 5, which is greater than the configured threshold of 4. This indicates that the user frequently clicks and browses the product A and is likely to be interested in the product A. Then, related products of the product A are obtained and pushed every day for the user to filter and achieve accurate push.
[0114] Of course, other data analyses can also be performed using buried point data, which will not be discussed here.
[0115] It should be noted that in order to further improve the security of data and prevent data from being maliciously tampered with, the buried data can be stored in the blockchain node.
[0116] It can be seen from the above technical solutions that the present invention can establish a tracing plug-in and add the tracing plug-in to the initial startup command of the application to be tracing, obtain the target startup command of the plug-in to be tracing, and when the application to be tracing is started, the tracing plug-in can be run without perception in the back-end system. When the application to be tracing is started using the target startup command, a class loading operation is performed so that the class object file can be processed subsequently. After the class loading operation is completed, the class object file is obtained, and the tracing configuration file stored in the specified database is obtained. A tracing record list is established according to the class object file and the tracing configuration file, and the class object file is screened based on the tracing configuration file to facilitate subsequent targeted tracing. Class definition is performed according to the tracing record list to obtain the target class object file after tracing. The original code is not changed. When performing big data tracing, the original code will not be affected. When it is detected that the target class object file is executed, the tracing data of the target class object file is obtained, thereby realizing non-intrusive tracing of the application. Since the logic of the original code is not changed, even if an exception occurs, it will not affect the running logic of the overall code, thereby reducing the risk of exceptions.
[0117] like Figure 2 , is a functional module diagram of a preferred embodiment of a big data burying device for an application of the present invention. The big data burying device 11 of the application includes an establishment unit 110, an execution unit 111, an acquisition unit 112, and a class definition unit 113. The module / unit referred to in the present invention refers to a series of computer program segments that can be executed by a processor 13 and can perform fixed functions, which are stored in a memory 12. In this embodiment, the functions of each module / unit will be described in detail in subsequent embodiments.
[0118] The establishing unit 110 establishes a tracking plug-in and adds the tracking plug-in to an initial startup command of the application to be tracked, thereby obtaining a target startup command of the tracking plug-in.
[0119] In this embodiment, the buried point plug-in can be a .jar file, such as bigdata-buried-point.jar.
[0120] In at least one embodiment of the present invention, the establishing unit 110 adds the tracking plug-in to the initial startup command of the application to be tracked, and obtaining the target startup command of the tracking plug-in includes:
[0121] Obtain the storage path of the tracking plug-in;
[0122] The storage path of the tracking plug-in is added to the initial startup command to obtain the target startup command.
[0123] For example, when the initial startup command is java-jar and the buried-point plug-in created is bigdata-buried-point.jar, the corresponding target startup command is java-javaagent: / xxx / bigdata-buried-point.jar.
[0124] Through the above implementation, when the application to be embedded is started, the embedding plug-in can be run without the back-end system being aware of it.
[0125] When the execution unit 111 starts the application to be embedded using the target startup command, it performs a class loading operation.
[0126] Specifically, the execution unit 111 performs the class loading operation including:
[0127] Start the virtual machine container corresponding to the application to be embedded;
[0128] Obtain the storage path of the tracking plug-in from the target startup command;
[0129] Call the tracking plug-in from the storage path and obtain the file stored in the tracking plug-in;
[0130] The file stored in the tracking plug-in is loaded into the memory of the virtual machine container.
[0131] For example, the virtual machine container may be a JVM (Java Virtual Machine).
[0132] Through the above implementation, class loading can be achieved so that the class object file can be processed subsequently.
[0133] After the class loading operation is completed, the acquisition unit 112 acquires the class object file and the tracking configuration file stored in the specified database.
[0134] In this embodiment, the class object file is stored in the memory of the virtual machine container.
[0135] In this embodiment, the designated database may be any type of database, and the designated database is used to store tracking demand data of each associated application, such as the tracking configuration file.
[0136] In this embodiment, the burying point configuration file records the burying point location, burying point function, etc.
[0137] In at least one embodiment of the present invention, before obtaining the burying point configuration file stored in the specified database, historical burying point records are obtained, burying point requirements are determined based on the historical burying point records, and the burying point configuration file is generated based on the burying point requirements; and / or
[0138] Collect the tracking requirements issued by the configuration page, and generate the tracking configuration file according to the tracking requirements issued by the configuration page.
[0139] Among them, the configuration page is used to collect the tracking point requirements configured by relevant staff in real time to achieve real-time update of the tracking point requirements.
[0140] Through the above implementation method, the configuration file is generated by combining historical tracking records and real-time tracking requirements so that tracking can be carried out in a targeted manner according to actual needs.
[0141] The establishing unit 110 establishes a burying point record list according to the class object file and the burying point configuration file.
[0142] In at least one embodiment of the present invention, the establishing unit 110 establishes the burying point record list according to the class object file and the burying point configuration file, including:
[0143] Identify a tracking point file name from the tracking point configuration file;
[0144] Matching the class object file according to the embedded point file name;
[0145] Determine the file with the embedding file name in the class object file as the object to be embedded;
[0146] Generate the buried point record list based on the object to be buried point.
[0147] Through the above implementation, class object files are screened based on the tracking configuration file, which facilitates subsequent targeted tracking.
[0148] The class definition unit 113 performs class definition according to the embedding record list to obtain the target class object file after embedding.
[0149] Specifically, the class definition unit 113 performs class definition according to the buried point record list, and obtains the target class object file after the buried point includes:
[0150] Obtaining the function in the object to be embedded;
[0151] Obtaining the embedding function of the object to be embedded from the embedding configuration file;
[0152] Add the embedding function before the function function in the object to be embedded, and obtain the code block of the object to be embedded;
[0153] The code block of the object to be embedded is determined as the target class object file.
[0154] In the above embodiment, by adding the embedding function before the functional function in the object to be embedded, the logic code of data embedding can be executed when the object to be embedded is called, which is equivalent to modifying the underlying bytecode without changing the original code. While embedding big data, it will not affect the original code.
[0155] When it is detected that the target class object file is executed, the acquisition unit 112 acquires the embedded data of the target class object file.
[0156] Through the above implementation, non-intrusive tracking of application programs can be achieved without making any modifications to the original code, effectively saving development costs. Moreover, since the logic of the original code is not changed, even if an exception occurs, it will not affect the operating logic of the entire code, thereby reducing the risk of exceptions.
[0157] In at least one embodiment of the present invention, after obtaining the embedded point data of the target class object file, the number of executions of the target function within a preset time range is obtained from the embedded point data;
[0158] Calculate the daily activity of the target function according to the number of executions and the preset time range;
[0159] When the daily active users are greater than or equal to a configured threshold, determining the target content corresponding to the target function;
[0160] In each pre-configured period, associated content of the target content is obtained and pushed.
[0161] The preset time range can be customized, such as 1 month.
[0162] The configuration threshold can be customized, such as 4.
[0163] The configured period may be every day, every two days, etc., which is not limited in the present invention.
[0164] For example, when it is obtained from the buried data that a user clicks on the page of product A 150 times within one month, the daily active volume is 5, which is greater than the configured threshold of 4. This indicates that the user frequently clicks and browses the product A and is likely to be interested in the product A. Then, related products of the product A are obtained and pushed every day for the user to filter and achieve accurate push.
[0165] Of course, other data analyses can also be performed using buried point data, which will not be discussed here.
[0166] It should be noted that in order to further improve the security of data and prevent data from being maliciously tampered with, the buried data can be stored in the blockchain node.
[0167] It can be seen from the above technical solutions that the present invention can establish a tracing plug-in and add the tracing plug-in to the initial startup command of the application to be tracing, obtain the target startup command of the plug-in to be tracing, and when the application to be tracing is started, the tracing plug-in can be run without perception in the back-end system. When the application to be tracing is started using the target startup command, a class loading operation is performed so that the class object file can be processed subsequently. After the class loading operation is completed, the class object file is obtained, and the tracing configuration file stored in the specified database is obtained. A tracing record list is established according to the class object file and the tracing configuration file, and the class object file is screened based on the tracing configuration file to facilitate subsequent targeted tracing. Class definition is performed according to the tracing record list to obtain the target class object file after tracing. The original code is not changed. When performing big data tracing, the original code will not be affected. When it is detected that the target class object file is executed, the tracing data of the target class object file is obtained, thereby realizing non-intrusive tracing of the application. Since the logic of the original code is not changed, even if an exception occurs, it will not affect the running logic of the overall code, thereby reducing the risk of exceptions.
[0168] like Figure 3 The figure shows a schematic diagram of the structure of a computer device of a preferred embodiment of the present invention for implementing a big data tracking method for an application.
[0169] The computer device 1 may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a big data tracking program for an application.
[0170] Those skilled in the art will understand that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation on the computer device 1. The computer device 1 may have either a bus structure or a star structure. The computer device 1 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components. For example, the computer device 1 may also include input and output devices, network access devices, etc.
[0171] It should be noted that the computer device 1 is only an example. Other existing or future electronic products that are suitable for the present invention should also be included in the scope of protection of the present invention and included here by reference.
[0172] Among them, the memory 12 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the computer device 1, such as a mobile hard disk of the computer device 1. In other embodiments, the memory 12 can also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 1. Furthermore, the memory 12 can also include both an internal storage unit of the computer device 1 and an external storage device. The memory 12 can not only be used to store application software and various types of data installed on the computer device 1, such as the code of the big data embedding program of the application, but can also be used to temporarily store data that has been output or is to be output.
[0173] In some embodiments, the processor 13 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 13 is the control core (Control Unit) of the computer device 1, and utilizes various interfaces and lines to connect the various components of the entire computer device 1. It executes various functions and processes data of the computer device 1 by running or executing programs or modules stored in the memory 12 (such as a big data tracking program for executing application programs, etc.), and calling data stored in the memory 12.
[0174] The processor 13 executes the operating system of the computer device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the embodiment of the big data tracking method of each application, such as Figure 1 Steps shown.
[0175] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to implement the present invention. The one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device 1. For example, the computer program may be divided into a creation unit 110, an execution unit 111, an acquisition unit 112, and a class definition unit 113.
[0176] The above-mentioned integrated unit implemented in the form of a software functional module can be stored in a computer-readable storage medium. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, computer device, or network device, etc.) or a processor to execute the portion of the big data tracking method for the application described in various embodiments of the present invention.
[0177] If the modules / units integrated in the computer device 1 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present invention can also implement all or part of the processes in the above-mentioned method embodiments by instructing relevant hardware devices through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments.
[0178] The computer program includes computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory, etc.
[0179] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0180] Blockchain, as used in this article, refers to a novel application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each block contains information about a batch of online transactions, used to verify the validity of this information (to prevent counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, the platform product service layer, and the application service layer.
[0181] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 The figure shows that only one straight line is used, but it does not mean that there is only one bus or one type of bus. The bus is configured to realize the connection and communication between the memory 12 and at least one processor 13.
[0182] Although not shown, the computer device 1 may also include a power supply (such as a battery) to power various components. Preferably, the power supply can be logically connected to the at least one processor 13 via a power management device, thereby implementing functions such as charging management, discharging management, and power consumption management through the power management device. The power supply may also include one or more DC or AC power supplies, a recharging device, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components. The computer device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be detailed here.
[0183] Furthermore, the computer device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used to establish a communication connection between the computer device 1 and other computer devices.
[0184] Optionally, the computer device 1 may further include a user interface, which may be a display or an input unit (such as a keyboard). Optionally, the user interface may also be a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display may also be appropriately referred to as a display screen or a display unit, and is used to display information processed in the computer device 1 and to display a visual user interface.
[0185] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0186] Figure 3 Only the computer device 1 having components 12-13 is shown, and it can be understood by those skilled in the art that Figure 3 The structure shown does not constitute a limitation on the computer device 1 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0187] Combine Figure 1 The memory 12 in the computer device 1 stores a plurality of instructions to implement a big data tracking method for an application program, and the processor 13 can execute the plurality of instructions to implement:
[0188] Establish a tracking plug-in, and add the tracking plug-in to the initial startup command of the application to be tracked, to obtain the target startup command of the tracking plug-in;
[0189] When the target startup command is used to start the application to be embedded, a class loading operation is performed;
[0190] After the class loading operation is completed, the class object file is obtained, and the tracking configuration file stored in the specified database is obtained;
[0191] Create a tracking record list according to the class object file and the tracking configuration file;
[0192] Define the class according to the buried point record list to obtain the target class object file after the buried point;
[0193] When it is detected that the target class object file is executed, the embedded point data of the target class object file is obtained.
[0194] Specifically, the specific implementation method of the processor 13 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0195] In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical functional division, and actual implementation may employ other division methods.
[0196] The present invention can be used in a wide variety of general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0197] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected to achieve the purpose of the solution of this embodiment according to actual needs.
[0198] In addition, the functional modules in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional modules.
[0199] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0200] Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the claims are intended to be embraced therein. Any reference to a figure in a claim should not be construed as limiting the claim to which it relates.
[0201] Furthermore, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices described in the present invention may also be implemented by a single unit or device through software or hardware. Terms such as first and second are used to indicate names and do not imply any particular order.
[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A big data tracking method for an application, characterized in that: The big data tracking method of the application includes: Create a tracking plug-in and add the tracking plug-in to the initial startup command of the application to be tracked, so as to obtain the target startup command of the tracking plug-in; When the target startup command is used to start the application to be embedded, a class loading operation is performed; After the class loading operation is completed, the class object file is obtained, and the tracking configuration file stored in the specified database is obtained; Create a tracking record list according to the class object file and the tracking configuration file; Define the class according to the buried point record list to obtain the target class object file after the buried point; When it is detected that the target class object file is executed, obtaining the embedded data of the target class object file; The step of establishing a tracking record list according to the class object file and the tracking configuration file includes: Identify a tracking point file name from the tracking point configuration file; Matching the class object file according to the embedded point file name; Determine the file with the embedding file name in the class object file as the object to be embedded; Generate the buried point record list based on the object to be buried point; The class definition is performed according to the buried point record list, and the target class object file obtained after the buried point is obtained includes: Obtaining the function in the object to be embedded; Obtaining the embedding function of the object to be embedded from the embedding configuration file; Add the embedding function before the function function in the object to be embedded, and obtain the code block of the object to be embedded; The code block of the object to be embedded is determined as the target class object file.
2. The big data tracking method for an application according to claim 1, wherein: The step of adding the tracking plug-in to the initial startup command of the application to be tracked to obtain the target startup command of the tracking plug-in includes: Obtain the storage path of the tracking plug-in; The storage path of the tracking plug-in is added to the initial startup command to obtain the target startup command.
3. The big data tracking method for an application according to claim 2, wherein: The class loading operation includes: Start the virtual machine container corresponding to the application to be embedded; Obtain the storage path of the tracking plug-in from the target startup command; Call the tracking plug-in from the storage path and obtain the file stored in the tracking plug-in; The file stored in the tracking plug-in is loaded into the memory of the virtual machine container.
4. The big data tracking method for an application according to claim 1, wherein: Before obtaining the tracking configuration file stored in the specified database, the method further includes: Obtaining historical tracking records, determining tracking requirements based on the historical tracking records, and generating the tracking configuration file based on the tracking requirements; and / or Collect the tracking requirements issued by the configuration page, and generate the tracking configuration file according to the tracking requirements issued by the configuration page.
5. The big data tracking method for an application according to claim 1, wherein: After obtaining the embedded data of the target class object file, the method further includes: Obtaining the number of executions of the target function within a preset time range from the embedded data; Calculate the daily activity of the target function according to the number of executions and the preset time range; When the daily active users are greater than or equal to a configured threshold, determining the target content corresponding to the target function; In each pre-configured period, associated content of the target content is obtained and pushed.
6. A big data tracking device for an application, characterized in that: The big data tracking device of the application includes: An establishing unit, configured to establish a tracking plug-in and add the tracking plug-in to an initial startup command of an application to be tracked, thereby obtaining a target startup command of the plug-in to be tracked; An execution unit, configured to perform a class loading operation when the target application is started using the target startup command; An acquisition unit, configured to acquire the class object file and the tracking configuration file stored in the specified database after the class loading operation is completed; The establishing unit is further configured to establish a burying point record list according to the class object file and the burying point configuration file; A class definition unit is used to define a class according to the embedding record list and obtain a target class object file after embedding; The acquisition unit is further configured to acquire the embedded data of the target class object file when detecting that the target class object file is executed; The establishing unit establishing the burying point record list according to the class object file and the burying point configuration file includes: Identify a tracking point file name from the tracking point configuration file; Matching the class object file according to the embedded point file name; Determine the file with the embedding file name in the class object file as the object to be embedded; Generate the buried point record list based on the object to be buried point; The class definition unit defines the class according to the buried point record list, and obtains the target class object file after the buried point includes: Obtaining the function in the object to be embedded; Obtaining the embedding function of the object to be embedded from the embedding configuration file; Add the embedding function before the function function in the object to be embedded, and obtain the code block of the object to be embedded; The code block of the object to be embedded is determined as the target class object file.
7. A computer device, characterized in that: The computer device comprises: a memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the big data tracking method for an application as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in a computer device to implement the big data tracking method for an application as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Buried point data processing method and system, computer equipment and readable storage medium
CN110674440A
Application program point burying method and device and electronic equipment
CN111190573A