Application monitoring point burying method and device, electronic equipment and storage medium

By integrating the buried point analysis model and dynamic code insertion library in the target application, dynamically analyzing and realizing the code buried point, the problems of inaccurate buried point in the existing technology and affecting the operation of the application are solved, and high accuracy and non-invasion are achieved burying point effect.

CN119473800APending Publication Date: 2025-02-18AGRICULTURAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411727932.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The prior art cannot guarantee the accuracy of buried points and will affect the normal operation of the application.

Method used

By integrating the buried point analysis model in the target application, dynamically analyze the local and global features of each piece of code, determine whether the buried point needs to be buried, and realize the buried point through the dynamic code insert library.

Benefits of technology

It realizes dynamic buried point analysis of application code, ensures the accuracy of buried point, avoids intrusion into application source code, and ensures the normal operation of the application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473800A_ABST
    Figure CN119473800A_ABST
Patent Text Reader

Abstract

The invention discloses an application monitoring point burying method and device, electronic equipment and a storage medium. The method comprises the steps that in the running process of a target application, when any code of the target application is executed, the code serves as a current target code; inputting the current target code into a burying point analysis model integrated in the target application, extracting local features and global features of the current target code through the burying point analysis model, and analyzing a burying point identification result of the current target code based on the local features and the global features; wherein the burying point analysis model is trained and integrated into the target application by utilizing multiple segments of code data and burying point information thereof in advance; if the point burying identification result of the current target code indicates that the target code belongs to the point burying code, calling a dynamic code instrumentation library linked with the target application, and performing point burying at a corresponding position in the target code; and when executing to the burying point position in the target code, running the corresponding monitoring code in the dynamic code instrumentation library to collect monitoring data and feed back the monitoring data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data monitoring technology, and in particular to an application monitoring point embedding method and device, electronic equipment, and storage medium. Background Art

[0002] Currently, in order to collect information such as the application's function calls, variable value changes, and system resource usage, tracking points are performed in the application's code. That is, monitoring code for collecting data is set in the application's code so that the corresponding data can be collected through this code.

[0003] The current way of tracking is that developers manually insert monitoring code at the corresponding location when compiling the source code of the application based on their experience and concerns about the performance of the application system. In addition to manual tracking, some current tools can also realize automatic tracking, which performs static analysis on the source code of the compiled application according to pre-defined rules, analyzes the location that meets the pre-defined rules, and inserts monitoring code at this location in the source code.

[0004] However, the manual tracking method is not only inefficient, but also difficult to maintain. It needs to be manually updated as the system is iterated and updated. The second method relies on the accuracy of the defined rules, but the tracking implementation and code complexity of different systems are different, so it is difficult to ensure the accuracy of the rules. In addition, since it is a static analysis, it is impossible to identify all code paths, especially when the code is dynamically generated or changed, so the accuracy of the tracking cannot be guaranteed. Moreover, both methods cannot be adjusted dynamically in time according to the actual operation of the system, which may easily lead to the inability to collect key data or the collection of a large amount of wireless data, that is, the tracking cannot be accurate, and both methods also invade the source code, which may interfere with the operation of the application. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides an application monitoring tracking method and device, electronic device, and storage medium to solve the problem that the prior art cannot guarantee the accuracy of tracking and will affect the normal operation of the application.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] Another embodiment of the present application provides an application monitoring tracking method, including:

[0008] During the running of the target application, whenever any code of the target application is executed, the code is used as the current target code;

[0009] The current target code is input into a buried point analysis model integrated in the target application, local features and global features of the current target code are extracted through the buried point analysis model, and based on the local features and global features of the current target code, a buried point recognition result of the current target code is obtained through analysis; wherein the buried point analysis model is pre-trained using multiple code segments and buried point information thereof, and integrated into the target application;

[0010] If the embedding identification result of the current target code indicates that the target code belongs to the embedding code, calling the dynamic code stub library pre-linked to the target application to embed the code at the corresponding position in the target code;

