CN114064425A - Dynamic dotting method and device - Google Patents

Dynamic dotting method and device Download PDF

Info

Publication number
CN114064425A
CN114064425A CN202010764328.6A CN202010764328A CN114064425A CN 114064425 A CN114064425 A CN 114064425A CN 202010764328 A CN202010764328 A CN 202010764328A CN 114064425 A CN114064425 A CN 114064425A
Authority
CN
China
Prior art keywords
setting
dotting
file
name
class
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010764328.6A
Other languages
Chinese (zh)
Inventor
不公告发明人
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Daxing Technology Co ltd
Original Assignee
Beijing Daxing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Daxing Technology Co ltd filed Critical Beijing Daxing Technology Co ltd
Priority to CN202010764328.6A priority Critical patent/CN114064425A/en
Publication of CN114064425A publication Critical patent/CN114064425A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Hardware Design (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a dynamic dotting method and a dynamic dotting device, wherein the method comprises the following steps: acquiring description information of the setting type file, checking the description information of the setting type method, and acquiring the setting method and the setting type file according to the method parameter, the name of the setting method and the name of the setting type file; intercepting and preprocessing a setting method to set the setting method to a state that can be dotted; calling an interface at the preposition or postposition of the setting method, reporting dotting data to fill the dotting data at the preposition or postposition of the setting method, redefining the setting file to obtain an enhanced setting file; sending the enhanced setting class file to a setting agent end so that the setting agent end replaces the setting class file with the enhanced setting class file through a byte code enhancement technology to realize dynamic dotting of a program; according to the invention, the dotting data is implanted when the program runs, so that the dotting efficiency and the dotting accuracy of the program are improved.

Description

Dynamic dotting method and device
Technical Field
The invention relates to the field of computer information processing, in particular to a dynamic dotting method and a dynamic dotting device.
Background
In the prior art, the industry generally collects and statistically analyzes data indexes by adopting a dotting mode for a software system, that is, collects and statistically analyzes data indexes by using the dotting mode, and the importance of the dotting analysis is self-evident for a visual health check of the software system.
However, in distributed link tracing, dotting is usually performed on a critical path key code executed by a program in advance, dotting is performed before and after the execution of the method, the service needs to be restarted after updating to be effective, and each point position can only be determined when the program is started and cannot be dynamically modified during running; therefore, dotting efficiency is low, the code redundancy is large, and the code stability is poor.
In view of this, how to provide a method for dynamically increasing dotting for distributed link tracking is an urgent problem to be solved in the prior art.
Disclosure of Invention
The invention provides a method for dynamically increasing dotting to solve the technical problem.
The present disclosure provides a dynamic dotting method, which includes:
acquiring description information of a setting type file, wherein the description information of the setting type file comprises a name of a setting method, parameters of the setting method and dotting data;
checking the description information of the setting method, and acquiring the setting method and the setting file according to the method parameter, the name of the setting method and the name of the setting file;
intercepting and preprocessing a setting method to set the setting method to a state that can be dotted;
calling an interface at the preposition or postposition of the setting method, reporting dotting data to fill the dotting data at the preposition or postposition of the setting method, redefining the setting file to obtain an enhanced setting file;
and sending the enhanced setting class file to a setting agent end so that the setting agent end replaces the setting class file with the enhanced setting class file through a byte code enhancement technology to realize dynamic dotting of the program.
Further, the verifying the description information of the setting type method includes:
judging whether the parameters of the method meet the grammar rules or not, and judging whether the name of the setting method is matched with the name of the setting file or not;
and if the method parameters meet the grammar rules and the names of the setting methods are matched with the names of the setting files, loading the setting files and the setting methods according to the method parameters, the names of the setting methods and the names of the setting files.
Further, intercepting and preprocessing the setting method to set the setting method to a state that can be dotted includes:
judging whether the setting method is a static method or not;
if the setting method is a static method, statically intercepting the code segment of the setting method, and preprocessing the intercepted code segment;
if the setting method is a non-static method, the example intercepts the code segment of the setting method and preprocesses the intercepted code segment.
Further, the method further comprises:
acquiring all class files of the service of the set agent terminal;
constructing a prefix tree of class files, a prefix tree of a method and a prefix tree of method parameters according to all class files of the service of the set proxy end;
in the process of acquiring the name of the set class file, the name of the set method and the method parameter, the prefix tree of the class file, the prefix tree of the method and the prefix tree of the method parameter are displayed.
Further, the acquiring the name of the setting class file, the name of the setting method, the method parameter, and the dotting data includes:
setting a class file to comprise a focus event class, wherein the focus event can be triggered when a page element obtains or loses focus, and the time is utilized to be matched with a document. Wherein the focus event comprises an bubbling event and a non-bubbling event.
Further, the focused focus of the eyeball of the user acquired based on the acquired state of the mobile phone by the motion sensor of the terminal or the camera of the terminal is taken as the focus event class.
Further, comprising:
the dotting fields are mutually independent, and a certain event or behavior can be accurately positioned; a certain behavior event can be accurately positioned through 1-2 parameters;
the dotting field is required to accord with an enumeration principle, all dotting related to data which is possibly required is enumerated one by one, and the condition of missing dotting is ensured not to occur according to page exhaustion or flow exhaustion;
the dotting fields are to be described precisely, and the non-disputed description of each dotting event is made, including but not limited to: collection logic, data structure, special case handling.
The present disclosure provides a dynamic dotting device, including:
the acquisition module is used for acquiring the description information of the setting type file, wherein the description information of the setting type file comprises the name of the setting method, the parameter of the setting method and dotting data;
the verification module is connected with the acquisition module and is used for verifying the description information of the setting method and acquiring the setting method and the setting file according to the method parameters, the name of the setting method and the name of the setting file;
the interception setting module is connected with the verification module and is used for intercepting and preprocessing the setting method so as to set the setting method to be in a dotting state;
the filling module is connected with the interception setting module and used for calling an interface on the front position or the rear position of the setting method and reporting dotting data so as to fill the dotting data on the front position or the rear position of the setting method and redefine the setting file to obtain the enhanced setting file;
and the dotting processing module is connected with the filling module and used for sending the enhanced setting class file to the setting agent terminal so that the setting agent terminal replaces the setting class file with the enhanced setting class file through a byte code enhancement technology to realize the dynamic dotting of the program.
Further, the check module is configured to:
judging whether the parameters of the method meet the grammar rules or not, and judging whether the name of the setting method is matched with the name of the setting file or not;
and if the method parameters meet the grammar rules and the names of the setting methods are matched with the names of the setting files, loading the setting files and the setting methods according to the method parameters, the names of the setting methods and the names of the setting files.
Further, the interception setting module is configured to:
judging whether the setting method is a static method or not;
if the setting method is a static method, statically intercepting the code segment of the setting method, and preprocessing the intercepted code segment;
if the setting method is a non-static method, the example intercepts the code segment of the setting method and preprocesses the intercepted code segment.
Furthermore, the set class file comprises a focus event class, the focus event can be triggered when the page element obtains or loses focus, and the acquisition module is used for utilizing the time and matching with the document. Wherein the focus event comprises an bubbling event and a non-bubbling event.
Further, the acquisition module is used for acquiring a focused focus of the eyeball of the user based on the acquired mobile phone state of the motion sensor of the terminal or the acquired camera of the terminal as a focus event class.
Further, the dotting processing module is further configured to: acquiring all class files of the service of the set agent terminal;
constructing a prefix tree of class files, a prefix tree of a method and a prefix tree of method parameters according to all class files of the service of the set proxy end;
in the process of acquiring the name of the set class file, the name of the set method and the method parameter, displaying a prefix tree of the class file, a prefix tree of the method and a prefix tree of the method parameter;
furthermore, dotting fields are independent from one another, and certain event or behavior can be accurately positioned; a certain behavior event can be accurately positioned through 1-2 parameters;
the dotting field is required to accord with an enumeration principle, all dotting related to data which is possibly required is enumerated one by one, and the condition of missing dotting is ensured not to occur according to page exhaustion or flow exhaustion;
the dotting fields are to be described precisely, and the non-disputed description of each dotting event is made, including but not limited to: collection logic, data structure, special case handling.
The present disclosure also provides a computer device, including a processor, a memory, a bus, a communication interface, a computer program, a dotting apparatus as above, a computer program running on the dotting apparatus, the computer program, when executed by the processor, implementing the steps of any of the dotting methods.
The invention discloses a dynamic dotting method and a device, redefines a set file, and can implant dotting data at a corresponding position of the set method when a program runs, thereby realizing the dynamic dotting of the program, improving the dotting efficiency and the dotting accuracy of the program, reducing the dotting workload and improving the stability of codes.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description, serve to explain the principles of the invention.
The invention will be more clearly understood from the following detailed description, taken with reference to the accompanying drawings, in which:
FIG. 1 illustrates a dynamic dotting method according to an embodiment of the present invention.
Fig. 2 illustrates a dynamic dotting method according to another embodiment of the present invention.
FIG. 3 illustrates a dynamic dotting example of another embodiment of the present invention.
Fig. 4 is a block diagram of a dynamic dotting apparatus according to another embodiment of the present invention.
Fig. 5 shows a block diagram of a computer apparatus of another embodiment of the present invention.
Detailed Description
Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Embodiments of the invention are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the computer system/server include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
The computer system/server may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Fig. 1 shows a dynamic dotting method according to an embodiment of the present invention, specifically, the method includes:
step 101, obtaining description information of a setting type file, wherein the description information of the setting type file comprises a name of a setting method, parameters of the setting method and dotting data.
In one embodiment, Class (Class) is the basis of object-oriented programming implementation information encapsulation, and the set Class file may include a focus event Class, and the focus event may be triggered when a page element gets or loses focus, and may be used together with a focus. Wherein the focus event comprises an bubbling event and a non-bubbling event.
In one embodiment, the focus of interest of the eyeball of the user is acquired based on the acquired state of the mobile phone of the motion sensor of the terminal or the camera of the terminal as the focus event class.
In one embodiment, 6 focus class events may be defined: blu: triggered when an element loses focus, the event will not bubble, all browsers support; focus: triggered when an element gets focus, the event will not bubble, all browsers support; focusin: equivalent to a focus event, but it bubbles; focusout: is a generic version of the HTML event blu.
In one embodiment, a class includes at least one method, a method refers to a piece of program or code that can be run directly or can be referred to by another piece of program or code, and a method includes information such as a name of the method, a method parameter, and a return value, in addition to code for implementing business logic.
In one embodiment, the computer device may obtain data in multiple ways, for example, the name of the setting class file, the name of the setting method, the method parameter, and the dotting data may be obtained by importing data in batches, or the name of the setting class file, the name of the setting method, the method parameter, and the dotting data input into the UI interface may be obtained by an input device, such as a keyboard, a display, or a touch screen, where the setting class file and the setting method refer to a class file and a method that a user needs to perform dotting, respectively. In addition, the computer equipment can also acquire the name of the service so as to determine the loading range of the class file and acquire the name of the dotting file, so that the corresponding dotting file is searched by the name of the dotting file after dotting and information interpretation is carried out.
In one embodiment, all class files of the service where the setting agent side is located can be obtained; constructing a prefix tree of class files, a prefix tree of a method and a prefix tree of method parameters according to all class files of the service of the set proxy end; in the process of acquiring the name of the set class file, the name of the set method and the method parameter, the prefix tree of the class file, the prefix tree of the method and the prefix tree of the method parameter are displayed.
In one embodiment, the name of the service where the dotting program is located can be obtained, so that all class files of the service can be conveniently loaded, and a prefix tree of the class files, a prefix tree of the method and a prefix tree of the method parameters are constructed according to the loaded class files, so that the prefix tree of the class files, the prefix tree of the method and the prefix tree of the method parameters are displayed in the process of inputting the name of the set class files, the name of the set method and the method parameters by a user, an automatic name completion function is provided, the workload of the user is further reduced, and the dotting efficiency is improved.
And 102, checking the description information of the setting method, and acquiring the setting method and the setting file according to the method parameter, the name of the setting method and the name of the setting file.
In one embodiment, the verifying the description information of the setting class method includes: judging whether the parameters of the method meet the grammar rules or not, and judging whether the name of the setting method is matched with the name of the setting file or not;
and if the method parameters meet the grammar rules and the names of the setting methods are matched with the names of the setting files, loading the setting files and the setting methods according to the method parameters, the names of the setting methods and the names of the setting files.
Step 103, intercepting and preprocessing the setting method to set the setting method to a state that can be dotted.
In one embodiment, it may be determined whether the setting method is a static method; if the setting method is a static method, statically intercepting the code segment of the setting method, and preprocessing the intercepted code segment; if the setting method is a non-static method, the example intercepts the code segment of the setting method and preprocesses the intercepted code segment.
And 104, calling an interface at the front position or the rear position of the setting method, reporting dotting data to fill the dotting data at the front position or the rear position of the setting method, redefining the setting file, and obtaining the enhanced setting file.
And 105, sending the enhanced setting class file to a setting agent end so that the setting agent end replaces the setting class file with the enhanced setting class file through a byte code enhancement technology to realize dynamic dotting of the program.
In one embodiment, the call chain log may be generated by a provisioning agent. The performance measurement and the service logic can be completely separated by setting the non-invasive deployment of the agent, and the execution time of any method of any type can be measured, so that the acquisition efficiency is greatly improved, and the operation and maintenance cost is reduced. There are two main classes of agents based on service span: the method comprises the steps that an agent in the service is used for collecting data of method calling level information in the service through a Java agent mechanism, wherein the method calling level information comprises the information of method calling time consumption, parameter entering, parameter leaving and the like; cross-service proxies, which require seamless support for the mainstream RPC framework in plug-in form; and accommodates custom RPC frameworks by providing standard data specifications.
In one embodiment, the enhanced setting class file may be sent to a server connected to the setting agent, and then the enhanced setting class file is sent to the setting agent through the server, and finally, the setting agent may dynamically replace the setting class file with the enhanced setting class file through a byte code enhancement technique, thereby implementing dynamic dotting of the program.
In one embodiment, in the whole dotting process, the program can continuously run, and after dotting, the program can output a corresponding dotting file, so that the method parameters or return values concerned by the user are collected into the dotting file in the form of dotting data, and then the user can perform information interpretation according to the collected information to obtain corresponding performance monitoring information.
According to the dynamic dotting method provided by the embodiment, the dotting data are implanted into the corresponding position of the setting method during the program running, the setting type file is redefined, the dynamic dotting of the program is realized, the dotting efficiency and the dotting accuracy of the program are improved, the dotting workload is reduced, and the stability of the code is improved.
In one embodiment, the dotting fields are independent of each other, and can accurately locate a certain event or behavior; the method can accurately position a certain behavior event through 1-2 parameters, for example, if a click event of a 'confirm search' button on a search page is a search, the situation that other events in the same page are named as the search is avoided;
in one embodiment, the dotting field should conform to an enumeration principle, enumerate all dotting points related to data which may be needed one by one, and may be exhaustive according to a page or a flow, thereby ensuring that the dotting missing condition does not occur.
In one embodiment, the dotting field should be described exactly, and the non-disputed description of each dotting event is made, including but not limited to: collecting logic, data structures, special case handling, etc.; the common click event collection logic has no understanding deviation, and most of the events occur in the following situations related to state reporting after the events occur: for example, what is the WeChat sharing that needs to click the sharing button to report, or what is the sharing button clicked to report after the jump is successful? Exposure dotting is involved: e.g. content exposure, if the user slides up and down to require repeated exposure? Does switch navigation require re-exposure? Is it necessary to return from the detail page whether the exposed content needs to be exposed again? And (3) dotting related content display floors: for example, the content flow is marked as 1,2,3 … from top to bottom, and whether different types share a floor count (e.g., article 123, whether the fourth ad spot is to be reported 4 or to be re-counted 1).
In one embodiment, the data structure is a literal meaning, defines the data type of the reported field, integer/character string, etc., and special cases such as more contents are reported at one time, and needs to define a format, like a group of search association word exposure, we need to define the json format report of ' association word 1 ' and ' association word 2 ', … '; the predefining of the data structure has the advantages that the ios and Android reporting consistency can be kept, and the efficiency of cleaning and processing the data at the later stage is improved;
in one embodiment, the information that needs to be paid attention to by the program dynamic point-taking may include: WHO: a user attribute; the user attributes (sex, age, native place, and the like) and the product attributes (member level, liveness, preferred content type, and the like) are included, and the attributes do not change along with the occurrence of the behavior, so that the attributes are not reflected in dotting and are generally associated with a user wide table by a user _ id; WHEN: the time of the behavior is not the reporting time, but the reporting time is delayed from the behavior time; WHERE: the location of occurrence; HOW: some states when behavior occurs, such as operating system, network status, screen scale, resolution, etc.; WHAT: the actions that occur in detail, such as clicking, exposing, accessing, etc., are expanded upon in the examples that follow.
In one embodiment, the parameters common to the methods of dotting the fields, that is, the parameters that need to be reported for any behavior, are generally defined in advance to avoid repetitive labor, and are reported by default for each version of dotting, and some general examples are listed below.
In one embodiment, similar to the method common parameters of the dotted field, general page accesses are also logic defined at the bottom layer, without repeated definitions, such as whether to return is _ back: if the PVUV of a certain page needs to be counted, if the parameter is not available, the data returned from the next page by the user cannot be distinguished, and the data is high; dynamic json string: some pages need to report some customized parameters, for example, the order page wants to know the order ID & order status, and the content page wants to know the ID of the article, so as to refine the operation.
In one embodiment, the parameters of the setting method include exposure class: exposure dotting is that no click action occurs, and dotting reported when contents are exposed is mostly used for data analysis of content streams (commodity streams) and used for calculating CTR (click through rate, click times/exposure times) and user duration (exposure duration).
In one embodiment, the parameters of the setting method include a tracking parameter, sometimes it is necessary to track the path of a user using a product or using a certain function once, and use _ ID + timestamp is used as the tracking ID, where it is necessary to pay attention to the selection of explicit timestamp, for example, to track the whole product path, where the timestamp is the time of opening App; however, if the search behavior path is tracked, the timestamp of clicking the search box is required as the tracking ID.
In one embodiment, the click event may be customized, and if the customized control overwrites the onTouchent method of View to determine and process the click event, then its PerformClick must be called and the corresponding onClickListener set.
In one embodiment, a page alias may be set; for android applications, pages refer to Activity or Fragment. . Sometimes, for a page completing a certain function, further subdivision may be needed in statistics. For example, for a page showing a commodity list, the visit amount of two lists of clothing commodities and food commodities needs to be distinguished. To handle this scenario, we provide an alias method to distinguish the pages in these two cases, as follows: setpagename (Activity, String name), if the object set by you is Fragment, replace the Activity above with Fragment.
In one embodiment, the merchandise listing page of an application is implemented with FeedActivity, so the default page names are all FeedActivity. Now we want to distinguish the list of the clothes goods and the list of the food goods, and to see their browsing amount separately, the following codes can be added in the onCreate method: the assignment operation of the property must be completed in the onCreate method of the Activity. The page alias suggestion is set to a combination of letters, numbers and underlines. To view data conveniently, please take different names for the pages with the same functions of iOS and android as much as possible.
In one embodiment, custom data uploading may be defined, and besides the user behavior data (without buried point data), the growth io also provides various API interfaces for you to upload some custom data indexes and dimensions.
In one embodiment, an application can be created, after a code is added, a Clean project is firstly performed, then compiling is performed, and after an SDK is installed on your Android App, the App is restarted for several times, so that behavior collection data are automatically sent to a growth IO, and detection can be completed smoothly. And continuously finishing the data detection of the application creation on the application creation page of the growth IO platform, wherein the application creation is successful after the detection is successful.
In one embodiment, whether the SDK normally collects data may be verified, and the growth io provides a plurality of ways for verifying whether the SDK normally collects data: the first method is as follows: mobile Debugger; the second method comprises the following steps: after a Debug mode is set in the SDK, a data acquisition log is checked in an IDE compiler console; the third method comprises the following steps: and (6) data checking.
Fig. 2 shows a dynamic dotting method according to another embodiment of the present invention, specifically, the method includes:
s201, obtaining description information of the focus method.
In one embodiment, description information of the setting focus class file may be acquired, and other information including a name of the setting method, a parameter of the setting method, dotting data, and the like may be acquired.
And S202, checking necessary parameter information.
S203, the class to be enhanced and the description of the method to be enhanced are obtained through the class loader.
In one embodiment, the description information of the method for setting the focus class may be checked, and the setting method and the setting class file may be obtained according to the method parameter, the name of the setting method, and the name of the setting class file. Judging whether the method parameters meet grammar rules; judging whether the name of the setting method is matched with the name of the setting type file or not; and if the method parameters meet the grammar rules and the names of the setting methods are matched with the names of the setting files, loading the setting files and the setting methods according to the method parameters, the names of the setting methods and the names of the setting files.
And S204, judging whether the dotting method is a static method or not.
In one embodiment, if the set method is a static method. Judging whether the setting method is a static method or not; if the setting method is a static method, statically intercepting the code segment of the setting method, and preprocessing the intercepted code segment; if the setting method is a non-static method, the example intercepts the code segment of the setting method and preprocesses the intercepted code segment.
S205, preprocessing an instance interception code segment.
And S206, filling the interception method parameters.
In one embodiment, an interface is called at a front position or a rear position of the static method, and the dotting data is reported to fill the dotting data at the front position or the rear position of the setting method, and the setting file is redefined to obtain the enhanced setting file.
And S207, redefining the classes.
In one embodiment, the enhanced setting focus class file is sent to the setting agent end, so that the setting agent end replaces the setting class file with the enhanced setting class file through a byte code enhancement technology, and dynamic dotting of the program is achieved.
Fig. 3 shows a dynamic dotting example according to another embodiment of the present invention, specifically, the example includes: name, name suffix, monitoring class name, monitoring method, method parameter.
In one embodiment, the monitoring can be performed by a span mode, the span of the name of the setting method is a basic work unit, one span is created by one link call (no specific limitation can be RPC, DB and the like), the span is identified by a 64-bit ID, the uuid is convenient, and other data such as description information, a timestamp, (interpretation) tag information of a key-value pair, parent _ ID and the like are also arranged in the span, wherein the parent _ ID can represent the link source of the span call.
Figure BDA0002614092540000121
In one embodiment, according to all class files of the service where the set proxy is located, in the prefix tree of the class files, the prefix tree of the method and the prefix tree of the method parameters, a Span set of a tree structure is constructed to represent a complete tracking, from the request to the server, the server returns response to finish, and when the tracking is carried out for each rpc call, a unique identification trace _ id exists. Such as: the running distributed big data storage Trace consists of one request.
In one embodiment, in the process of obtaining the name of a set class file, the name of a set method and method parameters, a prefix tree of the class file, the prefix tree of the method and the prefix tree of the method parameters are displayed, wherein a note of each color is labeled with a Span, one link passes through a traceId unique identifier, and the Span identifies request information initiated; tree nodes are basic units of the whole architecture, and each node is a reference to a span; the direct relationship between a span represented by a connecting line between nodes and its parent span; although the span is simply representative of the start and end times of the span in the log file, they are relatively independent throughout the tree structure.
Fig. 4 shows a block diagram of a dynamic dotting apparatus according to another embodiment of the present invention, specifically, the dynamic dotting apparatus 400 includes: an obtaining module 401, configured to obtain description information of a setting type file, where the description information of the setting type file includes a name of a setting method, a parameter of the setting method, and dotting data; a verification module 402, connected to the obtaining module, for verifying the description information of the setting method, and obtaining the setting method and the setting file according to the method parameter, the name of the setting method, and the name of the setting file; an interception setting module 403 connected to the verification module for intercepting and preprocessing the setting method to set the setting method to a state capable of being doted; a filling module 404, connected to the interception setting module, for calling an interface at a front position or a rear position of the setting method and reporting dotting data, so as to fill the dotting data at the front position or the rear position of the setting method, redefine the setting class file, and obtain an enhanced setting class file; and a dotting processing module 405, connected to the filling module, for sending the enhanced setting class file to the setting agent, so that the setting agent replaces the setting class file with the enhanced setting class file by using a byte code enhancement technique, thereby implementing dynamic dotting of the program.
In one embodiment, the verification module is to: judging whether the parameters of the method meet the grammar rules or not, and judging whether the name of the setting method is matched with the name of the setting file or not; and if the method parameters meet the grammar rules and the names of the setting methods are matched with the names of the setting files, loading the setting files and the setting methods according to the method parameters, the names of the setting methods and the names of the setting files.
In one embodiment, the intercept settings module is to: judging whether the setting method is a static method or not; if the setting method is a static method, statically intercepting the code segment of the setting method, and preprocessing the intercepted code segment; if the setting method is a non-static method, the example intercepts the code segment of the setting method and preprocesses the intercepted code segment.
In one embodiment, the setting class file includes a focus event class, the focus event is triggered when a page element gets or loses focus, and the acquisition module is used for utilizing the time and matching with a document. Wherein the focus event comprises an bubbling event and a non-bubbling event.
In one embodiment, the acquisition module is configured to acquire a focused focus of an eyeball of the user as the focus event class based on an acquired mobile phone state of a motion sensor of the terminal or an acquired camera of the terminal.
In one embodiment, the dotting processing module is further configured to: acquiring all class files of the service of the set agent terminal; constructing a prefix tree of class files, a prefix tree of a method and a prefix tree of method parameters according to all class files of the service of the set proxy end; in the process of acquiring the name of the set class file, the name of the set method and the method parameter, the prefix tree of the class file, the prefix tree of the method and the prefix tree of the method parameter are displayed.
In one embodiment, the dotting fields are independent of each other, and can accurately locate a certain event or behavior; a certain behavior event can be accurately positioned through 1-2 parameters; the dotting field is required to accord with an enumeration principle, all dotting related to data which is possibly required is enumerated one by one, and the condition of missing dotting is ensured not to occur according to page exhaustion or flow exhaustion; the dotting fields are to be described precisely, and the non-disputed description of each dotting event is made, including but not limited to: collection logic, data structure, special case handling.
Fig. 5 shows a block diagram of a computer apparatus of another embodiment of the present invention. The device 500 may be a host server with computing capabilities, a personal computer PC, or a portable computer, mobile or other terminal, etc. The specific embodiments of the present invention do not limit the specific implementation of the compute node.
The device 500 includes a processor (processor)501, a communication Interface (Communications Interface)502, a memory (memory)503, and a bus 504. The processor 501, the communication interface 502, and the memory 503 are configured to communicate with each other via a bus 504.
The communication interface 502 is used to communicate with network devices, including, for example, virtual machine management centers, shared storage, and the like.
The processor 501 is used to execute programs. The processor 501 may be a central processing unit CPU or may be an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention.
The memory 503 is used for storing files. The memory 503 may comprise a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 503 may also be a memory array. The memory 503 may also be partitioned, and the blocks may be combined into virtual volumes according to certain rules.
In one embodiment, the program may be a program code including computer operation instructions. The procedure is particularly useful for: acquiring description information of a setting type file, wherein the description information of the setting type file comprises a name of a setting method, parameters of the setting method and dotting data; checking the description information of the setting method, and acquiring the setting method and the setting file according to the method parameter, the name of the setting method and the name of the setting file; intercepting and preprocessing a setting method to set the setting method to a state that can be dotted; calling an interface at the preposition or postposition of the setting method, reporting dotting data to fill the dotting data at the preposition or postposition of the setting method, redefining the setting file to obtain an enhanced setting file; and sending the enhanced setting class file to a setting agent end so that the setting agent end replaces the setting class file with the enhanced setting class file through a byte code enhancement technology to realize dynamic dotting of the program.
In one embodiment, the program may be a program code including computer operation instructions. The procedure is particularly useful for: the step of verifying the description information of the setting method comprises the following steps: judging whether the parameters of the method meet the grammar rules or not, and judging whether the name of the setting method is matched with the name of the setting file or not; and if the method parameters meet the grammar rules and the names of the setting methods are matched with the names of the setting files, loading the setting files and the setting methods according to the method parameters, the names of the setting methods and the names of the setting files.
In one embodiment, the program may be a program code including computer operation instructions. The procedure is particularly useful for: judging whether the setting method is a static method or not; if the setting method is a static method, statically intercepting the code segment of the setting method, and preprocessing the intercepted code segment; if the setting method is a non-static method, the example intercepts the code segment of the setting method and preprocesses the intercepted code segment.
In one embodiment, the program may be a program code including computer operation instructions. The procedure is particularly useful for: acquiring all class files of the service of the set agent terminal; constructing a prefix tree of class files, a prefix tree of a method and a prefix tree of method parameters according to all class files of the service of the set proxy end; in the process of acquiring the name of the set class file, the name of the set method and the method parameter, the prefix tree of the class file, the prefix tree of the method and the prefix tree of the method parameter are displayed.
In one embodiment, the program may be a program code including computer operation instructions. The procedure is particularly useful for: the acquiring the name of the setting type file, the name of the setting method, the method parameter and the dotting data comprises the following steps: setting a class file to comprise a focus event class, wherein the focus event can be triggered when a page element obtains or loses focus, and the time is utilized to be matched with a document. Wherein the focus event comprises an bubbling event and a non-bubbling event.
In one embodiment, the program may be a program code including computer operation instructions. The procedure is particularly useful for: and taking the focused focus of the eyeball of the user acquired based on the acquired mobile phone state of the motion sensor of the terminal or the acquired camera of the terminal as a focus event class.
In one embodiment, the program may be a program code including computer operation instructions. The procedure is particularly useful for: the dotting fields are mutually independent, and a certain event or behavior can be accurately positioned; a certain behavior event can be accurately positioned through 1-2 parameters; the dotting field is required to accord with an enumeration principle, all dotting related to data which is possibly required is enumerated one by one, and the condition of missing dotting is ensured not to occur according to page exhaustion or flow exhaustion; the dotting fields are to be described precisely, and the non-disputed description of each dotting event is made, including but not limited to: collection logic, data structure, special case handling.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The method and system of the present invention may be implemented in a number of ways. For example, the methods and systems of the present invention may be implemented in software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustrative purposes only, and the steps of the method of the present invention are not limited to the order specifically described above unless specifically indicated otherwise. Furthermore, in some embodiments, the present invention may also be embodied as a program recorded in a recording medium, the program including machine-readable instructions for implementing a method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to practitioners skilled in this art. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.

Claims (10)

1. A dynamic dotting method is characterized by comprising the following steps:
acquiring description information of a setting type file, wherein the description information of the setting type file comprises a name of a setting method, parameters of the setting method and dotting data;
checking the description information of the setting method, and acquiring the setting method and the setting file according to the method parameter, the name of the setting method and the name of the setting file;
intercepting and preprocessing the setting method to set the setting method to a state that can be dotted;
calling an interface at the preposition or postposition of the setting method, reporting the dotting data to fill the dotting data at the preposition or postposition of the setting method, redefining the setting file to obtain an enhanced setting file;
and sending the enhanced setting class file to a setting agent end so that the setting agent end replaces the setting class file with the enhanced setting class file through a byte code enhancement technology to realize dynamic dotting of a program.
2. The method of claim 1, wherein the checking the description information of the setting class method comprises:
judging whether the method parameters meet grammar rules;
judging whether the name of the setting method is matched with the name of the setting type file or not;
and if the method parameters meet the grammar rules and the names of the setting methods are matched with the names of the setting files, loading the setting files and the setting methods according to the method parameters, the names of the setting methods and the names of the setting files.
3. The method according to claim 1 or 2, wherein intercepting and pre-processing the setting method to set the setting method to a state that can be dotted comprises:
judging whether the setting method is a static method or not;
if the setting method is a static method, statically intercepting the code segments of the setting method, and preprocessing the intercepted code segments;
if the setting method is a non-static method, the example intercepts the code segment of the setting method and preprocesses the intercepted code segment.
4. The method of claim 3, further comprising:
acquiring all class files of the service of the set agent terminal;
constructing a prefix tree of class files, a prefix tree of a method and a prefix tree of method parameters according to all class files of the service of the set proxy terminal;
and in the process of acquiring the name of the set class file, the name of the set method and the method parameter, displaying the prefix tree of the class file, the prefix tree of the method and the prefix tree of the method parameter.
5. The method of claim 1,
the acquiring the name of the setting type file, the name of the setting method, the method parameter and the dotting data comprises the following steps:
the setting type file comprises a focus event type, the focus event can be triggered when a page element obtains or loses focus, and the time is utilized to be matched with a document. Wherein the focus event comprises an bubbling event and a non-bubbling event;
and/or
And taking the focused focus of the eyeball of the user acquired based on the acquired mobile phone state of the motion sensor of the terminal or the acquired camera of the terminal as a focus event class.
6. The method of claim 1, comprising:
the dotting fields are mutually independent and can accurately position a certain event or behavior; a certain behavior event can be accurately positioned through 1-2 parameters;
the dotting field is required to accord with an enumeration principle, all dotting related to data which is possibly required is enumerated one by one, and the condition of missing dotting is ensured not to occur according to page exhaustion or flow exhaustion;
the dotting fields are to be described precisely, and the non-disputed description of each dotting event is made, including but not limited to: collection logic, data structure, special case handling.
7. A dynamic dotting apparatus, said apparatus comprising:
the acquisition module is used for acquiring the description information of the setting type file, wherein the description information of the setting type file comprises the name of the setting method, the parameter of the setting method and dotting data;
the verification module is connected with the acquisition module and is used for verifying the description information of the setting method and acquiring the setting method and the setting file according to the method parameter, the name of the setting method and the name of the setting file;
the interception setting module is connected with the verification module and is used for intercepting and preprocessing the setting method so as to set the setting method to be in a dotable state;
the filling module is connected with the interception setting module and used for calling an interface at the front position or the rear position of the setting method and reporting the dotting data so as to fill the dotting data at the front position or the rear position of the setting method and redefine the setting file to obtain an enhanced setting file;
and the dotting processing module is connected with the filling module and used for sending the enhanced setting class file to a setting agent end so that the setting agent end replaces the setting class file with the enhanced setting class file through a byte code enhancement technology to realize dynamic dotting of a program.
8. The apparatus of claim 7,
the check module is used for:
judging whether the method parameters meet grammar rules or not, and judging whether the names of the setting methods are matched with the names of the setting files or not;
if the method parameter meets a grammar rule and the name of the setting method is matched with the name of the setting file, loading the setting file and the setting method according to the method parameter, the name of the setting method and the name of the setting file;
and/or
The interception setting module is used for:
judging whether the setting method is a static method or not;
if the setting method is a static method, statically intercepting the code segments of the setting method, and preprocessing the intercepted code segments;
if the setting method is a non-static method, intercepting the code segments of the setting method by an example, and preprocessing the intercepted code segments;
and/or
The setting type file comprises a focus event type, the focus event can be triggered when a page element obtains or loses focus, and the acquisition module is used for utilizing the time and matching with a document. Wherein the focus event comprises an bubbling event and a non-bubbling event;
and/or
The acquisition module is used for acquiring a mobile phone state based on a motion sensor of the terminal or acquiring a focus focused by eyeballs of the user by a camera of the terminal as a focus event class.
9. The apparatus of claim 7,
the dotting processing module is also used for: acquiring all class files of the service of the set agent terminal;
constructing a prefix tree of class files, a prefix tree of a method and a prefix tree of method parameters according to all class files of the service of the set proxy terminal;
in the process of acquiring the name of the set class file, the name of the set method and the method parameter, displaying the prefix tree of the class file, the prefix tree of the method and the prefix tree of the method parameter;
and/or
The dotting fields are mutually independent, and a certain event or behavior can be accurately positioned; a certain behavior event can be accurately positioned through 1-2 parameters;
the dotting field is required to accord with an enumeration principle, all dotting related to data which is possibly required is enumerated one by one, and the condition of missing dotting is ensured not to occur according to page exhaustion or flow exhaustion;
the dotting fields are to be described precisely, and the non-disputed description of each dotting event is made, including but not limited to: collection logic, data structure, special case handling.
10. Computer arrangement, characterized by a processor, a memory, a bus, a communication interface, a computer program, a dynamic dotting device as in claims 7-9, a computer program running on the dynamic dotting device, which computer program, when being executed by the processor, realizes the steps of the method of any one of claims 1 to 6.
CN202010764328.6A 2020-08-02 2020-08-02 Dynamic dotting method and device Pending CN114064425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010764328.6A CN114064425A (en) 2020-08-02 2020-08-02 Dynamic dotting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010764328.6A CN114064425A (en) 2020-08-02 2020-08-02 Dynamic dotting method and device

Publications (1)

Publication Number Publication Date
CN114064425A true CN114064425A (en) 2022-02-18

Family

ID=80231339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010764328.6A Pending CN114064425A (en) 2020-08-02 2020-08-02 Dynamic dotting method and device

Country Status (1)

Country Link
CN (1) CN114064425A (en)

Similar Documents

Publication Publication Date Title
US7702959B2 (en) Error management system and method of using the same
US10496517B2 (en) System and method for providing runtime diagnostics of executing applications
US9411616B2 (en) Classloader/instrumentation approach for invoking non-bound libraries
US11093222B2 (en) Generating interfaces from annotated entity definitions for developing applications
US10977011B2 (en) Structured development for web application frameworks
US20230418723A1 (en) Smart distributed tracing context injection
US11709759B2 (en) Contextual drill back to source code and other resources from log data
US11580228B2 (en) Coverage of web application analysis
US10394531B2 (en) Hyper dynamic Java management extension
US9811322B1 (en) Scalable provenance generation from points-to information
EP4085336B1 (en) Computer resource leak detection
CN112817817A (en) Buried point information query method and device, computer equipment and storage medium
CN111831320A (en) Plug-in management method and device, electronic equipment and storage medium
US20160226722A1 (en) Impact Analysis of Service Modifications in a Service Oriented Architecture
CN114064425A (en) Dynamic dotting method and device
KR102202923B1 (en) Module specific tracing in a shared module environment
KR102651294B1 (en) Method for assisting collect information about screen component
CN110347577B (en) Page testing method, device and equipment thereof
US10691521B2 (en) Using telemetry to drive high impact accessibility issues
US10846202B2 (en) Multi-language heap analyzer
Das Investigating performance issues in mobile apps
US9256751B2 (en) Public exposed objects
Balbaert Dart Cookbook
Li The System Design of Mobile Application Crawler and The Implement of Some Key Technologies
WO2019036101A1 (en) Correlation of function calls to functions in asynchronously executed threads

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination