A method, apparatus and electronic device for interfacing data monitoring

By using dynamic proxies to configure proxy objects in interface data monitoring, the problem of low efficiency in interface data monitoring is solved, enabling real-time statistics and visualization of interface data, thus improving monitoring efficiency and timeliness.

CN114564357BActive Publication Date: 2025-12-12CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210190572.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2025-12-12
Estimated Expiration
2042-02-28

Smart Images

  • Figure CN114564357B_ABST
    Figure CN114564357B_ABST
Patent Text Reader

Abstract

The application discloses a method, device and electronic equipment for interface data monitoring, which comprises the following steps: acquiring a to-be-monitored interface, determining a proxy object of the to-be-monitored interface, the proxy object being a proxy object configured in a dynamic proxy mode, receiving a data access request of the to-be-monitored interface, and recording access data of the data access request in the to-be-monitored interface by using the proxy object. Based on the above method, interface data generated when the data access request accesses the to-be-monitored interface can be counted in real time without interfering with the running of the main business logic code of the to-be-monitored interface, the timeliness of interface data monitoring is ensured, the to-be-monitored object in the to-be-monitored interface can be separated from the main business logic code, that is, the access data of the to-be-monitored object in the to-be-monitored interface is directly recorded, the counting speed of subsequent interface data is improved, and the technical effect of improving the monitoring efficiency of interface data is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data monitoring, and particularly relates to an interface data monitoring method and device and electronic equipment. BACKGROUND

[0002] An interface refers to a reference type for defining an agreement, and the interface is an indispensable part of system operation. A large number of interfaces exist for a normally operating system to support access of different services. When facing a large number of interfaces, a large number of interface requests also exist, and any interface may be crashed due to a large number of interface requests. Therefore, how to monitor interface data in real time and ensure normal operation of the interface is very important.

[0003] At present, interface data monitoring is usually achieved by embedding corresponding monitoring object code in the bottom logic code of a to-be-monitored interface. However, embedding related code in the bottom logic code of the to-be-monitored interface may change the main business code logic of the to-be-monitored interface and also cause the bottom logic code of the to-be-monitored interface to become bloated, which may affect subsequent operation and response speed of the to-be-monitored interface, thereby affecting data statistical efficiency of the to-be-monitored interface and further affecting monitoring efficiency of interface data. SUMMARY

[0004] The present application provides an interface data monitoring method and device and electronic equipment to improve monitoring efficiency of interface data.

[0005] In a first aspect, the present application provides an interface data monitoring method, which comprises the following steps:

[0006] Obtaining a to-be-monitored interface and determining a proxy object of the to-be-monitored interface; wherein the proxy object is a proxy object configured in a dynamic proxy mode.

[0007] Receiving a data access request of the to-be-monitored interface and recording access data of the data access request in the to-be-monitored interface by using the proxy object.

[0008] Based on the above method, by recording access data of the data access request in the to-be-monitored interface by using the proxy object, interface data generated when the data access request accesses the to-be-monitored interface can be statistically recorded in real time without interfering with operation of main business logic code of the to-be-monitored interface, so that monitoring timeliness of interface data can be further ensured and monitoring efficiency of interface data can be improved.

[0009] In a possible design, the determining the proxy object of the to-be-monitored interface comprises: creating an aspect area in a compiling environment of the to-be-monitored interface; the aspect area represents an area that needs to be monitored in the to-be-monitored interface; compiling a proxy object class in the aspect area; and configuring the proxy object of the to-be-monitored interface in a dynamic proxy mode based on the proxy object class.

[0010] Based on the above method, by creating an aspect area in a compiling environment of the to-be-monitored interface, and compiling a proxy object class in the aspect area, the proxy object of the to-be-monitored interface is configured in a dynamic proxy mode, which can separate the monitoring object in the to-be-monitored interface from the main business logic code, directly record the access data of the monitoring object in the to-be-monitored interface, and improve the statistical speed of subsequent interface data.

[0011] In a possible design, the recording, by the proxy object, the access data of the data access request in the to-be-monitored interface comprises: identifying an access target of the data access request; recording, by the proxy object, the access target in a running log of the to-be-monitored interface; and generating the access data of the data access request in the to-be-monitored interface according to the running log.

[0012] Based on the above method, the proxy object is used to record the access data, which can realize real-time statistics of interface data generated when the data access request accesses the to-be-monitored interface without interfering with the running of the main business logic code of the to-be-monitored interface, thereby guaranteeing the timeliness of monitoring of the interface data.

[0013] In a possible design, the generating the access data of the data access request in the to-be-monitored interface according to the running log comprises: collecting running time, running parameters, and running states of the access target in the running log; and merging the running time, the running parameters, and the running states as the access data of the data access request in the to-be-monitored interface.

[0014] Based on the above method, the proxy object is used to record the access data, which can realize real-time statistics of interface data generated when the data access request accesses the to-be-monitored interface without interfering with the running of the main business logic code of the to-be-monitored interface, thereby guaranteeing the timeliness of monitoring of the interface data.

[0015] In a possible design, after the generating the access data of the data access request in the to-be-monitored interface according to the running log, the method further comprises: dimensionally splitting the access data according to a preset time period to obtain access data of a plurality of sub time periods; and performing graphical display of the access data of each sub time period in a page visualization mode to generate a data access page of the to-be-monitored interface.

[0016] Based on the above method, the access data is dimensionally split according to a preset time period to obtain access data of multiple sub-time periods, so as to split the access data according to the time dimension in a more fine-grained manner, and the data access page of the to-be-monitored interface can be generated by graphically displaying the access data of each sub-time period in a page visualization manner, so as to realize page visualization of the access data of each sub-time period, help users more clearly and intuitively understand the data change of the to-be-monitored interface, and thus improve the monitoring efficiency of the interface data.

[0017] In a possible design, the access data is dimensionally split according to a preset time period to obtain access data of multiple sub-time periods, including: determining a generation time of the access data, and determining a specified time period to which the generation time belongs; dividing the specified time period into multiple sub-time periods according to the preset time period; and obtaining the access data corresponding to each sub-time period according to a mapping relationship between a single sub-time period and the access data.

[0018] Based on the above method, the access data is split according to the time dimension in a more fine-grained manner, so that the data generated by the data access request in the to-be-monitored interface can be reflected from different sub-time periods, and thus the generation of the access data with time change can be more detailed and intuitive, and the timeliness of interface data monitoring is further ensured.

[0019] In a possible design, the access data of each sub-time period is graphically displayed in a page visualization manner to generate the data access page of the to-be-monitored interface, including: determining a data access chart of the to-be-monitored interface based on the layout of a page icon component of the access data of each sub-time period; and performing page rendering on the data access chart in a page visualization manner to obtain a data access interface of the to-be-monitored interface.

[0020] Based on the above method, the access data corresponding to each sub-time period is graphically displayed in a page visualization manner, so as to realize page visualization of the access data corresponding to each sub-time period, help users more clearly and intuitively understand the data change of the to-be-monitored interface, and thus improve the monitoring efficiency of the interface data.

[0021] In a second aspect, the present application provides an interface data monitoring device, the device comprising:

[0022] A determination proxy object module acquires a to-be-monitored interface and determines a proxy object of the to-be-monitored interface; wherein the proxy object is a proxy object configured in a dynamic proxy manner;

[0023] A record access data module receives a data access request of the to-be-monitored interface, and records access data of the data access request in the to-be-monitored interface by using the proxy object.

[0024] In a possible design, the determining the proxy object module is specifically configured to: create an aspect area in a compiling environment of the interface to be monitored; the aspect area represents an area to be monitored in the interface to be monitored; compile a proxy object class in the aspect area; and configure a proxy object of the interface to be monitored by using a dynamic proxy mode based on the proxy object class.

[0025] In a possible design, the recording access data module is specifically configured to: identify an access target of the data access request; record, by using the proxy object, the access target in a running log of the interface to be monitored; and generate access data of the data access request in the interface to be monitored according to the running log.

[0026] In a possible design, the recording access data module is specifically configured to: collect a running time, a running parameter and a running state of the access target in the running log; and merge the running time, the running parameter and the running state as the access data of the data access request in the interface to be monitored.

[0027] In a possible design, the apparatus further includes:

[0028] The splitting access data module splits the access data in a dimension according to a preset time period, to obtain access data of a plurality of sub time periods.

[0029] The displaying access data module displays the access data of each sub time period in a graphical manner by using a page visualization mode, to generate a data access page of the interface to be monitored.

[0030] In a possible design, the splitting access data module is specifically configured to: determine a generation time of the access data, and determine a specified time period to which the generation time belongs; divide the specified time period into a plurality of sub time periods according to the preset time period; and obtain the access data corresponding to each sub time period according to a mapping relationship between the single sub time period and the access data.

[0031] In a possible design, the displaying access data module is specifically configured to: determine a data access chart of the interface to be monitored based on a layout of a page icon component of the access data of each sub time period; and perform page rendering on the data access chart by using a page visualization mode, to obtain a data access interface of the interface to be monitored.

[0032] In a third aspect, the present application provides an electronic device, which includes:

[0033] a memory configured to store a computer program;

[0034] a processor configured to execute the computer program stored in the memory, to implement the method steps of the interface data monitoring method.

[0035] In a fourth aspect, the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method steps of the interface data monitoring method.

[0036] The technical effects of each of the second aspect to the fourth aspect and each aspect that can be achieved are described above in relation to the first aspect or the various possible schemes in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0037] Figure 1 A flowchart of the interface data monitoring method provided by the present application is shown in the following figure;

[0038] Figure 2 A flowchart of the recording access data provided by the present application is shown in the following figure;

[0039] Figure 3 A flowchart of the generating data access page provided by the present application is shown in the following figure;

[0040] Figure 4 A schematic diagram of the interface data monitoring device provided by the present application is shown in the following figure;

[0041] Figure 5 A schematic diagram of the structure of the electronic device provided by the present application is shown in the following figure. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be described in further detail below with reference to the accompanying drawings. The specific operation method in the method embodiment can also be applied to the device embodiment or the system embodiment. It should be noted that in the description of the present application, "multiple" is understood as "at least two". The association relationship between the associated objects is described, which means that there can be three relationships, for example, A and / or B, which means that there are three cases: A exists alone, A and B exist together, and B exists alone. A and B are connected, which means that A and B are directly connected and A and B are connected through C. In addition, in the description of the present application, "first", "second", etc. are used only for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can it be understood as indicating or implying order.

[0043] The method, device and electronic equipment for interface data monitoring provided by the embodiments of the present application are used to improve the monitoring efficiency of interface data, and solve the problem that the existing interface data monitoring method is realized by embedding corresponding monitoring object code in the bottom layer logic code of the interface to be monitored, and the data statistical efficiency of the monitoring interface is low.

[0044] According to the method provided in the embodiments of the present application, the data access request is recorded in the access data in the to-be-monitored interface through the created proxy object, the interface data generated when the data access request accesses the to-be-monitored interface can be counted in real time without interfering with the running of the main business logic code of the to-be-monitored interface, so that the timeliness of monitoring the interface data can be further guaranteed and the monitoring efficiency of the interface data can be improved.

[0045] The method provided in the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0046] participate Figure 1 As shown in the figure, the embodiments of the present application provide a method for monitoring interface data, and the specific process is as follows:

[0047] S1: Obtain a to-be-monitored interface and determine a proxy object of the to-be-monitored interface;

[0048] In the embodiments of the present application, first, a to-be-monitored interface is obtained, an aspect area is created in the compilation environment of the to-be-monitored interface, then a proxy object class is compiled in the aspect area, and the proxy object of the to-be-monitored interface is configured in a dynamic proxy mode based on the proxy object class.

[0049] Specifically, the aspect area can be understood as the pointcut position of the to-be-monitored interface, which is equivalent to the data position of the to-be-monitored interface that needs to be monitored, i.e., the data position of the proxy object that records the access data of the to-be-monitored interface generated later; the compilation environment can be understood as the code compilation environment of the to-be-monitored interface, such as the eclipse environment of the Java language; the proxy object class can be understood as the object class that needs to be proxied in the to-be-monitored interface, such as the log class, the method class, the event class, etc. In addition, the dynamic proxy mode is the mode used later when recording the access data of the to-be-monitored interface, such as the recording mode before or after the interface call.

[0050] In actual application, the to-be-monitored interface can be understood as a data interface that needs to access services in a business system, for example, in a trusted call system, the to-be-monitored interface can be a call charge query interface, an information query interface, and an operator calling interface, etc.; in a mall order system, the to-be-monitored interface can be an order query interface, an order payment interface, and an order closing interface, etc.

[0051] It is worth noting that generally a business system will exist a large number of data interfaces, and each data interface will face different users, that is, each data interface will receive data access requests sent from different clients of different customers, and when each data interface faces a large number of data access requests, the interface access will be collapsed or abnormal, thereby causing the entire business system to collapse. In view of this, the proxy object of the to-be-monitored interface is determined or created, and the proxy object is used to record the access data of the to-be-monitored interface in real time, thereby guaranteeing the timeliness of data acquisition of the to-be-monitored interface.

[0052] Further, in a possible implementation, the aspect region can be created by an AOP (Aspect Oriented Programming) container in the aspect-oriented technology, the proxy object class can be compiled by a java.lang.reflect.Proxy class in the aspect-oriented technology, and the proxy object of the to-be-monitored interface can be configured by a java.lang.reflect.InvocationHandler class in the dynamic proxy mode.

[0053] Specifically, the aspect-oriented technology refers to a technology for realizing unified maintenance of program functions through pre-compilation and dynamic proxy during running. In the embodiment of the present application, the aspect-oriented technology can be used to create the proxy object of the to-be-monitored interface, so as to separate the access data recording function of the to-be-monitored interface from the running program project of the to-be-monitored interface, thereby solving the problem of realizing interface data recording without changing the underlying logic code of the to-be-monitored interface.

[0054] Based on the creation of the proxy object, the to-be-monitored object and the main business logic code in the to-be-monitored interface can be separated, the access data of the to-be-monitored object in the to-be-monitored interface is directly recorded, the subsequent interface data statistical speed is improved, and therefore the real-time monitoring of the interface data can be guaranteed.

[0055] S2: receiving a data access request of the to-be-monitored interface, and recording access data of the data access request in the to-be-monitored interface by using the proxy object.

[0056] In the embodiment of the present application, the data access request can be generated based on different user needs, for example, the demand of a user a is to query order transaction data, and the demand of a user b is to query order refund data. In addition, the data access request can be obtained by the client corresponding to the to-be-monitored interface.

[0057] Further, before performing the embodiment S2 of the present application, the method can further include: detecting whether the data access request has an access error in the to-be-monitored interface, and processing the access error by using a preset exception handling mechanism when the data access request has the access error in the to-be-monitored interface, so as to guarantee normal recording of subsequent access data.

[0058] Specifically, the access error can include service selection failure, service / process failure, response failure and binding / execution failure.

[0059] Optionally, the access error can be detected by using a preset timeout mechanism, where the preset timeout mechanism includes a polling mechanism and a heartbeat mechanism. The polling mechanism refers to a mechanism for checking whether the data access request is invalid at a certain time interval. The heartbeat mechanism refers to a mechanism for periodically sending a heartbeat message to the to-be-monitored interface by the data access request.

[0060] Optionally, the preset exception handling mechanism can include a correction value return strategy, which is used to handle the service selection failure and the service / process failure. The preset exception handling mechanism can include a retry strategy, which is used to handle the response failure. The preset exception handling mechanism can include a process reconstruction strategy, which is used to handle the binding / execution failure.

[0061] Further, the process of performing the embodiment S2 of the present application can refer to the process shown in FIG. 2. Figure 2 Specifically, the process is as follows.

[0062] S201: Identify an access target of the data access request.

[0063] In the embodiment of the present application, the identification of the access object can be achieved by querying the data type in the data access request. For example, if the data access request is to query order transaction data, the data type of the data access request is “order transaction”, and the access target of the data access request is “order transaction”.

[0064] S202: Record a running log of the access target in the to-be-monitored interface by using the proxy object.

[0065] In the embodiments of the present application, the operation log refers to an operation record generated by running the to-be-monitored interface according to the data access request.

[0066] S203: generating access data of the data access request in the to-be-monitored interface according to the operation log.

[0067] In the embodiments of the present application, the running time, the running parameter and the running state of the access target in the operation log can be collected, and then the running time, the running parameter and the running state are merged, and the merged data is taken as the access data.

[0068] Specifically, the running time can include the start time, the execution time and the end time of the data access request in the to-be-monitored interface; the running parameter can be represented as a data field generated by the data access request in the to-be-monitored interface, such as an access path, an access object and an access result; and the running state can be represented as an interface state when the data access request is running in the to-be-monitored interface, such as an interface exception, a slow interface response and a normal interface response.

[0069] Based on the method provided in the embodiments of the present application, the proxy object is used to record the access data, so that the interface data generated by the data access request when accessing the to-be-monitored interface can be statistically calculated in real time without interfering with the running of the main business logic code of the to-be-monitored interface, thereby ensuring the timeliness of the interface data monitoring.

[0070] Further, based on the above method, after recording the access data, a data access page of the access data can be generated, as shown in FIG. 3, which is a flowchart of generating the data access page, and the specific process is as follows. Figure 3

[0071] S301: performing dimension splitting on the access data according to a preset time period to obtain access data of a plurality of sub-time periods;

[0072] In the embodiments of the present application, the access data is generated based on the running of the data access request in the to-be-monitored interface. In detail, the access data is more finely split according to the time dimension, so that the data generated by the data access request in the to-be-monitored interface can be reflected from different sub-time periods, thereby more detailed and intuitive positioning the generation of the access data with time change, and further ensuring the timeliness of the interface data monitoring.

[0073] It is worth noting that the above preset time period can be determined according to the interface start time, the interface running time and the interface stop time, or can be determined according to the actual business scenario.

[0074] ​Specifically, a generation time of the access data is queried, a specified time period to which the generation time belongs is determined, the specified time period is divided into a plurality of sub time periods according to a preset time period, and access data corresponding to each of the plurality of sub time periods is obtained according to a mapping relationship between each of the plurality of sub time periods and the access data.

[0075] It should be noted that the generation time can be obtained by querying an access log of the access data, and the mapping relationship can be understood as a one-to-one correspondence between each of the plurality of sub time periods and the access data.

[0076] Optionally, in actual application, the generation time can be implemented by a query statement, such as a SQL statement, and the mapping relationship can be obtained by compiling a mapping relationship table by using Java language.

[0077] S302: The access data of each of the plurality of sub time periods is graphically displayed in a page visualization manner to generate a data access page of the to-be-monitored interface.

[0078] In the embodiment of the application, the access data corresponding to each of the plurality of sub time periods can be graphically displayed in a page visualization manner to realize page visualization of the access data corresponding to each of the plurality of sub time periods, so that a user can more clearly and intuitively understand the data change of the to-be-monitored interface, thereby improving the monitoring efficiency of the interface data.

[0079] Specifically, a page chart component of the access data of each of the plurality of sub time periods is defined, a layout style and a layout relationship of the page chart component are configured, a data access chart of the to-be-monitored interface is obtained, the data access chart is page rendered in a page visualization manner, and a data access interface of the to-be-monitored interface is obtained.

[0080] More specifically, the page chart component can be a data interface of the access data corresponding to each of the plurality of sub time periods to be displayed in a chart to be generated subsequently, such as a tree chart component, a line chart component, and a statistical chart component, etc.; the layout style can be an exhibition form of the access data corresponding to each of the plurality of sub time periods in the chart component, such as size, color, and position, etc.; and the layout relationship can be a connection relationship of the access data corresponding to each of the plurality of sub time periods in the chart component, such as a half-column layout relationship, a vertical layout relationship, and a horizontal layout relationship, etc. In addition, the page visualization manner can be implemented by a page visualization rendering tool, such as an Echart rendering tool, etc.

[0081] Based on the method provided in the embodiment of the application, the interface data can be monitored to improve the monitoring efficiency of the interface data, and the following technical effects can be achieved:

[0082] 1. This application embodiment utilizes a proxy object to record the access data of data access requests in the interface to be monitored. This allows for the real-time recording of interface data generated when access requests access the interface to be monitored without interfering with the operation of the main business logic code of the interface to be monitored. This further ensures the timeliness of interface data monitoring and improves the efficiency of interface data monitoring.

[0083] 2. In this embodiment, an aspect region is created in the compilation environment of the interface to be monitored, and a proxy object class is compiled in the aspect region to configure the proxy object of the interface to be monitored using a dynamic proxy method. This allows the object to be monitored in the interface to be monitored to be separated from its main business logic code, that is, the access data of the object to be monitored in the interface to be monitored is directly recorded, thereby improving the statistical speed of subsequent interface data.