[0011] When the execution reaches the embedding point position in the target code, the corresponding monitoring code in the dynamic code stub library is run to collect monitoring data and provide feedback.

[0012] Optionally, in the above application monitoring tracking method, it also includes:

[0013] Acquire multiple segments of historical code data with embedded points and their embedded point information as positive sample data, and acquire multiple segments of historical code data without embedded points as negative sample data;

[0014] Performing feature processing and labeling on the positive sample data and the negative sample data to obtain training data;

[0015] Iteratively training the embedding point analysis model using the training data;

[0016] Integrate the trained embedding analysis model into the target application.

[0017] Optionally, in the above-mentioned application monitoring tracking method, the current target code is input into a tracking analysis model integrated in the target application, local features and global features of the current target code are extracted through the tracking analysis model, and based on the local features and global features of the current target code, a tracking recognition result of the current target code is obtained by analysis, including:

[0018] Performing format conversion on the current target code to obtain a sequence of the current target code;

[0019] Integrate the sequence input of the current target code into a embedding analysis model in the target application;

[0020] Extracting local features from the sequence of the current target code through a convolutional neural network in the buried point analysis model;

[0021] Inputting the extracted local features into the long short-term memory network in the buried point analysis model;

[0022] Extracting global features from the local features through the long short-term memory network;

[0023] The local features and the global features are fused through the buried point analysis model, and the buried point recognition result of the current target code is determined based on the fused features.

[0024] Optionally, in the above-mentioned application monitoring tracking method, during the running process of the target application, each time any code of the target application is executed, before the code is used as the current target code, it also includes:

[0025] The target application is started and when the target application is loaded, the dynamic code stub library is linked with the target application through a dynamic link library or a shared object mechanism of the operating system.

[0026] Optionally, in the above-mentioned application monitoring tracking method, the calling of a dynamic code instrumentation library pre-linked to the target application and tracking at a corresponding position in the target code includes:

[0027] Calling a dynamic code stub library pre-linked to the target application, and passing the embedding point recognition result of the current target code to the dynamic code stub library of the target application;

[0028] By using the dynamic code instrumentation library, based on the instrumentation identification result of the current target code, a preset instrumentation strategy is used to analyze the instrumentation position in the target code;

[0029] Match the corresponding monitoring code according to the buried point recognition result of the current target code;

[0030] At the analyzed embedding position in the target code, embedding of the monitoring code corresponding to the embedding recognition result of the current target code is performed.

[0031] A second aspect of the present application provides an application monitoring tracking device, including:

[0032] A target determination unit, configured to use any code section of the target application as the current target code each time the code section is executed during the running of the target application;

[0033] An analysis unit is used to input the current target code into a buried point analysis model integrated in the target application, extract local features and global features of the current target code through the buried point analysis model, and analyze and obtain buried point recognition results of the current target code based on the local features and global features of the current target code; wherein the buried point analysis model is pre-trained using multiple code data and buried point information thereof, and integrated into the target application;

[0034] A tracking unit, configured to call a dynamic code instrumentation library pre-linked to the target application to track a corresponding position in the target code when a tracking identification result of the current target code indicates that the target code belongs to the tracking code;

[0035] The collection unit is used to run the corresponding monitoring code in the dynamic code instrumentation library when executing to the embedding point position in the target code, so as to collect monitoring data and feedback it.

[0036] Optionally, in the above-mentioned application monitoring tracking device, it also includes:

[0037] A data acquisition unit, used to acquire multiple sections of historical code data with embedded points and their embedded point information as positive sample data, and to acquire multiple sections of historical code data without embedded points as negative sample data;

[0038] A sample processing unit, used for performing feature processing and labeling on the positive sample data and the negative sample data to obtain training data;

[0039] An iteration unit, used for iteratively training the embedding point analysis model using the training data;

[0040] An integration unit is used to integrate the trained embedding point analysis model into the target application.

[0041] Optionally, in the above-mentioned application monitoring tracking device, the analysis unit includes:

[0042] A conversion unit, used for performing format conversion on the current target code to obtain a sequence of the current target code;

[0043] A first input unit, used to integrate the sequence input of the current target code into the embedding analysis model in the target application;

[0044] A local feature extraction unit, used to extract local features from the sequence of the current target code through a convolutional neural network in the buried point analysis model;

[0045] A second input unit, used to input the extracted local features into a long short-term memory network in the buried point analysis model;

[0046] A global feature extraction unit, used for extracting global features from the local features through the long short-term memory network;

[0047] The result recognition unit is used to fuse the local features and the global features through the buried point analysis model, and determine the buried point recognition result of the current target code based on the fused features.

[0048] Optionally, in the above-mentioned application monitoring tracking device, it also includes:

[0049] The linking unit is used to start the target application and link the dynamic code stub library with the target application through the dynamic link library or shared object mechanism of the operating system when the target application is loaded.

[0050] Optionally, in the above-mentioned application monitoring tracking device, the tracking unit includes:

[0051] A transfer unit, configured to call a dynamic code stub library pre-linked to the target application, and transfer the embedding point recognition result of the current target code to the dynamic code stub library of the target application;

[0052] A position determination unit, configured to analyze the position of the embedded point in the target code by using the dynamic code stub library and a preset embedded point strategy based on the embedded point recognition result of the current target code;

[0053] A matching unit, used for matching a corresponding monitoring code according to the embedding point recognition result of the current target code;

[0054] Code tracking is used to track the monitoring code corresponding to the tracking identification result of the current target code at the tracking position in the analyzed target code.

[0055] A third aspect of the present application provides an electronic device, including:

[0056] Memory and processor;

[0057] Wherein, the memory is used to store programs;

[0058] The processor is used to execute the program, and when the program is executed, it is specifically used to implement the application monitoring tracking method as described in any one of the above items.

[0059] A fourth aspect of the present application provides a computer storage medium for storing a computer program, which, when executed by a processor, is used to implement an application monitoring tracking method as described in any one of the above.

[0060] The present application provides an application monitoring tracking method. During the operation of the target application, each time any section of the target application code is executed, the code is used as the current target code, so that during the application execution process, the application code is dynamically analyzed, so as to take into account the dynamic changes of the application code. The current target code is input into the tracking analysis model integrated in the target application, and the local features and global features of the current target code are extracted by the tracking analysis model, and the tracking recognition results of the current target code are analyzed based on the local features and global features of the current target code. Among them, the tracking analysis model is pre-trained with multiple code data and its tracking information, and integrated into the target application. Since it is integrated in the target application, the model can be used to analyze whether the code needs tracking during the operation of the target application. The tracking analysis model is analyzed based on the characteristics of the code itself, and no longer relies on the set rules, so that accurate analysis can be performed on various complex codes. In addition, local feature and global feature analysis are also combined at the same time to further ensure the accuracy of the analysis results. If the tracking point identification result of the current target code indicates that the target code belongs to the tracking point code, the dynamic code instrumentation library pre-linked to the target application is called to perform tracking points at the corresponding positions in the target code. When the tracking point position in the target code is executed, the corresponding monitoring code in the dynamic code instrumentation library is run to collect monitoring data and feedback. Therefore, the dynamic code instrumentation library is linked to the target application, and dynamic tracking points are implemented through the dynamic code instrumentation library without modifying the source code of the application, that is, without intruding into the application, thereby avoiding affecting the normal operation of the application and requiring no continuous maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0062] Figure 1 A flowchart of an application monitoring tracking method provided in an embodiment of the present application;

[0063] Figure 2 A flowchart of a method for training a tracking point analysis model provided in an embodiment of the present application;

[0064] Figure 3 A flowchart of a method for analyzing the embedding point recognition result of the current target code through the embedding point analysis model provided in an embodiment of the present application;

[0065] Figure 4A flowchart of a method for embedding points through a dynamic code instrumentation library provided in an embodiment of the present application;

[0066] Figure 5 A schematic diagram of the architecture of an application monitoring tracking device provided in an embodiment of the present application;

[0067] Figure 6 A schematic diagram of the architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0069] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0070] The present application embodiment provides an application monitoring tracking method, such as Figure 1 As shown, the specific steps include:

[0071] S101. During the running of the target application, each time any code section of the target application is executed, the code is used as the current target code.

[0072] The target application can be any application that needs to be embedded to realize data collection.

[0073] In order to take into account the dynamic changes of the application and not to invade the source code of the application, in the embodiment of the present application, dynamic tracking is adopted during each normal operation of the application. Therefore, the target application is run normally, and during the use of the target application, it will execute the code of the application accordingly, and during the operation of the target application, tracking identification is continuously performed, and tracking operations are performed on the programs that are identified to be tracked. Therefore, in order to conduct targeted analysis, whenever any section of the code of the target application is executed, it is used as the current target code to analyze it.

[0074] S102. Input the current target code into a buried point analysis model integrated in the target application, extract local features and global features of the current target code through the buried point analysis model, and analyze and obtain buried point recognition results of the current target code based on the local features and global features of the current target code.

[0075] It should be noted that in order to cope with the complex codes of various applications and systems and to accurately analyze whether point tracking is needed, a neural network model is used to analyze the code in an embodiment of the present application.

[0076] Specifically, the tracking point analysis model is iteratively trained using multiple code segments and their tracking point information. In addition, in order to achieve dynamic recognition, that is, to perform tracking point analysis on the executed code during the execution of the application, the tracking point analysis model is integrated into the target application after it is trained.

[0077] Optionally, in another embodiment of the present application, a training method for a tracking point analysis model is provided, such as Figure 2 As shown, the specific steps include:

[0078] S201. Acquire multiple sections of historical code data with embedded points and their embedded point information as positive sample data, and acquire multiple sections of historical code data without embedded points as negative sample data.

[0079] The historical code data refers to the code that has been previously analyzed and tracked accordingly.

[0080] In order to enable the tracking point analysis model to accurately identify which codes need to be tracked and which codes do not need to be tracked, in an embodiment of the present application, not only multiple sections of historical code data with tracking points and their tracking point information are obtained as positive sample data, but also multiple sections of historical code data without tracking points are obtained as negative sample data.

[0081] S202: Perform feature processing and labeling on the positive sample data and the negative sample data to obtain training data.

[0082] Specifically, in order to allow sample data to be input into the model for processing, it is necessary to perform feature processing on the samples and set corresponding annotations for the buried point information of each sample data.

[0083] S203: Iteratively train the embedding point analysis model using the training data.

[0084] S204: Integrate the trained embedding analysis model into the target application.

[0085] Therefore, when it is necessary to analyze the current target code, the current target code is input into the embedding analysis model, and the features of the current target code are extracted through the embedding analysis model, for example, programming structures, such as loops, conditional statements, keywords, identifiers, and operators, etc., so that it is possible to analyze whether the current target code is the code that needs embedding based on these features. Therefore, there is no need to rely on pre-defined rules for analysis, but to analyze from the characteristics of the code itself, so it will not be affected by inaccurate authorization rules, and thus the accuracy of the recognition results can be effectively guaranteed.

[0086] In order to further ensure the accuracy of the recognition results, in the embodiment of the present application, the constructed buried point analysis model will not only extract the local features of the current target code, but also extract the global features of the current target code, and then analyze the final buried point recognition results based on the fusion features of the local features and global features of the current target code, thereby performing analysis from both local and global perspectives to effectively ensure the accuracy of the recognition results.

[0087] Optionally, in another embodiment of the present application, a specific implementation of step S102 is as follows: Figure 3 As shown, the following steps are included:

[0088] S301. Perform format conversion on the current target code to obtain a sequence of the current target code.

[0089] Specifically, the current target code can be tokenized and converted into a sequence of word embeddings, so that each code token, such as a keyword, identifier, operator, etc., is represented as a high-dimensional vector.

[0090] S302: Integrate the sequence input of the current target code into the embedding analysis model in the target application.

[0091] S303. Extract local features from the sequence of the current target code through the convolutional neural network in the buried point analysis model.

[0092] It should be noted that in an embodiment of the present application, the buried point analysis model is composed of a convolutional neural network (CNN) and a long short-term memory network. Among them, the convolution layer in the convolutional neural network applies a convolution operation on the code sequence by a sliding window method, so that the local dependencies of the code can be captured. For example, a convolution kernel may focus on capturing a specific pattern between adjacent tags, such as the "for" keyword and the subsequent loop body in a "for loop". Therefore, in a convolutional neural network, local features of different abstraction levels in the code can be extracted by stacking multiple convolution kernels and convolution layers, and these features can be further used to determine whether a code snippet needs to be inserted into a buried point.

[0093] S304: Input the extracted local features into the long short-term memory network in the buried point analysis model.

[0094] S305. Extract global features from local features through a long short-term memory network.

[0095] Long short-term memory network (LSTM) is a variant of recurrent neural network (RNN), which is particularly suitable for processing sequence data. It captures long-term dependencies in the sequence through memory cells and gating mechanisms. Therefore, in the embodiment of the present application, when the long short-term memory network specifically processes the sequence of the current target code, it can consider the code structure that appeared before and update its internal state based on this information. For example, if the code snippet contains a nested loop, LSTM can capture this structure and understand its importance to performance monitoring. It can determine whether it is necessary to insert a buried point at this position based on factors such as the nesting depth of the loop and the operations in the loop body.

[0096] S306: local features and global features are fused through the buried point analysis model, and the buried point recognition result of the current target code is determined based on the fused features.

[0097] S103. Determine whether the buried point recognition result of the current target code indicates that the target code belongs to the buried point code.

[0098] It should be noted that the tracking point recognition result of the current target code mainly includes whether the target code needs to insert monitoring tracking points. Currently, since multiple features of the current target code are also analyzed in the model, the tracking point recognition result of the current target code can also specifically include the type of the current target code, so as to facilitate the insertion of corresponding monitoring code according to the type of the current target code.

[0099] If the buried point recognition result of the current target code indicates that the target code belongs to the buried point code, step S104 is performed. If the buried point recognition result of the current target code indicates that the target code does not belong to the buried point code, no other additional operations are performed.

[0100] S104: Call the dynamic code stub library pre-linked to the target application, and perform embedding at the corresponding position in the target code.

[0101] It should be noted that in order to achieve dynamic embedding, in an embodiment of the present application, dynamic embedding is performed through a dynamic code plug-in library, that is, in the process of executing the application code, a monitoring code is inserted and executed, which is equivalent to additionally executing the code of the dynamic code plug-in library, rather than directly inserting it into the source code of the application, becoming a part of the source code of the application, so as not to cause intrusion into the source code, and thus not affecting the normal operation of the application. In order to achieve dynamic code insertion during the operation of the target application, it is necessary to link the dynamic code plug-in library with the target application in advance. Therefore, when the embedding identification result of the current target code indicates that the target code belongs to the embedding code, the dynamic code plug-in library pre-linked to the target application will be called to embed the corresponding position in the target code, thereby determining the position where the monitoring program needs to be executed.

[0102] Therefore, before executing step S101, it is necessary to further perform the linking of the dynamic code instrumentation library and the target application. Optionally, in another embodiment of the present application, a linking method of the dynamic code instrumentation library and the target application includes:

[0103] Start the target application and when the target application is loaded, link the dynamic code stub library with the target application through the dynamic link library or shared object mechanism of the operating system.

