CN115688098A - Link display method, device and equipment based on code analysis - Google Patents

Link display method, device and equipment based on code analysis Download PDF

Info

Publication number
CN115688098A
CN115688098A CN202211226013.1A CN202211226013A CN115688098A CN 115688098 A CN115688098 A CN 115688098A CN 202211226013 A CN202211226013 A CN 202211226013A CN 115688098 A CN115688098 A CN 115688098A
Authority
CN
China
Prior art keywords
code
codes
node
server
instrumentation
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
CN202211226013.1A
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.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202211226013.1A priority Critical patent/CN115688098A/en
Publication of CN115688098A publication Critical patent/CN115688098A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the specification discloses a link display method, a link display device and link display equipment based on code analysis. By receiving a service request; determining a new code corresponding to the service request, wherein the new code is generated based on code instrumentation on nodes in static codes; executing the new code, and acquiring node information generated in the execution, wherein the node information comprises a node identifier and characteristic information generated by executing the instrumentation code; and uploading the node information to a server so that the server can display the node information in a link form, thereby realizing link delineation of the business method level granularity.

Description

Link display method, device and equipment based on code analysis
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a link display method, device and apparatus based on code analysis.
Background
As more and more applications are accessed by the platform, the need for further understanding of the link status when the applications are executed also increases. The premise of constructing a service link to accurately position the performance bottleneck is that the nodes involved in the service processing process can be accurately positioned under the condition of not influencing the original service logic.
Based on this, a more accurate link exhibition scheme based on code analysis is required.
Disclosure of Invention
The embodiment of the specification provides a link display method, a link display device, link display equipment and a storage medium based on code analysis, and aims to solve the following technical problems: there is a need for a more accurate link exposure scheme based on code analysis.
To solve the above technical problem, one or more embodiments of the present specification are implemented as follows: in a first aspect, an embodiment of the present specification provides a link showing method based on code analysis, including: receiving a service request; determining a new code corresponding to the service request, wherein the new code is generated based on code instrumentation on nodes in static codes; executing the new code, and acquiring node information generated in the execution, wherein the node information comprises a node identifier and characteristic information generated by executing the instrumentation code; and uploading the node information to a server so that the server can display the node information in a link form.
In a second aspect, an embodiment of the present specification provides a link exhibition apparatus based on code analysis, including: the receiving module receives a service request; the determining module is used for determining a new code corresponding to the service request, wherein the new code is generated based on code instrumentation on nodes in static codes; the execution module executes the new code and acquires node information generated in the execution, wherein the node information comprises a node identifier and characteristic information generated by executing the instrumentation code; and the uploading module uploads the node information to the server so that the server can display the node information in a link form.
In a third aspect, embodiments of the present specification provide an electronic device, including:
at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
In a fourth aspect, embodiments of the present specification provide a non-transitory computer storage medium having stored thereon computer-executable instructions that, when read by a computer, cause one or more processors to perform a method according to the first aspect.
At least one technical scheme adopted by one or more embodiments of the specification can achieve the following beneficial effects: by receiving a service request; determining a new code corresponding to the service request, wherein the new code is generated based on code instrumentation on nodes in static codes; executing the new code, and acquiring node information generated in the execution, wherein the node information comprises a node identifier and characteristic information generated by executing the instrumentation code; and uploading the node information to a server so that the server can display the node information in a link form. Therefore, intelligent recognition of static codes in advance is achieved, nodes are outlined, and new codes are generated in a pre-instrumentation mode, so that node information is accurately recognized when the new codes are executed when the functions of the original static codes are not influenced, and link delineation of business method level granularity is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments described in the present specification, and for those skilled in the art, other drawings may be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a link displaying method based on code analysis according to an embodiment of the present disclosure;
FIG. 2a is a system framework diagram according to an embodiment of the present application;
FIG. 2b is a timing diagram of a system according to an embodiment of the present application;
fig. 3 is a schematic diagram of a fine-grained link map provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a link display device based on code analysis according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification.
Detailed Description
The embodiment of the specification provides a link display method, a link display device, link display equipment and a storage medium based on code analysis.
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
In a first aspect, as shown in fig. 1, fig. 1 is a schematic flowchart of a link showing method based on code analysis according to an embodiment of the present disclosure, where the flowchart in fig. 1 may include the following steps:
s101: a service request is received.
The user can initiate a service request from the client to the server. In other words, on the user side in the embodiment of the present application, the client has already been loaded.
The service request may be various forms of service requests. For example, it may be a request for a function provided by the client application itself, e.g., a request provided by a payment application such as a code scan, payment, etc.; or may be based on an applet request initiated by the client, e.g., a user initiating a request for a merchant to order, use of a shared device, etc., based on an applet in the client.
S103, determining a new code corresponding to the service request, wherein the new code is generated based on code instrumentation on nodes in static codes.
Static code refers to the original code that needs to be executed without modification when executing a service request. And the new code is another code generated by code instrumentation on nodes in the static code in the client.
In the embodiment of the present application, code instrumentation refers to inserting other code (or may also be referred to as instrumentation code) into static code on the basis of ensuring the logic and functional integrity of the original static code, collecting information (such as method itself, method parameter value, return value, etc.) generated when the static code is executed through other code, and collecting dynamic context information when the static code runs by inserting other code at a specific position.
The node refers to an executable method in a service class contained in the code, and the node information includes a method name, a method of determining whether to instantiate, time consumption, request parameters, return values and the like. The nodes contained between the static code and the new code are the same. Each node included in the static code may be determined in a manner of analyzing or configuring the static code in advance.
For example, the original pseudo-code form of static code might be: { calling the xxx address through the xx port, and applying for the value of data x }. I.e. to apply for data calls to the remote device.
While the pseudo-code form of the new code generated after code instrumentation may be:
{
recording the current system time t1;
calling the xxx address through the xx port to apply for the value of the data x;
the current system time t2 is recorded.
}
The "record current system time t1" and "record current system time t2" are other inserted codes. Obviously, the inserted other codes do not affect the execution of the original code "call to xxx address through xx port, apply for the value of data x".
But through other inserted codes, the specific time consumption t2-t1 for executing the step of calling the xxx address through the xx port and applying for the value of the data x can be obtained statistically.
For another example, the static code may include a series of executable functions F1 to Fm, where the executable functions F1 to Fm all include common parameters y1, y2, … … yn, and these parameters are transferred among a plurality of functions, and the static code may not visually display values of the parameters in the execution process, and in order to monitor the variation situation of the parameters among a plurality of methods, other codes may be added at specified positions (which may be before, during, or after the execution of the functions) in the executable functions F1 to Fm:
{ print y1, y2, … … yn }.
Therefore, the values of the parameters y1, y2 and … … yn can be output at any stage in the execution of the executable functions.
For another example, after determining the node corresponding to an end code, another code for outputting the node identifier may be inserted before the code. The pseudo code may be in the form of { print, node 10}, so that nodes can be conveniently found in the subsequent process of executing new code.
In addition, it should be noted that, although the new code is generated based on code instrumentation performed on nodes in the static code, the new code is actually pre-generated at one time in the startup phase, and the generation time is earlier than that when the client receives a service request, so that the logic of executing the new code can be executed only after the request comes in.
As shown in fig. 2a, fig. 2a is a schematic diagram of a system framework provided in the embodiment of the present application. In the schematic diagram, the client may establish a connection with the server in advance, and obtain a corresponding code packet containing a static code from the server. Therefore, at the stage of starting the client, node analysis and code instrumentation are carried out on the code packet, so that a new code is generated and stored in the equipment where the client is located.
When the client receives the service request, the static code corresponding to the service request is not executed any more, but a new code is executed.
And S105, executing the new code, and acquiring node information generated in the execution, wherein the node information comprises a node identifier and characteristic information generated by executing the instrumentation code.
As previously described, the nodes contained in the new code and the static code are the same. Before instrumentation, the client can analyze the codes in the static codes to obtain all nodes contained in the static codes and perform marking and code instrumentation.
Therefore, when the new code is executed, the node information containing the node mark and the characteristic information can be directly determined through other inserted codes.
The feature information is generated by executing other code (or referred to as instrumentation code) in the new code. For example, for
{
Recording the current system time t1;
calling the xxx address through the xx port to apply for the value of data x;
the current system time t2 is recorded.
When executed, the characteristic information that may be generated by the processor may be "t1" or "t2". The resulting node information may be in the form (node a, t1, t 2) as follows.
For { print y1, y2, … … yn }, the generated characteristic information may be values of y1, y2 to yn. In other words, the feature information generated by executing the instrumentation code may include information such as the method itself, the method parameter value, the return value, and the like, so that the node information generated on the node F1 corresponding to the executable function F1 may be in the form of (node F1, y1 value, y2 value, … … yn value).
And S107, uploading the node information to a server so that the server can display the node information in a link form.
As shown in fig. 2, after receiving the node information, the server may perform corresponding data analysis, for example, analyzing the node information (node a, t1, t 2) may obtain that the time consumed by the server when executing on the node a is t2-t1.
For another example, if a series of executable functions F1 to Fm are regarded as nodes F1 to Fm, and a series of node information in the form of (node F1, y1 value, y2 value, … … yn value) generated by the executable functions F1 to Fm is analyzed, the variation of the aforementioned parameters y1, y2, … … yn between the functions F1 to Fm can be obtained.
Furthermore, the corresponding service link graph can be given through the precedence relationship based on time or the precedence relationship based on the execution sequence of the nodes, and is displayed on the designated page. The service provider of the business method can view the corresponding link map in real time only by accessing the page on the self equipment. It should be noted that the uploading of the node information may be synchronous uploading or asynchronous uploading.
In the embodiment of the present application, as described above, the partitioning of the nodes is actually performed based on the granularity of the classes and methods included in the codes, and therefore, the obtained link map is also displayed based on the granularity of the classes and methods included in the codes. As shown in fig. 3, fig. 3 is a schematic diagram of a fine-grained link diagram according to an embodiment of the present application. In this intention, the time consumption on each method node may be given, and the return values of some specified parameters on some nodes may also be given, and so on.
For the overall process timing sequence of the present application, refer to fig. 2b, and fig. 2b is a timing sequence diagram of a system provided in the embodiment of the present application. As shown in the schematic diagram, a service provider configures related information to a server in advance, and a client can pull a related code according to the configured information and perform corresponding analysis and code instrumentation when starting, so that when a user (a request initiator) uses the client, node information of method-level granularity can be obtained through instrumentation codes, and the service provider can visually check the situation of a service link containing each node information in a service at any time.
In the solution in the embodiment of the present specification, a service request is received; determining a new code corresponding to the service request, wherein the new code is generated based on code instrumentation on nodes in static codes; executing the new code, and acquiring node information generated in the execution, wherein the node information comprises a node identifier and characteristic information generated by executing the instrumentation code; and uploading the node information to a server so that the server can display the node information in a link form. Therefore, intelligent recognition of static codes in advance is achieved, nodes are outlined, and new codes are generated in a pre-instrumentation mode, so that node information is accurately recognized when the new codes are executed when the functions of the original static codes are not influenced, and link delineation of business method level granularity is achieved.
In an embodiment, the new code is generated based on code instrumentation on nodes in a static code, and may be generated in advance in a preloading phase (premain phase) at the time of starting a client in such a manner that, as shown in fig. 2, a code packet corresponding to the static code is acquired; unpacking the code package to generate a plurality of class codes and method codes; performing semantic analysis on the class codes and the method codes to determine node codes; and performing code instrumentation on the node codes to generate new codes.
When the client acquires the code packet corresponding to the static code, the client can establish a link in advance with the server and receive configuration information which is pushed by the server and contains a static code path. The static code path may be a real file path on a physical machine, so that the client may directly obtain the project code package according to the specified file path. For example: the static code path is as follows: /home/admin/src/helloWorld/XXXApp. So that the client can acquire codes from the specified address; the static code path may also be a link to the git repository so that the client can pull the code package corresponding to the static code from the git repository.
The configuration information may be that the service provider has been configured before the user initiates the service request. In other words, if the file path or git warehouse path of the corresponding code package of the application changes, the configuration can be modified again, and then the application is restarted to find the latest code package.
In addition, other relevant information may also be included in the configuration information. For example, the configuration information may specify a node to be detected in the code based on the requirement of the service provider, or the configuration information may include semantic information or logic information given by the service provider, so as to subsequently determine a class or a method matching the semantic information and the logic information in the code packet as the node.
In an embodiment, when performing semantic analysis on the class code and the method code, the invalid codes in the code packet may also be removed in advance, where the removing does not delete the invalid codes, but means that the invalid codes are not included in the range of the instrumentation. For example, the framework code is removed from the class code and method code; and performing semantic analysis on the class codes and the method codes of the removed frame codes to determine node codes.
The framework code is a group of mutually-cooperated class file sets which contain constants, methods and the like and are quoted in a project, and is often presented in a jar package form, namely a reusable tool package with partial general functionality and no business. However, the framework code only contains some underlying architectures used in development, and does not contain business logic, and in addition, the framework code may also contain some codes of excellent design modes, such as a singleton mode, a factory mode, and an AR (Active Record) mode.
In other words, framework code tends to be business independent code executed, which may be code that is necessary in the execution process but difficult for the business service provider to optimize. Therefore, it is meaningless for the service request initiator to monitor this part of the code, so that it can be removed in advance from the class code and method code contained in the static code.
Specifically, when the code packet corresponding to the static code is unpacked, it is possible to know which codes are framework codes and remove them from the names of the various types and methods. For example, common framework code may include tool class code such as apache, spring code, and various orm framework code, among others. In other words, fields included in the class code or method code may be analyzed, and when a section of the class code or method code includes a field used in the framework code, the section of the code may be regarded as the framework code and removed.
In addition, an additional blacklist mechanism can be provided, and some parts which are obviously not the service codes are removed to improve the performance. Implementation policies for the blacklist mechanism include, but are not limited to: analyzing the information in the class file, and removing the pure entity class without pile insertion; and the jar packets which are depended on by the business when the packets are recursively unpacked can be directly skipped to avoid unpacking analysis and instrumentation.
In one embodiment, when performing semantic analysis on the class code and the method code, the following steps may be performed: determining a plurality of fields contained in the class code and the method code; analyzing the corresponding relation between each field and the semantics; when the field has a corresponding relation with the designated semantics, determining the class code and the method code containing the field as the node code. A field may refer to an entry or return value in a method.
For example, a Jar packet parsing processor can be used to do recursive unpacking, and after unpacking, a class processing technique of bcel is used to obtain static information in each class and static information in the method. The static information in the class includes the fully qualified class name, all fields in the class, all methods, etc.; the static information in the method comprises the static information such as the name of the fully-defined method, whether the method is instantiated, the parameter of the method, the return value and the like.
The class code and the method code can be segmented based on the space characters or line breaks contained in the code, namely, characters between any two space characters or line breaks are regarded as one field, and therefore a plurality of fields contained in one segment of code are obtained. And performing semantic analysis on each field to determine the semantic and logic functions corresponding to each field. When the semantics of a field and the specified semantics have a corresponding relationship (i.e., the semantics are the same or similar), the class code or method code containing the field may be determined as the node code.
The specified semantics can be preset by the service provider and written into the configuration information, so that the client can pull the configuration information from the server and obtain the specified semantics contained in the configuration information. Through semantic analysis and logic analysis with fields contained in the codes, automatic code analysis can be realized to obtain each node contained in the codes, manual operation of a service requester is avoided, and user experience is improved.
In one embodiment, when code instrumentation is performed on the node code to generate a new code, instrumentation codes for recording the current system time may be inserted before and after the node code to generate the new code.
That is, as shown in the foregoing, by inserting the code "record the current system time t1" before the node code, and inserting the code "record the current system time t2" after the node code, the time consumption generated when each node executes can be conveniently counted, so that which node codes need to be optimized can be intuitively reflected.
In an embodiment, when the client obtains the configuration information from the server, the client may establish a heartbeat connection with the server in advance. The client end sends a detection packet to the server at regular intervals and starts an overtime timer, the server end receives the detection packet and responds a response packet, if the client end receives the response packet of the server, the server is normal, the overtime timer is deleted, if the overtime timer of the client end is overtime, the server end still does not receive the response packet, and at the moment, a relevant prompt can be sent to the service request initiator to remind the service request initiator that the server end is abnormal.
In the embodiment of the application, on one hand, configuration information needs to be downloaded from the server to perform instrumentation on the static code, and since the configuration information actually reflects the actual requirements of the service request initiator, the configuration information pushed by the server is periodically received through heartbeat connection with the server, and on the other hand, the latest requirement configuration given by the service request initiator can be acquired; on the other hand, because the node information generated in the process of executing the new code needs to be uploaded and analyzed and displayed at the server, the client establishes heartbeat connection with the server and can be used for reminding the service request initiator in real time when the server is abnormal, and the data displayed at the server may not be accurate data.
In an embodiment, when the client uploads the node information to the server, as shown in fig. 2, the obtained multiple node information may be put into a context cache, and a queue is generated. Therefore, when the queue is full, the cached information of the plurality of nodes is uploaded to the server side in the form of the queue; or periodically uploading the node information in the queue to the server in a queue form. By uploading data in the mode, the communication load of the client can be reduced.
Based on the same idea, one or more embodiments of the present specification further provide apparatuses and devices corresponding to the above-described method, as shown in fig. 4 and 5.
In a second aspect, as shown in fig. 4, fig. 4 is a schematic structural diagram of a link demonstration apparatus based on code analysis provided in an embodiment of the present specification, where the apparatus includes:
a receiving module 401, which receives a service request;
a determining module 403, configured to determine a new code corresponding to the service request, where the new code is generated based on code instrumentation performed on nodes in a static code;
an execution module 405, configured to execute the new code and obtain node information generated in the execution, where the node information includes a node identifier and feature information generated by executing the instrumentation code;
the uploading module 407 uploads the node information to the server, so that the server displays the node information in a link form.
Optionally, the apparatus further includes a new code generation module 409, configured to obtain a code packet corresponding to the static code; unpacking the code package to generate a plurality of class codes and method codes; performing semantic analysis on the class codes and the method codes to determine node codes; and performing code instrumentation on the node codes to generate new codes.
Optionally, the new code generation module 409 removes framework codes from the class codes and method codes; and performing semantic analysis on the class codes and the method codes of the removed frame codes to determine node codes.
Optionally, the new code generation module 409 determines a plurality of fields included in the class code and the method code; analyzing the corresponding relation between each field and the semantics; when the field has a corresponding relation with the specified semantics, determining the class code or the method code containing the field as the node code.
Optionally, the new code generation module 409 inserts instrumentation codes for recording the current system time before and after the node code, respectively, to generate a new code.
Optionally, the new code generating module 409 receives configuration information pushed by a server, where the configuration information includes a static code path; and acquiring the code packet corresponding to the static code from the static code path.
Optionally, the new code generating module 409 establishes a heartbeat connection with the server; and receiving the configuration information pushed by the server periodically.
Optionally, the uploading module 407 caches the generated pieces of node information; and uploading the cached information of the plurality of nodes to a server in a queue form.
In a third aspect, as shown in fig. 5, fig. 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present specification, where the electronic device includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
In a fourth aspect, based on the same idea, the present specification further provides a non-volatile computer storage medium corresponding to the method described above, and storing computer-executable instructions, which, when read by a computer, cause one or more processors to execute the method according to the first aspect.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD) (e.g., a Field Programmable Gate Array (FPGA)) is an integrated circuit whose Logic functions are determined by a user programming the Device. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development, but the original code before compiling is also written in a specific Programming Language, which is called Hardware Description Language (HDL), and the HDL is not only one kind but many kinds, such as abll (Advanced boot Expression Language), AHDL (alternate hard Description Language), traffic, CUPL (computer universal Programming Language), HDCal (Java hard Description Language), lava, lola, HDL, PALASM, software, rhydl (Hardware Description Language), and vhul-Language (vhyg-Language), which is currently used in the field. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, respectively. Of course, the functionality of the various elements may be implemented in the same one or more pieces of software and/or hardware in the practice of this description.
As will be appreciated by one skilled in the art, the present specification embodiments may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The description has been presented with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the description. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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 flow or flows and/or block diagram block or blocks.
These computer program instructions may 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 instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may 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 flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is merely one or more embodiments of the present disclosure and is not intended to limit the present disclosure. Various modifications and alterations to one or more embodiments of the present description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A link showing method based on code analysis comprises the following steps:
receiving a service request;
determining a new code corresponding to the service request, wherein the new code is generated based on code instrumentation on nodes in static codes;
executing the new code, and acquiring node information generated in the execution, wherein the node information comprises a node identifier and characteristic information generated by executing the instrumentation code;
and uploading the node information to a server so that the server can display the node information in a link form.
2. The method of claim 1, wherein the new code is generated based on code instrumentation of nodes in static code, comprising:
acquiring a code packet corresponding to the static code;
unpacking the code package to generate a plurality of class codes and method codes;
performing semantic analysis on the class codes and the method codes to determine node codes;
and performing code instrumentation on the node codes to generate new codes.
3. The method of claim 2, wherein semantically analyzing the class code and method code to determine node code, comprises:
removing the frame code from the class code and the method code;
and performing semantic analysis on the class codes and the method codes of the removed frame codes to determine node codes.
4. The method of claim 2, wherein semantically analyzing the class code and method code to determine node code, comprises:
determining a plurality of fields contained in the class code and the method code;
analyzing the corresponding relation between each field and the semantics;
when the field has a corresponding relation with the specified semantics, determining the class code or the method code containing the field as the node code.
5. The method of claim 2, wherein code instrumentation of the node code generates new code comprising:
inserting instrumentation codes for recording the current system time before and after the node codes respectively to generate new codes.
6. The method of claim 2, wherein obtaining the code packet corresponding to the static code comprises:
receiving configuration information pushed by a server, wherein the configuration information comprises a static code path;
and acquiring the code packet corresponding to the static code from the static code path.
7. The method of claim 6, wherein receiving the configuration information pushed by the server comprises:
establishing heartbeat connection with the server side;
and receiving the configuration information pushed by the server periodically.
8. The method of claim 1, wherein uploading the node information to a server comprises:
caching the generated plurality of node information;
and uploading the cached information of the plurality of nodes to a server in a queue form.
9. A link exhibition apparatus based on code analysis, comprising:
the receiving module receives a service request;
the determining module is used for determining a new code corresponding to the service request, wherein the new code is generated based on code instrumentation on nodes in static codes;
the execution module executes the new code and acquires node information generated in the execution, wherein the node information comprises a node identifier and characteristic information generated by executing the instrumentation code;
and the uploading module uploads the node information to the server so that the server can display the node information in a link form.
10. An electronic device, comprising:
at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.
CN202211226013.1A 2022-10-09 2022-10-09 Link display method, device and equipment based on code analysis Pending CN115688098A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211226013.1A CN115688098A (en) 2022-10-09 2022-10-09 Link display method, device and equipment based on code analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211226013.1A CN115688098A (en) 2022-10-09 2022-10-09 Link display method, device and equipment based on code analysis

Publications (1)

Publication Number Publication Date
CN115688098A true CN115688098A (en) 2023-02-03

Family

ID=85065117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211226013.1A Pending CN115688098A (en) 2022-10-09 2022-10-09 Link display method, device and equipment based on code analysis

Country Status (1)

Country Link
CN (1) CN115688098A (en)

Similar Documents

Publication Publication Date Title
CN110795311B (en) Event playback method and device
CN110020912B (en) Page display method, device and equipment
US10735537B2 (en) Information pushing
CN107066519B (en) Task detection method and device
CN108243032B (en) Method, device and equipment for acquiring service level information
CN107479868B (en) Interface loading method, device and equipment
CN109684573B (en) Target picture display method and device, storage medium and electronic equipment
CN110496395B (en) Component operation method, system and equipment for illusion engine
CN110851204B (en) Application starting method and device and application packaging method and device
CN112559934A (en) Page popup display method and device
CN112631679A (en) Preloading method and device for micro-application
CN114547024A (en) SQL statement risk detection method, device, equipment and medium
CN110427237B (en) Method and device for cross-application access to target page and electronic equipment
CN113760658A (en) Monitoring method, device and equipment
CN106599045B (en) Request sending method and device
CN111191225B (en) Method, device, medium and electronic equipment for switching isolated objects
CN115809056B (en) Component multiplexing implementation method and device, terminal equipment and readable storage medium
CN107301097B (en) Method and device for storing calling java object and reference address information of java object
CN115688098A (en) Link display method, device and equipment based on code analysis
CN111880990A (en) Exception handling method and device
CN113556260A (en) Flow monitoring method and device, storage medium and electronic equipment
CN108769152B (en) Service refresh policy registration method, service refresh request method, device and equipment
CN108037914B (en) Method and device for developing android native system by combining js
CN114924857A (en) Redis-based distributed timing scheduling method and device and storage medium
CN113411219B (en) Front-end service publishing method, device and equipment

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