[0084] 3. In this embodiment, the access data is split into multiple sub-time periods according to a preset time period. This allows for a more granular split of the access data based on the time dimension. It can reflect the data generated by data access requests at the interface to be monitored from different sub-time periods. The access data of each sub-time period is graphically displayed using a page visualization method to generate a data access page for the interface to be monitored. This enables page visualization of the access data for each sub-time period, helping users to understand the data changes of the interface to be monitored more clearly and intuitively, thereby improving the monitoring efficiency of interface data.

[0085] Based on the same inventive concept, this application also provides an interface data monitoring device to improve the monitoring efficiency of interface data and solve the problem of low data statistical efficiency in existing technologies. See [link to relevant documentation]. Figure 4 The device includes:

[0086] The proxy object determination module 401 obtains the interface to be monitored and determines the proxy object of the interface to be monitored; wherein, the proxy object is a proxy object configured using dynamic proxy method;

[0087] The data access recording module 402 receives data access requests from the interface to be monitored and uses a proxy object to record the access data of the data access requests in the interface to be monitored.

[0088] In one possible design, the proxy object module 401 is specifically used to: create aspect regions in the compilation environment of the interface to be monitored; wherein, the aspect region represents the region in the interface to be monitored that needs to be monitored; compile the proxy object class in the aspect region; and configure the proxy object of the interface to be monitored using a dynamic proxy method based on the proxy object class.

[0089] In a possible design, the recording access data module 402 is specifically configured to: identify an access target of a data access request; record the access target in a running log of the to-be-monitored interface by using an agent object; and generate access data of the data access request in the to-be-monitored interface according to the running log.

[0090] In a possible design, the recording access data module 402 is specifically configured to: collect running time, running parameters, and running states of the access target in the running log; and merge the running time, the running parameters, and the running states as the access data of the data access request in the to-be-monitored interface.

[0091] In a possible design, the apparatus further includes:

[0092] The splitting access data module splits the access data in a dimension according to a preset time period, to obtain access data of a plurality of sub time periods.

[0093] The display access data module displays the access data of each sub time period in a graphical manner to generate a data access page of the to-be-monitored interface.

[0094] In a possible design, the splitting access data module is specifically configured to: determine a generation time of the access data, and determine a specified time period to which the generation time belongs; divide the specified time period into a plurality of sub time periods according to a preset time period; and obtain access data corresponding to each of the plurality of sub time periods according to a mapping relationship between a single sub time period and the access data.

[0095] In a possible design, the display access data module is specifically configured to: determine a data access chart of the to-be-monitored interface based on a layout of a page icon component of the access data of each sub time period; and perform page rendering on the data access chart in a page visualization manner to obtain a data access interface of the to-be-monitored interface.

[0096] Based on the above device, by determining the proxy object to record the data access request in the access data in the interface to be monitored, the interface data generated by the data access request in the interface to be monitored can be counted in real time without interfering with the running of the main business logic code of the interface to be monitored, so that the timeliness of the interface data monitoring can be further guaranteed, and the monitoring efficiency of the interface data can be improved. Secondly, the aspect area is created in the compilation environment of the interface to be monitored, and the proxy object class is compiled in the aspect area, so that the proxy object of the interface to be monitored can be configured in a dynamic proxy mode, the monitoring object in the interface to be monitored can be separated from the main business logic code, that is, the access data of the monitoring object in the interface to be monitored is directly recorded, and the subsequent interface data counting speed is improved. In addition, the access data is dimensionally split according to a preset time period to obtain access data of a plurality of sub-time periods, so that the access data is more finely split according to the time dimension, the data generated by the data access request in the interface to be monitored from different sub-time periods is reflected, and the access data of each sub-time period is graphically displayed in a page visualization manner to generate a data access page of the interface to be monitored, so as to realize page visualization of the access data of each sub-time period, help users to more clearly and intuitively understand the data change of the interface to be monitored, and thus the monitoring efficiency of the interface data can be improved.

[0097] Based on the same inventive concept, the embodiments of the present application also provide an electronic device, which can realize the functions of the foregoing interface data monitoring device, and the functions of the foregoing interface data monitoring device are not repeated here. Figure 5 The electronic device includes:

[0098] At least one processor 501 and a memory 502 connected with the at least one processor 501, and the specific connection medium between the processor 501 and the memory 502 is not limited in the embodiments of the present application, Figure 5 In the foregoing embodiment, the connection between the processor 501 and the memory 502 is taken by way of example through a bus 500. The bus 500 is represented by a thick line in the foregoing embodiment, and the connection modes between other components are only schematically illustrated and are not limited. The bus 500 can be divided into an address bus, a data bus, a control bus and the like, and for the convenience of representation, Figure 5 In the foregoing embodiment, only one thick line is used to represent, but it does not mean that there is only one bus or only one type of bus. Alternatively, the processor 501 can also be called a controller, and the name is not limited. Figure 5

[0099] In the embodiments of the present application, the memory 502 stores instructions executable by the at least one processor 501, and the at least one processor 501 can execute the interface data monitoring method discussed above by executing the instructions stored in the memory 502. The processor 501 can realize the functions of various modules in the device shown in Figure 4 . ​

[0100] The processor 501 is the control center of the apparatus, and can connect all parts of the apparatus by various interfaces and lines, and monitor the apparatus as a whole by running or executing instructions stored in the memory 502 and calling data stored in the memory 502, so as to realize various functions and process data of the apparatus.

[0101] In a possible design, the processor 501 can include one or more processing units, and the processor 501 can integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication. It can be understood that the modem processor can also not be integrated into the processor 501. In some embodiments, the processor 501 and the memory 502 can be implemented on the same chip, and in some embodiments, they can also be implemented on separate chips respectively.

[0102] The processor 501 can be a general-purpose processor, for example, a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute each method, step, and logic block disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the interface data monitoring method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.

[0103] The memory 502, as a non-volatile computer readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 502 can include at least one type of storage medium, for example, can include flash memory, hard disk, multimedia card, card type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. The memory 502 is any other medium capable of carrying or storing desired program code in the form of instructions or data structures and capable of being accessed by a computer, but is not limited thereto. The memory 502 in the embodiments of the present application can also be a circuit or any other device capable of realizing a storage function, used for storing program instructions and / or data.

[0104] By designing and programming the processor 501, the code corresponding to the interface data monitoring method introduced in the foregoing embodiments can be fixed in the chip, so that the chip can execute the steps of the interface data monitoring method of the embodiments shown in the running time. Figure 1 How to design and program the processor 501 is a technology known to those skilled in the art, which will not be described here.

[0105] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, when the computer instructions run on a computer, the computer instructions make the computer execute the interface data monitoring method discussed above.

[0106] In some possible implementations, various aspects of the interface data monitoring method provided by the present application can also be implemented in the form of a program product, which includes program code, when the program product runs on the device, the program code is used to make the control device execute the steps in the interface data monitoring method according to various exemplary embodiments of the present application described above in the specification.

[0107] Those skilled in the art will appreciate that embodiments of the present application can be readily used as software, hardware, or a combination of software and hardware. In one

[0108] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks.

[0109] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks.

[0110] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks. Figure 1 one or more functions specified in the flowchart block or blocks.

[0111] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the apparatus and methods disclosed herein, equivalents and substitutions thereof could be made by one of ordinary skill in the art without departing from the spirit and scope of the disclosure. Any and all such modifications and variations are intended to be included herein within the scope of the present application and expressed as a part thereof.

Claims

1. A method of interfacing data monitoring, characterized by, The method comprises: acquiring a to-be-monitored interface; creating an aspect area in a compiling environment of the to-be-monitored interface by an aspect-oriented technology AOP container; wherein the aspect area represents an area in the to-be-monitored interface that needs to be monitored; compiling a proxy object class in the aspect area by a java.lang.reflect.Proxy class in the aspect-oriented technology; configuring a proxy object of the to-be-monitored interface by a java.lang.reflect.InvocationHandler class in a dynamic proxy mode based on the proxy object class; wherein the proxy object is a proxy object configured in the dynamic proxy mode; receiving a data access request of the to-be-monitored interface; detecting whether the data access request has an access error in the to-be-monitored interface by a preset timeout mechanism, and processing the access error by a preset exception handling mechanism when the data access request has the access error in the to-be-monitored interface; recording access data of the data access request in the to-be-monitored interface by the proxy object; wherein the timeout mechanism comprises a polling mechanism and a heartbeat mechanism; the access error comprises at least one of service selection failure, service / process failure, response failure, and binding / execution failure; the service selection failure comprises at least one of service description error, service mismatch error, and application resource nonexistence error; the service / process failure comprises at least one of service development error and service combination process design error; the response failure comprises at least one of network delay, network congestion, and server device fault error in a distributed environment; the binding / execution failure comprises at least one of authentication failure error, Qos non-satisfaction error, parameter mismatch error, and return result invalidity error; the processing of the access error by the preset exception handling mechanism when the data access request has the access error in the to-be-monitored interface comprises: if the access error is the service selection failure or the service / process failure, processing the access error by a correction value return strategy; if the access error is the response failure, processing the access error by a retry strategy; if the access error is the binding / execution failure, processing the access error by a process reconstruction strategy.