[0104] Optionally, in another embodiment of the present application, a specific implementation of step S104 is as follows: Figure 4 As shown, the following steps are included:

[0105] S401, calling a dynamic code stub library pre-linked to a target application, and passing a point-embedding recognition result of the current target code to the dynamic code stub library of the target application.

[0106] S402: Analyze the location of the embedded point in the target code by using the dynamic code instrumentation library and the preset embedded point strategy based on the embedded point recognition result of the current target code.

[0107] It should be noted that, in order to meet various requirements, in the embodiment of the present application, a tracking strategy can be set to perform corresponding tracking on different codes. The tracking identification result also includes other information of the current target code, such as type, structure, etc., so the corresponding tracking position can be set for the current target code based on this information.

[0108] S403. Match the corresponding monitoring code according to the embedding point recognition result of the current target code.

[0109] S404. At the embedding position in the analyzed target code, embedding of the monitoring code corresponding to the embedding recognition result of the current target code is performed.

[0110] S105: When the execution reaches the embedding point position in the target code, the corresponding monitoring code in the dynamic code stub library is run to collect monitoring data and provide feedback.

[0111] Specifically, when encountering a code location where a tracking point needs to be inserted, that is, when executing to the tracking point location in the target code, the dynamic code instrumentation library will take over control and execute the corresponding tracking point code to collect performance data, and after execution, control will be returned to the target application to continue execution. The collected data can be fed back to the monitoring system for processing.

[0112] The embodiment of the present application provides an application monitoring tracking method. During the operation of the target application, each time any section of the code of the target application is executed, the code is used as the current target code, so that during the application execution, the application code is dynamically analyzed, so as to take into account the dynamic changes of the application code. The current target code is input into the tracking analysis model integrated in the target application, and the local features and global features of the current target code are extracted by the tracking analysis model, and the tracking recognition results of the current target code are analyzed based on the local features and global features of the current target code. Among them, the tracking analysis model is pre-trained with multiple sections of code data and their tracking information, and integrated into the target application. Since it is integrated in the target application, the model can be used to analyze whether the code needs tracking during the operation of the target application. The tracking analysis model is analyzed based on the characteristics of the code itself, and no longer relies on the set rules, so that accurate analysis can be performed on various complex codes. In addition, local feature and global feature analysis are also combined at the same time to further ensure the accuracy of the analysis results. If the tracking point identification result of the current target code indicates that the target code belongs to the tracking point code, the dynamic code instrumentation library pre-linked to the target application is called to perform tracking points at the corresponding positions in the target code. When the tracking point position in the target code is executed, the corresponding monitoring code in the dynamic code instrumentation library is run to collect monitoring data and feedback. Therefore, the dynamic code instrumentation library is linked to the target application, and dynamic tracking points are implemented through the dynamic code instrumentation library without modifying the source code of the application, that is, without intruding into the application, thereby avoiding affecting the normal operation of the application and requiring no continuous maintenance.

[0113] Another embodiment of the present application provides an application monitoring tracking device, such as Figure 5 As shown, including:

[0114] The target determination unit 501 is used to use the code as the current target code each time any code section of the target application is executed during the running process of the target application.

[0115] The analysis unit 502 is used to input the current target code into the buried point analysis model integrated in the target application, extract the local features and global features of the current target code through the buried point analysis model, and analyze and obtain the buried point recognition result of the current target code based on the local features and global features of the current target code.

[0116] Among them, the tracking point analysis model is pre-trained using multiple code data and their tracking point information, and integrated into the target application.

[0117] The embedding unit 503 is used to call the dynamic code stub library pre-linked to the target application to embed the target code at the corresponding position in the target code when the embedding identification result of the current target code indicates that the target code belongs to the embedding code.

[0118] The collection unit 504 is used to run the corresponding monitoring code in the dynamic code instrumentation library when executing to the embedded point position in the target code, so as to collect monitoring data and feedback it.

