Data monitoring method, device, apparatus and storage medium
By attaching user-space probes to the function entry and/or exit of the target function, and collecting and generating visualized call data, the problem of strong interference and poor compatibility in function link monitoring in the prior art is solved, and zero-intrusion cross-process monitoring and highly accurate performance diagnosis are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN TCL DIGITAL TECH CO LTD
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-30
AI Technical Summary
Existing function link monitoring methods are highly disruptive and have poor compatibility, making it impossible to achieve full-link function monitoring.
By attaching user-space probes to the function entry and/or exit of the target function, function call data is collected, initial call events are correlated, visualized call data is generated, and performance diagnostics are performed, achieving non-intrusive cross-process monitoring.
It reduces the intrusiveness and interference of function link monitoring, improves the compatibility and comprehensiveness of monitoring, and enhances the accuracy of function diagnosis.
Smart Images

Figure CN122309280A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and specifically to a data monitoring method, apparatus, device, and storage medium. Background Technology
[0002] Currently, in modern smart operating systems, developers typically rely on various techniques for function link monitoring to pinpoint performance bottlenecks in cross-process calls from applications to system services. Among these, the most common methods include: using system-level tracing tools to capture kernel and some user-space events; or manually inserting code markers on critical paths in applications, SDKs, and servers to record function execution times. However, existing function link monitoring methods suffer from strong interference and poor compatibility, failing to achieve full-link function monitoring. Summary of the Invention
[0003] This application provides a data monitoring method, apparatus, device, and storage medium, aiming to solve the technical problems of strong interference and poor compatibility in function link monitoring in the prior art.
[0004] On the one hand, embodiments of this application provide a data monitoring method, which includes the following steps: In response to a data monitoring request for the target function, the function call data of the target function is collected using the user-space probe corresponding to the target function; Based on the event call information in the function call data, the initial call event is associated to obtain the link event data; Generate visual call data corresponding to the target function based on the data source extension interface and the link event data; The performance of the visualized call data is then analyzed to obtain the performance analysis results.
[0005] In one possible implementation of this application, the step of collecting function call data of the target function using a user-space probe corresponding to the target function includes: Determine the target function to be monitored, and the probe mounting location of the target function, wherein the probe mounting location includes the function entry and / or function exit of the target function; The user-state probe corresponding to the objective function is attached at the probe attachment location. The user-space probe is used to intercept the target function and collect the function call data of the target function.
[0006] In one possible implementation of this application, the step of associating the initial call event with the event call information in the function call data to obtain the link event data includes: Obtain the event call information from the function call data; The target call event corresponding to the target function in the initial call event is determined based on the process call identifier and process call sequence number in the event call information. The function call data and the target call event are associated to obtain the link event data.
[0007] In one possible implementation of this application, generating the visual call data corresponding to the target function based on the data source extension interface and the link event data includes: The link event data is converted using the data source extension interface to obtain converted event data; The transformation event data is rendered to obtain the visual call data corresponding to the target function.
[0008] In one possible implementation of this application, rendering the transformation event data to obtain the visual call data corresponding to the target function includes: Obtain the event timing information corresponding to the transformation event data, wherein the event timing information includes the event start timestamp and the event duration; Generate a visual event component based on the event timing information and the transformation event data; By using the event call information corresponding to the visual event components, process events are matched to obtain the event component combinations corresponding to each of the target functions; The driving visualization rendering component combines and renders the event components corresponding to each objective function onto the initial timeline component to obtain visualized call data.
[0009] In one possible implementation of this application, the driving visualization rendering component combines and renders the event components corresponding to each of the target functions onto the initial timeline component to obtain visualization call data, including: Obtain the initial timeline component from the visualization rendering component; The visualization rendering component is driven to render the event component combination onto the initial event axis component according to the event trajectory information and event timing information corresponding to the event component combination, thereby obtaining visualization call data.
[0010] In one possible implementation of this application, the step of performing performance diagnosis on the visualized call data to obtain performance diagnosis results includes: Obtain the performance diagnostic model corresponding to the objective function; The time consumption of the target function is evaluated based on the performance diagnostic model and the visualized call data to determine the call time information of the target function; The performance of the objective function is evaluated based on the call time information and the target time information to obtain performance diagnostic results.
[0011] On the other hand, this application provides a data monitoring device, the data monitoring device comprising: The information acquisition module is configured to respond to data monitoring requests for a target function and collect function call data of the target function using a user-space probe corresponding to the target function; The event association module is configured to associate the initial call event with the event call information in the function call data to obtain the link event data; The link rendering module is configured to generate visual call data corresponding to the target function based on the data source extension interface and the link event data. The function diagnostic module is configured to perform performance diagnostics on the visualized call data and obtain performance diagnostic results.
[0012] On the other hand, this application also provides a data monitoring device, the data monitoring device comprising: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps of the data monitoring method.
[0013] On the other hand, this application also provides a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps in the data monitoring method.
[0014] This application responds to data monitoring requests for a target function, collects function call data of the target function using a user-space probe corresponding to the target function, associates initial call events with event call information in the function call data to obtain link event data, generates visualized call data corresponding to the target function based on the data source extension interface and the link event data, and performs performance diagnosis on the visualized call data to obtain performance diagnosis results. This achieves non-intrusive function call data collection via a user-space probe pre-mounted on the target function, associates the event call information with the corresponding link event data, renders the link event data into visualized call data for cross-process display, and then uses the visualized call data for performance diagnosis. This reduces the intrusiveness and interference of function link monitoring, effectively improves the compatibility and comprehensiveness of function link monitoring, and thus improves the accuracy of subsequent function diagnosis. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram illustrating a scenario of the data monitoring method in an embodiment of this application. Figure 2 This is a flowchart illustrating one embodiment of the data monitoring method in this application. Figure 3 This is a schematic diagram illustrating a scenario of one embodiment of the data monitoring method for visually accessing data provided in this application. Figure 4 A schematic diagram of the structure of one embodiment of the data monitoring device provided in this application; Figure 5 This is a schematic diagram of one embodiment of the data monitoring device provided in this application. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0019] In this application, the term "exemplary" is used to mean "serving as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0020] Currently, in modern smart operating systems, developers typically rely on various techniques for function link monitoring to pinpoint performance bottlenecks in cross-process calls from applications to system services. Among these, the most common methods include: using system-level tracing tools to capture kernel and some user-space events; or manually inserting code markers on critical paths in applications, SDKs, and servers to record function execution times. However, existing function link monitoring methods suffer from strong interference and poor compatibility, failing to achieve full-link function monitoring.
[0021] Based on this, this application proposes a data monitoring method, apparatus, device, and computer-readable storage medium to solve the technical problems of strong interference and poor compatibility in the prior art of function link monitoring.
[0022] The data monitoring method in this embodiment of the invention is applied to a data monitoring device, which is set in a data monitoring equipment. The data monitoring equipment is equipped with one or more processors, a memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the data monitoring method. The data monitoring equipment can be a smart terminal, such as a mobile phone, tablet computer, network device, and smart computer. Optionally, the data monitoring equipment can also be a server or a service cluster composed of multiple servers.
[0023] like Figure 1 As shown, Figure 1 This is a schematic diagram of a data monitoring method according to an embodiment of the present application. The data monitoring scenario in this embodiment includes a data monitoring device 100 (the data monitoring device 100 integrates a data monitoring unit), and the data monitoring device 100 is equipped with a computer-readable storage medium corresponding to the data monitoring method to execute the steps of the data monitoring method.
[0024] Understandable, Figure 1The data monitoring equipment in the data monitoring method scenario shown, or the devices contained in the data monitoring equipment, do not constitute a limitation on the embodiments of the present invention. That is, the number or type of data monitoring equipment in the data monitoring method scenario, or the number or type of devices contained in each device, do not affect the overall implementation of the technical solution in the embodiments of the present invention, and can all be considered as equivalent substitutions or derivatives of the technical solutions claimed in the embodiments of the present invention.
[0025] In this embodiment of the invention, the data monitoring device 100 is mainly used to: respond to a data monitoring request for a target function and collect function call data of the target function using a user-state probe corresponding to the target function; Based on the event call information in the function call data, the initial call event is associated to obtain the link event data; Generate visual call data corresponding to the target function based on the data source extension interface and the link event data; The performance of the visualized call data is then analyzed to obtain the performance analysis results.
[0026] The data monitoring device 100 in this embodiment of the invention can be an independent data monitoring device, such as a mobile phone, tablet computer, network device, server and smart computer, or a data monitoring network or data monitoring cluster composed of multiple data monitoring devices.
[0027] This application provides a data monitoring method, apparatus, device, and computer-readable storage medium, which will be described in detail below.
[0028] It will be understood by those skilled in the art that Figure 1 The application environment shown is only one application scenario related to the solution of this application and does not constitute a limitation on the application scenario of this application. Other application environments may include more than one application scenario. Figure 1 The number of data monitoring devices shown, or the data monitoring network connectivity relationships, for example... Figure 1 Only one data monitoring device is shown in the diagram. It is understood that the scenario of this data monitoring method may also include one or more data monitoring devices, which are not specifically limited here. The data monitoring device 100 may also include a memory for storing function call data and other data.
[0029] It should be noted that, Figure 1 The schematic diagram of the data monitoring method shown is merely an example. The scenarios of the data monitoring method described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions provided in the embodiments of the present invention.
[0030] Based on the scenarios described above for data monitoring methods, various embodiments of the data monitoring method disclosed in this invention are proposed.
[0031] like Figure 2 As shown, Figure 2 This is a flowchart illustrating one embodiment of the data monitoring method in this application. The data monitoring method includes the following steps 201 to 204: 201. In response to a data monitoring request for the target function, collect the function call data of the target function using the user-space probe corresponding to the target function; The data monitoring method in this embodiment is applied to a data monitoring device. The type and number of data monitoring devices are not specifically limited; that is, the data monitoring device can be one or more smart terminals or servers. The data monitoring device can be any smart terminal running a corresponding target operating system. Optionally, in one specific embodiment, the target operating system can be Android and / or Linux. Furthermore, the target operating system can also be other operating systems such as Windows.
[0032] Optionally, the target function is a specific function in the user-mode program of the data monitoring device or other intelligent terminal to be monitored, used to realize cross-process access to the corresponding server to obtain the data returned by the server for corresponding business interaction. In a specific embodiment, the target function is any one or more of the SDK (Software Development Kit) function, IPC (Inter-Process Communication) interface function, and deserialization function to be monitored, so that the user-mode program can use the target function to realize client-initiated calls, cross-process transmission, server processing, and data return.
[0033] Optionally, a data monitoring request is an operation event that drives the data monitoring device to non-intrusively monitor the target function's data to generate visualized call data. The triggering method for this data monitoring request is not specifically limited here; that is, the data monitoring can be actively triggered by the user, for example, by clicking the data monitoring button displayed in the corresponding user-mode program on the data monitoring device. Furthermore, the data monitoring request can also be automatically triggered by the data monitoring device, for example, by the data monitoring device automatically triggering the data monitoring request when the user-mode program starts or runs.
[0034] Optionally, the user-mode probe is a dynamic tracing mechanism that is mounted on the target function to monitor the execution process of the target function in real time. That is, the user-mode probe can monitor the target function in the user-mode program without modifying or recompiling the user-mode program, so as to obtain the call information of the target function non-intrusively. Optionally, in a specific embodiment, the user-mode probe is a uProbe probe.
[0035] Optionally, the function call data is monitoring data collected during the function call process of the target function, used to describe the function call process and corresponding execution results of the target function. Optionally, in a specific embodiment, the function call data includes data information describing the target function call process and corresponding execution results, such as function call time, event call information (e.g., process call identifier and process call sequence number), and call return information.
[0036] Optionally, during operation, the data monitoring device determines the target function to be monitored and the probe mounting location of the target function. The probe mounting location includes the function entry point and / or function exit point of the target function. That is, after acquiring the target function to be monitored, the data monitoring device determines the corresponding function location as the probe mounting location. In a specific embodiment, the data monitoring device sets the function entry point and function exit point of the target function as the probe mounting location, and attaches a user-mode probe corresponding to the target function at the probe mounting location. The user-mode probe is used to intercept (hook) the target function in real time and collect the function call data of the target function.
[0037] Optionally, in one specific embodiment, the data monitoring device can use the user-mode probe to record function call time information and event call information in real time at the function entry point, and record the call end time and call return information at the function exit point (function return point).
[0038] 202. Based on the event call information in the function call data, associate the initial call event to obtain the link event data; Optionally, after acquiring the function call data, the data processing device also uses the event call information in the function call data to associate the initial call events associated with each target function during the call process, and combines them to generate the link event data corresponding to the cross-process call process.
[0039] Optionally, the initial call event is a single event during the function call process of the target function. Optionally, this initial call event includes client call events, server processing events, and data return events. Specifically, the client call event represents the call event corresponding to the target function initiating a function call in the user-mode program. The server processing event represents the call event generated by the user-mode program corresponding to the server's cross-process processing of the call information. The data return event represents the call event corresponding to the target function receiving the return data from the server.
[0040] Optionally, the link event data represents a combination of event data that characterizes the corresponding call chain during the function call process of the target function. That is, the link event data represents the combination of initial call events corresponding to each stage in a single function call of the target function. For example, the link event data represents the combination of initial call events corresponding to the target function initiating the call, cross-process transmission, and server-side processing during a single function call, so as to realize full-link monitoring of the target function's cross-process call and data return from the client to the server.
[0041] Optionally, the data monitoring device acquires the event call information from the function call data, and determines the target call event corresponding to the target function from each initial call event based on the process call identifier and process call sequence number in the event call information. The target call event is the initial call event associated with the specified target function during the call process.
[0042] Optionally, the data monitoring device uses process call identifiers and process call sequence numbers to filter target call events associated with the initiation of the target function call process, cross-process transmission, and server-side processing. It then associates the function call data with the target call event to obtain link event data. Specifically, after determining the target call event corresponding to the target function, the data monitoring device uses an event association program to associate the target call event with the function call data. The function call data is injected into the target call event as a hidden field and stored in a circular buffer area before being transmitted to the user-space program. The user-space program then combines client call events, server-side processing events, and data return events with the same process call identifier and process call sequence number in the target call event to obtain link event data, thereby achieving full-link monitoring of cross-process calls to the target function. The event association program is an eBPF (extended Berkeley Packet Filter) program.
[0043] 203. Generate the visual call data corresponding to the target function based on the data source extension interface and the link event data; Optionally, after acquiring the link event data corresponding to each target function in each function call process, the data monitoring device also generates visualized call data that represents the entire call process of the target function in the form of a visualized timeline or other visualized forms, based on the data source extension interface and the link event data.
[0044] Optionally, the data source extension interface is an extension interface used to collect link event data and generate a visualization display interface. That is, this data source extension interface is used to collect link event data, convert the link event data into a data format that can be recognized by the corresponding display interface, write the converted link event data into the trajectory cache space, and use the visualization rendering component to perform visualization rendering on the link event data in the trajectory cache space to obtain the visualization call data.
[0045] Optionally, the visualized call data is a visual representation of the entire function call process of target functions in different processes. That is, this visualized call data seamlessly displays the function call status of target functions in different processes using a sequence diagram or other visualization methods. For example... Figure 3 As shown, Figure 3 This is a schematic diagram illustrating a scenario of one embodiment of the data monitoring method for visualizing data retrieval provided in this application. Figure 3 In the illustrated embodiment, the visualized call data can show the complete process of cross-process function calls between target functions of processes A to D.
[0046] Optionally, after acquiring the link event data, the data monitoring device uses the data source extension interface to convert the format of the link event data to obtain converted event data. That is, after acquiring the link event data, the data monitoring device pushes the link event data to the data source extension interface to convert the link event data into a format recognizable by the visualization rendering component, obtaining converted event data, and then stores the converted event data in the corresponding trajectory buffer space. Optionally, in one specific embodiment, the visualization rendering component is a rendering component used to visualize the link event data. In one specific embodiment, the visualization rendering component is PerfettoUI.
[0047] Optionally, after converting the format of the link event data, the data monitoring device also renders the converted event data to obtain the visual call data corresponding to the target function. That is, the data monitoring device obtains the event timing information corresponding to the converted event data and generates a visual event component based on the event timing information and the converted event data. The event timing data represents the timing information of each link event data in the converted event data. In a specific embodiment, the event timing information includes the event start timestamp and the event duration.
[0048] Optionally, the data monitoring device uses the event call information corresponding to the visual event component to perform process event matching, thereby obtaining the event component combination corresponding to each objective function. That is, the data monitoring device performs process matching on the event call information of the visual event component to determine the visual event component corresponding to the objective function of each process. The driving visualization rendering component then renders the event component combination corresponding to each objective function onto the initial timeline component, obtaining the visual call data.
[0049] Optionally, the initial timeline component in the visualization rendering component can be obtained. This initial timeline component is a visualization component that renders data using time as the horizontal unit of division.
[0050] Optionally, the data monitoring device drives the visualization rendering component to render the event component combination onto the initial event axis component according to the event trajectory information and event timing information corresponding to the event component combination, thereby obtaining visualized call data, realizing the complete restoration of the function call chain across processes, and clearly showing the collaborative execution process of the target function between the client, transport layer, and server.
[0051] Optionally, the event trajectory information represents the process or thread call level corresponding to each visual event component in the event component combination, so as to clarify the execution context of the visual event component and avoid event confusion between different processes / threads. The visualization rendering component determines the process / thread corresponding to different visual event components according to the event trajectory information, and arranges the different visual event components vertically according to the event trajectory information.
[0052] Optionally, the event timing information represents the invocation time of each visual event component in the event component combination. The visualization rendering component arranges different visual event components horizontally according to the event timing information to generate an image that can intuitively present the execution duration and type of a single function event.
[0053] Optional, such as Figure 3As shown, the visualization rendering component also generates connections between different visualization event components based on process call identifiers, and uses these connections to link visualization event components that interact across processes. That is, the visualization rendering component connects these connections according to the order of the first executed visualization event component and the subsequent executed event, clarifying the direction of the link flow, realizing the visualization of cross-process or cross-thread link connections, solving the problem of link fragmentation, and intuitively presenting the call flow path in a timeline format.
[0054] 204. Perform performance diagnosis on the visualized call data to obtain performance diagnosis results.
[0055] Optionally, after generating the visualized call data, the data monitoring device also performs performance diagnosis on the visualized call data to obtain performance diagnosis results.
[0056] Optionally, in one specific embodiment, after acquiring the visualized call data, the data monitoring device can upload the visualized call data to a cloud server, so that the cloud server can aggregate the target call data corresponding to multiple target functions based on the visualized call data to perform performance diagnosis, thereby calculating the call time information of each target function, and then evaluating and determining whether there is a bottleneck function in the target function based on the call time information, so as to generate the corresponding performance diagnosis result.
[0057] Among them, the performance diagnosis result is the function diagnosis information that characterizes whether the objective function is an abnormal bottleneck function whose execution time exceeds a preset reasonable threshold and whose resource consumption is too high.
[0058] Optionally, in one specific embodiment, the data monitoring device can also deploy a performance diagnostic model corresponding to the target function locally, calculate the call time information of the target function based on the performance diagnostic model, and then perform performance evaluation on the target function based on the call time information to obtain the performance evaluation result.
[0059] Optionally, the data monitoring device acquires the performance diagnostic model corresponding to the objective function. The performance diagnostic model is an artificial intelligence model used to calculate the call time of the objective function for function performance evaluation.
[0060] Optionally, after acquiring the visualized call data, the data monitoring device evaluates the call time of the target function based on the performance diagnostic model and the visualized call data to determine the call time information of the target function. That is, the data monitoring device inputs the visualized call data as model input data into the performance diagnostic model, and uses the performance diagnostic model and the visualized call data to calculate the call time information of each target function. The call time information represents the time consumed by the target function when executing the call task.
[0061] Optionally, after determining the call time information of each target function, the data monitoring device further performs a performance evaluation of the target function based on the call time information and the target time information to obtain a performance diagnosis result. That is, the data monitoring device compares the call time information and the target time information to determine whether the target function takes more than a preset reasonable threshold when performing call processing. The target time information represents the reasonable duration of the target function during targeted call processing.
[0062] Optionally, if the data monitoring device determines that the call time is less than the target time, it determines that the time taken by the target function during the call processing is within a reasonable time range, determines that the performance of the target function is normal, and outputs a performance diagnosis result indicating that the target function is a normal function.
[0063] Optionally, if the data monitoring device determines that the call time is greater than the target time, it determines that the target function takes too long to execute the call, identifies the target function as a bottleneck function with abnormal performance, and outputs the performance diagnosis result that the target function is a bottleneck function.
[0064] In this embodiment, the data monitoring device responds to a data monitoring request for a target function, collects function call data of the target function using a user-space probe corresponding to the target function, associates initial call events with event call information in the function call data to obtain link event data, generates visualized call data corresponding to the target function based on the data source extension interface and the link event data, and performs performance diagnosis on the visualized call data to obtain performance diagnosis results. This achieves non-intrusive function call data collection via a user-space probe pre-mounted on the target function, associates the event call information with the corresponding link event data, renders the link event data into visualized call data for cross-process display, and then uses the visualized call data for performance diagnosis. This reduces the intrusiveness and interference of function link monitoring, effectively improves the compatibility and comprehensiveness of function link monitoring, and thus improves the accuracy of subsequent function diagnosis.
[0065] To better implement the data monitoring method in the embodiments of this application, a data monitoring device is also provided in the embodiments of this application, such as... Figure 4 As shown, Figure 4 This is a schematic diagram of one embodiment of the data monitoring device provided in this application. Specifically, the data monitoring device 300 includes: The information acquisition module 301 is configured to respond to a data monitoring request for a target function and collect function call data of the target function using a user-mode probe corresponding to the target function; Event association module 302 is configured to associate the initial call event with the event call information in the function call data to obtain the link event data; Link rendering module 303 is configured to generate visual call data corresponding to the target function based on the data source extension interface and the link event data; The function diagnostic module 304 is configured to perform performance diagnostics on the visualized call data and obtain performance diagnostic results.
[0066] In one possible implementation of this embodiment, the data monitoring device uses a user-mode probe corresponding to the target function to collect function call data of the target function, including: Determine the target function to be monitored, and the probe mounting location of the target function, wherein the probe mounting location includes the function entry and / or function exit of the target function; The user-state probe corresponding to the objective function is attached at the probe attachment location. The user-space probe is used to intercept the target function and collect the function call data of the target function.
[0067] In one possible implementation of this embodiment, the data monitoring device associates the initial call event with the event call information in the function call data to obtain link event data, including: Obtain the event call information from the function call data; The target call event corresponding to the target function in the initial call event is determined based on the process call identifier and process call sequence number in the event call information. The function call data and the target call event are associated to obtain the link event data.
[0068] In one possible implementation of this embodiment, the data monitoring device generates visual call data corresponding to the target function based on the data source extension interface and the link event data, including: The link event data is converted using the data source extension interface to obtain converted event data; The transformation event data is rendered to obtain the visual call data corresponding to the target function.
[0069] In one possible implementation of this embodiment, the data monitoring device renders the transformation event data to obtain visual call data corresponding to the target function, including: Obtain the event timing information corresponding to the transformation event data, wherein the event timing information includes the event start timestamp and the event duration; Generate a visual event component based on the event timing information and the transformation event data; By using the event call information corresponding to the visual event components, process events are matched to obtain the event component combinations corresponding to each of the target functions; The driving visualization rendering component combines and renders the event components corresponding to each objective function onto the initial timeline component to obtain visualized call data.
[0070] In one possible implementation of this embodiment, the data monitoring device drives the visualization rendering component to combine and render the event components corresponding to each of the objective functions onto the initial timeline component, thereby obtaining visualized call data, including: Obtain the initial timeline component from the visualization rendering component; The visualization rendering component is driven to render the event component combination onto the initial event axis component according to the event trajectory information and event timing information corresponding to the event component combination, thereby obtaining visualization call data.
[0071] In one possible implementation of this embodiment, the data monitoring device performs performance diagnosis on the visualized call data to obtain performance diagnosis results, including: Obtain the performance diagnostic model corresponding to the objective function; The time consumption of the target function is evaluated based on the performance diagnostic model and the visualized call data to determine the call time information of the target function; The performance of the objective function is evaluated based on the call time information and the target time information to obtain performance diagnostic results.
[0072] In this embodiment, the data monitoring device responds to a data monitoring request for a target function, collects function call data of the target function using a user-space probe corresponding to the target function, associates initial call events with event call information in the function call data to obtain link event data, generates visualized call data corresponding to the target function based on the data source extension interface and the link event data, and performs performance diagnosis on the visualized call data to obtain performance diagnosis results. This achieves non-intrusive function call data collection via a user-space probe pre-mounted on the target function, associates the link event data with the event call information, renders the link event data into visualized call data for cross-process display, and then uses the visualized call data for performance diagnosis. This reduces the intrusiveness and interference of function link monitoring, effectively improves the compatibility and comprehensiveness of function link monitoring, and thus improves the accuracy of subsequent function diagnosis.
[0073] This invention also provides a data monitoring device, such as... Figure 5 As shown, Figure 5 This is a schematic diagram of one embodiment of the data monitoring device provided in this application.
[0074] The data monitoring device integrates any of the data monitoring apparatuses provided in the embodiments of the present invention, and the data monitoring device includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor in the steps of the data monitoring method described in any of the above embodiments of the data monitoring method.
[0075] Specifically, the data monitoring equipment may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 5 The data monitoring equipment structure shown does not constitute a limitation on the data monitoring equipment. It may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 401 is the control center of the data monitoring equipment. It connects various parts of the equipment via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, thereby providing overall monitoring of the data monitoring equipment. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.
[0076] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data monitoring by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created based on the use of the data monitoring device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0077] The data monitoring equipment also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0078] The data monitoring device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0079] Although not shown, the data monitoring device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the data monitoring device loads the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402 to realize various functions, as follows: In response to a data monitoring request for the target function, the function call data of the target function is collected using the user-space probe corresponding to the target function; Based on the event call information in the function call data, the initial call event is associated to obtain the link event data; Generate visual call data corresponding to the target function based on the data source extension interface and the link event data; The performance of the visualized call data is then analyzed to obtain the performance analysis results.
[0080] Therefore, embodiments of the present invention provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a disk, or an optical disk, etc. A computer program is stored thereon, which is loaded by a processor to execute the steps in any of the data monitoring methods provided in the embodiments of the present invention. For example, the computer program loaded by the processor can execute the following steps: In response to a data monitoring request for the target function, the function call data of the target function is collected using the user-space probe corresponding to the target function; Based on the event call information in the function call data, the initial call event is associated to obtain the link event data; Generate visual call data corresponding to the target function based on the data source extension interface and the link event data; The performance of the visualized call data is then analyzed to obtain the performance analysis results.
[0081] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.
[0082] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.
[0083] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0084] The data monitoring method provided by the embodiments of this application has been described in detail above. Specific embodiments have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data monitoring method, characterized in that, The data monitoring method includes: In response to a data monitoring request for the target function, the function call data of the target function is collected using the user-space probe corresponding to the target function; Based on the event call information in the function call data, the initial call event is associated to obtain the link event data; Generate visual call data corresponding to the target function based on the data source extension interface and the link event data; The performance of the visualized call data is then analyzed to obtain the performance analysis results.
2. The data monitoring method according to claim 1, characterized in that, The step of collecting function call data of the target function using the user-space probe corresponding to the target function includes: Determine the target function to be monitored, and the probe mounting location of the target function, wherein the probe mounting location includes the function entry and / or function exit of the target function; The user-state probe corresponding to the objective function is attached at the probe attachment location. The user-space probe is used to intercept the target function and collect the function call data of the target function.
3. The data monitoring method according to claim 1, characterized in that, The step of associating the initial call event with the event call information in the function call data to obtain the link event data includes: Obtain the event call information from the function call data; The target call event corresponding to the target function in the initial call event is determined based on the process call identifier and process call sequence number in the event call information. The function call data and the target call event are associated to obtain the link event data.
4. The data monitoring method according to claim 1, characterized in that, The step of generating the visual call data corresponding to the target function based on the data source extension interface and the link event data includes: The link event data is converted using the data source extension interface to obtain converted event data; The transformation event data is rendered to obtain the visual call data corresponding to the target function.
5. The data monitoring method according to claim 4, characterized in that, The rendering of the transformation event data to obtain the visual call data corresponding to the target function includes: Obtain the event timing information corresponding to the transformation event data, wherein the event timing information includes the event start timestamp and the event duration; Generate a visual event component based on the event timing information and the transformation event data; By using the event call information corresponding to the visual event components, process events are matched to obtain the event component combinations corresponding to each of the target functions; The driving visualization rendering component combines and renders the event components corresponding to each objective function onto the initial timeline component to obtain visualized call data.
6. The data monitoring method according to claim 5, characterized in that, The driving visualization rendering component combines and renders the event components corresponding to each objective function onto the initial timeline component to obtain visualized call data, including: Obtain the initial timeline component from the visualization rendering component; The visualization rendering component is driven to render the event component combination onto the initial event axis component according to the event trajectory information and event timing information corresponding to the event component combination, thereby obtaining visualization call data.
7. The data monitoring method according to any one of claims 1-6, characterized in that, The performance diagnosis of the visualized call data, to obtain the performance diagnosis results, includes: Obtain the performance diagnostic model corresponding to the objective function; The time consumption of the target function is evaluated based on the performance diagnostic model and the visualized call data to determine the call time information of the target function; The performance of the objective function is evaluated based on the call time information and the target time information to obtain performance diagnostic results.
8. A data monitoring device, characterized in that, The data monitoring device includes: The information acquisition module is configured to respond to data monitoring requests for a target function and collect function call data of the target function using a user-space probe corresponding to the target function; The event association module is configured to associate the initial call event with the event call information in the function call data to obtain the link event data; The link rendering module is configured to generate visual call data corresponding to the target function based on the data source extension interface and the link event data. The function diagnostic module is configured to perform performance diagnostics on the visualized call data and obtain performance diagnostic results.
9. A data monitoring device, characterized in that, The data monitoring equipment includes: One or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps of the data monitoring method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to execute the steps of the data monitoring method according to any one of claims 1 to 7.