2. The method of claim 1, wherein, the recording of the access data of the data access request in the to-be-monitored interface by the proxy object comprises: identifying an access target of the data access request; recording a running log of the access target in the to-be-monitored interface by the proxy object; generating access data of the data access request in the to-be-monitored interface according to the running log.

3. The method of claim 2, wherein, the generating of the access data of the data access request in the to-be-monitored interface according to the running log comprises: collecting running time, running parameters, and running state of the access target in the running log; merging the running time, the running parameters, and the running state as the access data of the data access request in the to-be-monitored interface.

4. The method according to any one of claims 2-3, wherein, The method further comprises, after generating the access data of the data access request in the to-be-monitored interface according to the operation log: dimensionally splitting the access data according to a preset time period to obtain access data of multiple sub-time periods; performing graphical display of the access data of each sub-time period in a page visualization manner to generate a data access page of the to-be-monitored interface.

5. The method of claim 4, wherein, The dimensionally splitting the access data according to a preset time period to obtain access data of multiple sub-time periods comprises: determining a generation time of the access data and a specified time period to which the generation time belongs; dividing the specified time period into multiple sub-time periods according to the preset time period; obtaining access data corresponding to each sub-time period according to a mapping relationship between a single sub-time period and access data.

6. The method of claim 4, wherein, The performing graphical display of the access data of each sub-time period in a page visualization manner to generate a data access page of the to-be-monitored interface comprises: determining a data access chart of the to-be-monitored interface based on a layout of a page icon component of the access data of each sub-time period; performing page rendering on the data access chart in the page visualization manner to obtain a data access interface of the to-be-monitored interface.

7. An apparatus for interfacing data monitoring, the apparatus comprising: The apparatus comprises: a determination proxy object module configured to acquire a to-be-monitored interface, create a cutting area in a compilation environment of the to-be-monitored interface through an aspect-oriented technology (AOP) container, wherein the cutting area represents a region that needs to be monitored in the to-be-monitored interface, and compile a proxy object class in the cutting area through a java.lang.reflect.Proxy class in the aspect-oriented technology; a record access data module configured to receive a data access request of the to-be-monitored interface, and record access data of the data access request in the to-be-monitored interface by using the proxy object; The interface data monitoring apparatus is further configured to detect whether an access error occurs in the data access request in the to-be-monitored interface through a preset timeout mechanism, and handle the access error by using a preset exception handling mechanism when the access error occurs in the data access request in the to-be-monitored interface. The timeout mechanism comprises a polling mechanism and a heartbeat mechanism; the access error comprises at least one of service selection failure, service / process failure, response failure and binding / execution failure; the service selection failure comprises at least one of service description error, service mismatch error and application resource nonexistence error; the service / process failure comprises at least one of service development error and service combination process design error; the response failure comprises at least one of network delay, network congestion and server device fault error of a distributed environment; the binding / execution failure comprises at least one of authentication failure error, Qos non-satisfaction error, parameter mismatch error and returned result invalidity error; The method comprises the following steps: If the access error is the service selection failure or the service / process failure, the access error is processed by a correction value return strategy; If the access error is the response failure, the access error is processed by a retry strategy; If the access error is the binding / execution failure, the access error is processed by a process reconstruction strategy.

8. An electronic device, comprising: The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the method steps of any one of claims 1-6. The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the method steps of any one of claims 1-6. ​ 9. A computer-readable storage medium, characterized in that, ​

Citation Information

Patent Citations

  • Service call recording method and device, computer equipment and storage medium

    CN110290212A