[0119] Optionally, in another embodiment of the present application, the application monitoring tracking device further includes:

[0120] The data acquisition unit is used to acquire multiple sections of historical code data with embedded points and their embedded point information as positive sample data, and to acquire multiple sections of historical code data without embedded points as negative sample data.

[0121] The sample processing unit is used to perform feature processing and labeling on positive sample data and negative sample data to obtain training data.

[0122] The iteration unit is used to iteratively train the tracking point analysis model using training data.

[0123] Integration unit, used to integrate the trained tracking analysis model into the target application.

[0124] Optionally, in the application monitoring tracking device provided in another embodiment of the present application, the analysis unit includes:

[0125] The conversion unit is used to convert the format of the current target code to obtain a sequence of the current target code.

[0126] The first input unit is used to integrate the sequence input of the current target code into the embedding analysis model in the target application.

[0127] The local feature extraction unit is used to extract local features from the sequence of the current target code through the convolutional neural network in the buried point analysis model.

[0128] The second input unit is used to input the extracted local features into the long short-term memory network in the buried point analysis model.

[0129] The global feature extraction unit is used to extract global features from local features through a long short-term memory network.

[0130] The result recognition unit is used to fuse local features and global features through the buried point analysis model, and determine the buried point recognition result of the current target code based on the fused features.

[0131] Optionally, in another embodiment of the present application, the application monitoring tracking device further includes:

[0132] The link unit is used to start the target application and link the dynamic code stub library with the target application through the dynamic link library or shared object mechanism of the operating system when the target application is loaded.

[0133] Optionally, in the application monitoring tracking device provided in another embodiment of the present application, the tracking unit includes:

[0134] The transfer unit is used to call the dynamic code stub library pre-linked to the target application, and transfer the embedding point recognition result of the current target code to the dynamic code stub library of the target application.

[0135] The position determination unit is used to analyze the position of the embedded point in the target code by using a dynamic code stub library and a preset embedded point strategy based on the embedded point recognition result of the current target code.

[0136] The matching unit is used to match the corresponding monitoring code according to the tracking point recognition result of the current target code.

[0137] Code tracking is used to track the monitoring code corresponding to the tracking recognition result of the current target code at the tracking position in the analyzed target code.

[0138] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the implementation process of the corresponding steps in the above method embodiments, and will not be repeated here.

[0139] Another embodiment of the present application provides an electronic device, such as Figure 6 As shown, including:

[0140] Memory 601 and processor 602 .

[0141] Among them, the memory is used to store programs.

[0142] The processor 602 is used to execute the program stored in the memory 601. When the program is executed, it is specifically used to implement the application monitoring tracking method provided in any one of the above embodiments.

[0143] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed by a processor, it is used to implement the application monitoring tracking method provided in any of the above embodiments.

[0144] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0145] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0146] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for application monitoring tracking, characterized in that: include: During the running of the target application, whenever any code of the target application is executed, the code is used as the current target code; The current target code is input into a buried point analysis model integrated in the target application, local features and global features of the current target code are extracted through the buried point analysis model, and based on the local features and global features of the current target code, a buried point recognition result of the current target code is obtained through analysis; wherein the buried point analysis model is pre-trained using multiple code data and buried point information thereof, and integrated into the target application; If the embedding identification result of the current target code indicates that the target code belongs to the embedding code, calling the dynamic code stub library pre-linked to the target application to embed the code at the corresponding position in the target code; When the execution reaches the embedding point position in the target code, the corresponding monitoring code in the dynamic code stub library is run to collect monitoring data and provide feedback.

2. The method according to claim 1, characterized in that Also includes: Acquire multiple segments of historical code data with embedded points and their embedded point information as positive sample data, and acquire multiple segments of historical code data without embedded points as negative sample data; Performing feature processing and labeling on the positive sample data and the negative sample data to obtain training data; Iteratively training the embedding point analysis model using the training data; Integrate the trained embedding analysis model into the target application.

3. The method according to claim 1, characterized in that The step of inputting the current target code into a buried point analysis model integrated in the target application, extracting local features and global features of the current target code through the buried point analysis model, and analyzing and obtaining buried point recognition results of the current target code based on the local features and global features of the current target code includes: Performing format conversion on the current target code to obtain a sequence of the current target code; Integrate the sequence input of the current target code into a embedding analysis model in the target application; Extracting local features from the sequence of the current target code through a convolutional neural network in the buried point analysis model; Inputting the extracted local features into the long short-term memory network in the buried point analysis model; Extracting global features from the local features through the long short-term memory network; The local features and the global features are fused through the buried point analysis model, and the buried point recognition result of the current target code is determined based on the fused features.

4. The method according to claim 1, characterized in that: During the running process of the target application, each time any code of the target application is executed, before the code is used as the current target code, the method further includes: The target application is started and when the target application is loaded, the dynamic code stub library is linked with the target application through a dynamic link library or a shared object mechanism of the operating system.

5. The method according to claim 1, characterized in that The calling pre-links the dynamic code stub library of the target application and performs instrumentation at a corresponding position in the target code, including: Calling a dynamic code stub library pre-linked to the target application, and passing the embedding point recognition result of the current target code to the dynamic code stub library of the target application; By using the dynamic code instrumentation library, based on the instrumentation identification result of the current target code, a preset instrumentation strategy is used to analyze the instrumentation position in the target code; Match the corresponding monitoring code according to the buried point recognition result of the current target code; At the analyzed embedding position in the target code, embedding of the monitoring code corresponding to the embedding recognition result of the current target code is performed.

6. An application monitoring tracking device, characterized in that: include: A target determination unit, configured to use any code section of the target application as the current target code each time the code section is executed during the running of the target application; An analysis unit is used to input the current target code into a buried point analysis model integrated in the target application, extract local features and global features of the current target code through the buried point analysis model, and analyze and obtain buried point recognition results of the current target code based on the local features and global features of the current target code; wherein the buried point analysis model is pre-trained using multiple code data and buried point information thereof, and integrated into the target application; A tracking unit, configured to call a dynamic code instrumentation library pre-linked to the target application to track a corresponding position in the target code when a tracking identification result of the current target code indicates that the target code belongs to the tracking code; The collection unit is used to run the corresponding monitoring code in the dynamic code instrumentation library when executing to the embedding point position in the target code, so as to collect monitoring data and feedback it.

7. The device according to claim 6, characterized in that Also includes: A data acquisition unit, used to acquire multiple sections of historical code data with embedded points and their embedded point information as positive sample data, and to acquire multiple sections of historical code data without embedded points as negative sample data; A sample processing unit, used for performing feature processing and labeling on the positive sample data and the negative sample data to obtain training data; An iteration unit, used for iteratively training the embedding point analysis model using the training data; An integration unit is used to integrate the trained embedding point analysis model into the target application.

8. The device according to claim 6, characterized in that The analysis unit comprises: A conversion unit, used for performing format conversion on the current target code to obtain a sequence of the current target code; A first input unit, used to integrate the sequence input of the current target code into the embedding analysis model in the target application; A local feature extraction unit, used to extract local features from the sequence of the current target code through a convolutional neural network in the buried point analysis model; A second input unit, used to input the extracted local features into a long short-term memory network in the buried point analysis model; A global feature extraction unit, used for extracting global features from the local features through the long short-term memory network; The result recognition unit is used to fuse the local features and the global features through the buried point analysis model, and determine the buried point recognition result of the current target code based on the fused features.

9. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the application monitoring tracking method as described in any one of claims 1 to 5.

10. A computer storage medium, characterized in that: Used to store computer programs, which, when executed by a processor, are used to implement the application monitoring tracking method as described in any one of claims 1 to 5.