Information processing method, device, electronic device and storage medium
By determining connection points in the application software and weaving notifications into them, and generating call link files, the problem of difficulty in detecting application software running logic problems in the existing technology is solved, and effective detection and identification of the internal running logic of the application software are achieved.
Patent Information
- Application Number
- CN202010164488.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-10
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2040-03-10
AI Technical Summary
The existing technology is difficult to detect problems in the running logic of the code running inside the application software, and can only detect whether the function is used normally and smoothly.
By obtaining the target code of cut points and notifications, the connection points in the application are determined during the compilation process, weaving notifications to generate call link information, generating call link files, understanding the sequence relationship of code files, and then identifying running logic problems. .
It realizes the detection and identification of internal running logic problems of application software and improves the testing efficiency and accuracy.
Smart Images

Figure CN111459803B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an information processing method, device, electronic device and storage medium. Background Art
[0002] Generally speaking, fluency is what users are most concerned about when using application software. In order to improve the user experience, before the application software is launched, it needs to go through a testing phase to check whether the functions of the application software can be used normally and whether the application software is used smoothly.
[0003] However, generally speaking, when testing application software, testers can only partially detect whether the functions of the software can be used normally, whether the use of the application software is smooth, etc., but cannot detect problems in the operating logic of the code running inside the application software. Summary of the invention
[0004] The embodiments of the present invention provide an information processing method, device, electronic device and storage medium. By implementing the embodiments of the present invention, problems in the operation logic of the code running inside the application software can be detected.
[0005] A first aspect of the present invention provides an information processing method, comprising:
[0006] Obtaining target code including a pointcut and at least one notification;
[0007] Determining at least one first join point in a first application program that matches the cut point during compiling the target code;
[0008] Weaving the at least one notification into the at least one first connection point to obtain a second application, each of the at least one first connection point weaving at least one notification into the at least one notification;
[0009] Running the second application to obtain at least one call link information corresponding to each first connection point of the at least one first connection point;
[0010] Generate a call link file, the call link file including at least one call link information corresponding to each first connection point in the at least one first connection point, each call link information in the at least one call link information is obtained according to the sequential relationship of calling multiple first code files in the first application according to each notification in the at least one notification.
[0011] A second aspect of the present invention provides an information processing device, comprising:
[0012] An acquisition module, used for acquiring a target code including a cut point and at least one notification;
[0013] a determination module, configured to determine at least one first connection point in a first application program that matches the cut point during compilation of the target code;
[0014] a weaving module, configured to weave the at least one notification into the at least one first connection point to obtain a second application, each of the at least one first connection point weaving at least one notification into the at least one notification;
[0015] A running module, used for running the second application to obtain at least one call link information corresponding to each first connection point of the at least one first connection point;
[0016] A generation module is used to generate a call link file, wherein the call link file includes at least one call link information corresponding to each first connection point in the at least one first connection point, and each call link information in the at least one call link information is obtained according to the sequential relationship of calling multiple first code files in the first application according to each notification in the at least one notification.
[0017] A third aspect of the present invention provides an electronic device for information processing, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are generated to be executed by the processor to perform instructions for executing the steps in any one of an information processing method.
[0018] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the stored computer program is executed by the processor to implement any method described in any one of the information processing methods.
[0019] It can be seen that in the above technical solution, a target code including at least one notification and a cut-off point is obtained; at least one first connection point matching the cut-off point in the first application is determined during the compilation of the target code; the at least one notification is woven into the at least one first connection point to obtain a second application, and each of the at least one first connection point is woven into at least one notification of the at least one notification; the second application is run to obtain at least one call link information corresponding to each of the at least one first connection point; a call link file is generated, the call link file includes at least one call link information corresponding to each of the at least one first connection point, each of the at least one call link information is obtained according to the order relationship of each notification in the at least one notification calling multiple first code files in the first application, and the at least one call link information corresponding to each of the at least one first connection point is obtained by running the second application, so that the call link file can be generated, that is, the operation logic problems of the code running inside the application software can be known according to the order relationship of each notification calling multiple first code files in the first application. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] in:
[0022] Figure 1A A flowchart of an information processing method provided by an embodiment of the present invention;
[0023] Figure 1B A schematic diagram of weaving the notification into a connection point provided by an embodiment of the present invention;
[0024] Figure 2 A flowchart of another information processing method provided by an embodiment of the present invention;
[0025] Figure 3 A flowchart of another information processing method provided by an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of an information processing device provided by an embodiment of the present invention;
[0027] Figure 5The server structure diagram of the hardware operating environment involved in the embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] The following are detailed descriptions of each.
[0030] The terms "first" and "second" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0031] First, the execution subject of the embodiment of the present application may be, for example, a server or a local data processing device. The server may be, for example, a tablet computer, a laptop computer, a PDA, a MID, a desktop computer or other server devices. This is not limited in the present application. Figure 1A , Figure 1A A flowchart of an information processing method provided by an embodiment of the present invention includes:
[0032] 101. Obtain target code including a cut point and at least one notification;
[0033] Wherein, each notification in at least one notification includes one of the following: before notification (Before), after notification (After) or return notification (AfterRunning), further, before notification (Before) is executed before the section method is executed; after notification (After) is executed after the section method is executed; return notification (AfterRunning) is executed after the section method returns the result. Further, each notification in at least one notification does not include: exception notification (AfterThrowing) and around notification (Around). Wherein, exception notification (AfterThrowing) is executed after the section method throws an exception; around notification (Around) is executed around the section method.
[0034] The cut point includes at least one second connection point, each of the at least one second connection point is used to match each of the at least one first connection point, and the first application includes at least one first connection point. Further, each of the at least one first connection point is used to indicate a location in the first application where notifications are allowed to be woven.
[0035] Among them, the target code is the class in aspect-oriented programming (AOP). Furthermore, AOP is a technology that realizes the unified maintenance of program functions through pre-compilation and runtime dynamic proxy. AOP is a continuation of object-oriented programming (OOP), a hot spot in software development, an important content in the Spring framework, and a derivative paradigm of functional programming. AOP can be used to isolate various parts of the business logic, thereby reducing the coupling between the various parts of the business logic, improving the reusability of the program, and improving the efficiency of development. Furthermore, the class is the basis for object-oriented programming (OOP) to achieve information encapsulation. A class is a user-defined reference data type, also known as a class type. Each class contains a data description and a set of functions that operate data or transmit messages.
[0036] 102. Determine at least one first connection point in a first application program that matches the pointcut during the process of compiling the target code;
[0037] The first application is a program running in the Android system. The first application includes multiple first code files, and each of the multiple first code files includes one of the following: a bytecode file, a Java source file, a Groovy file, etc. The bytecode file is a .class file compiled by Java; the Java source file is a .java file, and the Groovy file is a .Groovy file. Furthermore, Java is an object-oriented programming language; Groovy is an agile dynamic language for the Java virtual machine. It is a mature object-oriented programming language that can be used for object-oriented programming and can also be used as a pure scripting language.
[0038] 103. Weaving the at least one notification into the at least one first connection point to obtain a second application, wherein each of the at least one first connection point weaves at least one notification into the at least one notification;
[0039] Optionally, in a possible implementation, weaving the at least one notification into the at least one first connection point to obtain the second application includes: performing a second preset operation for each connection point of the at least one first connection point to obtain the second application; the second preset operation includes the following steps: obtaining the position indicated by the first connection point currently being processed to obtain the first position; taking the first position as a reference, obtaining the code located at the second position from top to bottom according to a first preset distance; detecting whether the code located at the second position is the first preset code; if so, taking the code located at the second position as a reference, weaving at least one notification of the at least one notification at the third position from top to bottom according to the first preset distance; if not, taking the code located at the second position as a reference, continuing to detect from top to bottom according to the first preset distance until it is detected that the code located at the fourth position is the first preset code, stopping monitoring, and weaving at least one notification of the at least one notification at the fourth position.
[0040] The first position is a line number in a third code file, the third code file includes a first connection point currently being processed, and the third code file belongs to the first application.
[0041] The first preset distance is obtained according to the spacing distance between adjacent codes, and the adjacent codes include codes located in a first row number and codes located in a second row number, and the first row number is adjacent to the second row number.
[0042] The first preset code is used to indicate a function declaration of the notification.
[0043] It can be seen that in the above technical solution, the first preset code is used to accurately locate the position of the woven notification.
[0044] For example, see Figure 1B , Figure 1B A schematic diagram of weaving the notification into a connection point is provided in an embodiment of the present invention. Figure 1BAs shown, the first application includes a bytecode file, a Java source file, and a Groovy file. Further, assuming that there is a first connection point matching the pointcut in a code file of the first application, for example, the first connection point is: @Pointcut("execution(*Spring4_AOP.ao pAnnotation.*.*(..))"), then a notification can be woven into the first connection point, for example, the notification is @Before("declareJoinPointerExpression()"). Further, the corresponding code file in the second program will include the notification. It can be understood that the second application includes a bytecode file with woven notification, a Java source file with woven notification, or a Groovy file with woven notification.
[0045] 104. Run the second application to obtain at least one call link information corresponding to each first connection point in the at least one first connection point;
[0046] 105. Generate a call link file, wherein the call link file includes at least one call link information corresponding to each first connection point in the at least one first connection point, and each call link information in the at least one call link information is obtained according to the sequential relationship of calling multiple first code files in the first application according to each notification in the at least one notification.
[0047] It can be seen that in the above technical solution, a target code including at least one notification and a cut-off point is obtained; at least one first connection point matching the cut-off point in the first application is determined during the compilation of the target code; the at least one notification is woven into the at least one first connection point to obtain a second application, and each of the at least one first connection point is woven into at least one notification of the at least one notification; the second application is run to obtain at least one call link information corresponding to each of the at least one first connection point; a call link file is generated, the call link file includes at least one call link information corresponding to each of the at least one first connection point, each of the at least one call link information is obtained according to the order relationship of each notification in the at least one notification calling multiple first code files in the first application, and the at least one call link information corresponding to each of the at least one first connection point is obtained by running the second application, so that the call link file can be generated, that is, the operation logic problems of the code running inside the application software can be known according to the order relationship of each notification calling multiple first code files in the first application.
[0048] Optionally, in a possible implementation, generating a call link file includes: when there is no call link length greater than a first preset call link length among the multiple call link lengths, determining the length difference between each call link length in the multiple call link lengths and a second preset call link length to obtain multiple second length difference values; determining second length difference values that fall into the same length difference interval among the multiple second length difference values to obtain multiple groups of second length difference values, each group of the multiple groups of second length difference values includes at least one second length difference value; determining multiple color values based on the multiple groups of second length difference values, at least one call link information corresponding to each first connection point is associated with at least one color value; and generating the call link file based on the multiple color values.
[0049] The second preset call link length is set by an administrator or configured in a server, and the second preset call link length is smaller than the first preset call link length.
[0050] The color value includes one of the following: RGB value or CMYK value. For example, the RGB value is (127,127,127); the CMYK value is: (20,100,80,5).
[0051] Further, at least one call link information corresponding to each first connection point may be marked with at least one color value, that is, each call link information in the at least one call link information is marked with each color value in the at least one color value.
[0052] It can be seen that in the above technical solution, a call link file is generated based on the color value, which is convenient for developers to view.
[0053] Among them, the first group of second length difference values is any group of the multiple groups of second length difference values, and determining multiple color values based on the multiple groups of second length difference values includes: obtaining the length difference interval corresponding to the first group of second length difference values to obtain the first length difference interval; determining the difference between at least one second length difference value included in the first group of second length difference values and the maximum endpoint value of the first length difference interval to obtain at least one third length difference value, each third length difference value in the at least one third length difference value is the difference between each second length difference value in the at least one second length difference value and the maximum endpoint value of the first length difference interval; determining the color value corresponding to each third length difference value in the at least one third length difference value to obtain at least one color value.
[0054] For example, the first length difference interval is (15, 35), and the maximum endpoint value of the first length difference interval is 35.
[0055] It can be seen that in the above technical solution, the color value is determined by determining the difference between each length difference and the maximum endpoint value of the length difference interval, thereby preparing for the subsequent use of at least one color value to mark at least one call link information.
[0056] The following is a specific example of the process of determining at least one first connection point in the first application program that matches the cut point during the process of compiling the first code.
[0057] See also Figure 2 , Figure 2 A flowchart of another information processing method provided by an embodiment of the present invention is shown below. Figure 2 As shown, another information processing method provided by an embodiment of the present invention may include:
[0058] 201. Obtain multiple suffixes corresponding to the multiple first code files in the first application, where each of the multiple first code files corresponds to a suffix;
[0059] 202. Determine the code file category to which each first code file belongs according to each suffix name;
[0060] For example, if the suffix of the first code file includes class, then the code file category to which the first code file belongs is a bytecode file; for another example, if the suffix of the first code file includes Groovy, then the code file category to which the first code file belongs is a Groovy file.
[0061] 203. Determine, according to the code file category to which each first code file belongs, a sequence of at least one first connection point in the plurality of first code files that matches the tangent point;
[0062] 204. During the process of compiling the first code, search the plurality of first code files according to the sequence for the at least one first connection point that matches the cut point.
[0063] Optionally, in a possible implementation, in the process of compiling the target code, searching the multiple first code files for the at least one first connection point that matches the cut point according to the sequence, including: obtaining at least one second connection point included in the cut point, each of the at least one second connection point is used to match each first connection point in the at least one first connection point; parsing the second indication information corresponding to each connection point in the at least one second connection point to obtain at least one second indication information; in the process of compiling the target code, searching the multiple first code files for at least one first indication information corresponding to the at least one second indication information according to the sequence, each of the at least one second indication information corresponds to each first indication information in the at least one first indication information; determining the first connection point corresponding to each first indication information in the at least one first indication information to obtain the at least one first connection point.
[0064] Each second indication information in the at least one second indication information or each first indication information in the at least one first indication information includes at least one of the following: a type matching wildcard, entry point indication information, and a logical operator.
[0065] Further, the type matching wildcard includes one of the following: a first type matching wildcard, a second type matching wildcard, or a third type matching wildcard. The first type matching wildcard is used to match zero characters, a single character, or multiple characters; the second type matching wildcard is used to match repeated zero characters, a single character, or multiple characters; and the third type matching wildcard is used to match a subtype of a specified type.
[0066] For example, the first type of matching wildcard is "*", Java.lang.*ing means matching any type ending with ing under Java.lang; the second type of matching is "..", Java..* means matching any type under the Java package and any subpackage under Java; the third type of matching is "+", Java.lang.number+ means matching any subtype of number under Java.lang, for example, it can match Java.lang.integer, etc.
[0067] Furthermore, the pointcut indicators may include, for example, execution, within, this, target, args, etc. Logical operators may include, for example, &&, ||, and !.
[0068] It can be seen that in the above technical solution, by searching for at least one first indication information corresponding to at least one second indication information, it is possible to quickly determine at least one first connection point.
[0069] It can be understood that multiple suffixes corresponding to the multiple first code files in the first application are obtained, and each of the multiple first code files corresponds to a suffix; the code file category to which each first code file belongs is determined according to each suffix; the order of searching for at least one first connection point matching the tangent point in the multiple first code files is determined according to the code file category to which each first code file belongs; in the process of compiling the target code, the at least one first connection point matching the tangent point is searched in the multiple first code files according to the order, so as to determine the code file category to which the code file belongs according to the suffix, thereby quickly determining the order of at least one first connection point matching the tangent point. Furthermore, by searching for at least one first connection point matching the tangent point according to the order of searching for at least one first connection point matching the tangent point, omissions are avoided and search efficiency is improved.
[0070] See also Figure 3 , Figure 3 A flowchart of another information processing method provided by an embodiment of the present invention is shown below. Figure 3 As shown, the generating of the call link file includes:
[0071] 301. Determine a call link length corresponding to each call link information according to at least one call link information corresponding to each first connection point, so as to obtain multiple call link lengths;
[0072] Among them, each call link length among the multiple call link lengths is related to the number of the multiple first code files called by each notification in the at least one notification, or, each call link length among the multiple call link lengths is related to the number of at least one function included in each first code file called by each notification in the at least one notification.
[0073] Optionally, in a possible implementation, determining the call link length corresponding to each call link information according to at least one call link information corresponding to each first connection point to obtain multiple call link lengths includes: performing a first preset operation for each call link information to obtain the multiple call link lengths; the first preset operation includes the following steps: determining the call link information currently being processed; obtaining at least one call identifier in the call link information currently being processed; and determining the call link length corresponding to the call link information currently being processed according to the at least one call identifier.
[0074] Each of the at least one calling identifier includes one of the following: an identifier of a called method, an identifier of a class to which the called method belongs, or an identifier of a called file.
[0075] It can be seen that in the above technical solution, the efficiency of confirming the call link length is improved by using the call identifier to determine the call link length.
[0076] 302. When there is a call link length greater than a first preset call link length among the multiple call link lengths, determine a length difference between each call link length among the multiple call link lengths and the first preset call link length to obtain multiple first length differences;
[0077] The first preset call link length is set by an administrator or configured in a configuration file of the server.
[0078] 303. Number the multiple first length differences in descending order of length differences to obtain multiple numbers;
[0079] 304. Generate the call link file according to the multiple numbers.
[0080] It can be seen that in the above technical solution, the call link length corresponding to each call link information is determined according to at least one call link information corresponding to each first connection point to obtain multiple call link lengths; when there is a call link length greater than the first preset call link length in the multiple call link lengths, the length difference between each call link length in the multiple call link lengths and the first preset call link length is determined to obtain multiple first length difference values; the multiple first length difference values are numbered in descending order of length difference values to obtain multiple numbers; the call link file is generated according to the multiple numbers, thereby realizing the generation of the call link file based on the order of length difference values from large to small, which is convenient for developers to view.
[0081] See also Figure 4 , Figure 4 A schematic diagram of an information processing device provided by an embodiment of the present invention. Figure 4 As shown, an information processing device 400 provided by an embodiment of the present invention may include an acquisition module 401, a determination module 402, a weaving module 403, an operation module 404 and a generation module 405, wherein:
[0082] An acquisition module 401 is used to acquire a target code including a cut point and at least one notification;
[0083] A determination module 402, configured to determine at least one first connection point in a first application program that matches the cut point during compilation of the target code;
[0084] Optionally, in a possible implementation, the determination module 402 is specifically used to obtain multiple suffix names corresponding to the multiple first code files in the first application, each of the multiple first code files corresponds to a suffix name; determine the code file category to which each first code file belongs according to each suffix name; determine the order of at least one first connection point matching the tangent point in the multiple first code files according to the code file category to which each first code file belongs; and in the process of compiling the first code, search for the at least one first connection point matching the tangent point in the multiple first code files according to the order of order.
[0085] Optionally, in a possible implementation, the determination module 402 is specifically used to obtain at least one second connection point included in the tangent point, each of the at least one second connection point is used to match each first connection point in the at least one first connection point; parse the second indication information corresponding to each of the at least one second connection point to obtain at least one second indication information; in the process of compiling the first code, search for at least one first indication information corresponding to the at least one second indication information from the multiple first code files according to the sequence, each of the at least one second indication information corresponds to each first indication information in the at least one first indication information; determine the first connection point corresponding to each of the first indication information in the at least one first indication information to obtain the at least one first connection point.
[0086] Each second indication information in the at least one second indication information or each first indication information in the at least one first indication information includes at least one of the following: a type matching wildcard, entry point indication information, and a logical operator.
[0087] A weaving module 403, configured to weave the at least one notification into the at least one first connection point to obtain a second application, wherein each of the at least one first connection point weaves at least one notification into the at least one notification;
[0088] The running module 404 is used to run the second application program to obtain at least one call link information corresponding to each first connection point of the at least one first connection point;
[0089] A generation module 405 is used to generate a call link file, wherein the call link file includes at least one call link information corresponding to each first connection point in the at least one first connection point, and each call link information in the at least one call link information is obtained according to the sequential relationship of calling multiple first code files in the first application according to each notification in the at least one notification.
[0090] Optionally, in a possible implementation, the generation module 405 is specifically used to determine the call link length corresponding to each call link information according to at least one call link information corresponding to each first connection point to obtain multiple call link lengths; when there is a call link length greater than a first preset call link length among the multiple call link lengths, determine the length difference between each call link length in the multiple call link lengths and the first preset call link length to obtain multiple first length difference values; number the multiple first length difference values in order of length difference from large to small to obtain multiple numbers; and generate the call link file according to the multiple numbers.
[0091] Optionally, in a possible implementation, the generation module 405 is specifically used to perform a first preset operation for each call link information to obtain the multiple call link lengths; the first preset operation includes the following steps: determining the call link information currently being processed; obtaining at least one call identifier in the call link information currently being processed; and determining the call link length corresponding to the call link information currently being processed based on the at least one call identifier.
[0092] Each of the at least one calling identifier includes one of the following: an identifier of a called method, an identifier of a class to which the called method belongs, or an identifier of a called file.
[0093] See also Figure 5 , Figure 5 A schematic diagram of the server structure of the hardware operating environment involved in the embodiments of the present application.
[0094] An embodiment of the present invention provides an electronic device for information push, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the processor to execute instructions including steps in any one of the information processing methods. Figure 5 As shown, the server of the hardware operating environment involved in the embodiment of the present application may include:
[0095] Processor 501, such as CPU.
[0096] Memory 502, optionally, the memory may be a high-speed RAM memory, or a stable memory, such as a disk memory.
[0097] The communication interface 503 is used to realize the connection and communication between the processor 501 and the memory 502 .
[0098] Those skilled in the art will understand that Figure 5 The structure of the server shown in the figure does not constitute a limitation thereof, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0099] like Figure 5 As shown, the memory 502 may include an operating system, a network communication module, and one or more programs. The operating system is a program that manages and controls server hardware and software resources and supports the operation of one or more programs. The network communication module is used to implement communication between components within the memory 502, as well as communication with other hardware and software within the server.
[0100] exist Figure 5 In the server shown, the processor 501 is used to execute one or more programs stored in the memory 502 to implement the following steps:
[0101] Obtaining target code including a pointcut and at least one notification;
[0102] Determining at least one first join point in a first application program that matches the cut point during compiling the target code;
[0103] Weaving the at least one notification into the at least one first connection point to obtain a second application, each of the at least one first connection point weaving at least one notification into the at least one notification;
[0104] Running the second application to obtain at least one call link information corresponding to each first connection point of the at least one first connection point;
[0105] Generate a call link file, the call link file including at least one call link information corresponding to each first connection point in the at least one first connection point, each call link information in the at least one call link information is obtained according to the sequential relationship of calling multiple first code files in the first application according to each notification in the at least one notification.
[0106] The specific implementation of the server involved in this application can be found in the various embodiments of the abnormal cell screening method mentioned above, and will not be described in detail here.
[0107] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the stored computer program is executed by the processor to implement the following steps:
[0108] Obtaining target code including a pointcut and at least one notification;
[0109] Determining at least one first join point in a first application program that matches the cut point during compiling the target code;
[0110] Weaving the at least one notification into the at least one first connection point to obtain a second application, each of the at least one first connection point weaving at least one notification into the at least one notification;
[0111] Running the second application to obtain at least one call link information corresponding to each first connection point of the at least one first connection point;
[0112] Generate a call link file, the call link file including at least one call link information corresponding to each first connection point in the at least one first connection point, each call link information in the at least one call link information is obtained according to the sequential relationship of calling multiple first code files in the first application according to each notification in the at least one notification.
[0113] The specific implementation of the computer-readable storage medium involved in the present application can be found in the various embodiments of the abnormal cell screening method mentioned above, and will not be described in detail here.
[0114] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0115] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An information processing method, characterized in that: include: Obtaining target code including a pointcut and at least one notification; Determining at least one first connection point in the first application program that matches the pointcut during the compilation of the target code; determining at least one first connection point in the first application program that matches the pointcut during the compilation of the target code comprises: Obtain multiple suffix names corresponding to multiple first code files in the first application, each of the multiple first code files corresponds to a suffix name; Determine the code file category to which each first code file belongs according to each suffix name; Determine, according to the code file category to which each first code file belongs, a sequence of at least one first connection point in the plurality of first code files that matches the tangent point; In the process of compiling the target code, searching the plurality of first code files according to the sequence for the at least one first connection point that matches the cut point; in the process of compiling the target code, searching the plurality of first code files according to the sequence for the at least one first connection point that matches the cut point comprises: Acquire at least one second connection point included in the tangent point, each second connection point in the at least one second connection point is used to match each first connection point in the at least one first connection point; parsing the second indication information corresponding to each connection point in the at least one second connection point to obtain at least one second indication information; In the process of compiling the target code, searching at least one first indication information corresponding to the at least one second indication information from the plurality of first code files according to the sequence, each second indication information in the at least one second indication information corresponds to each first indication information in the at least one first indication information; Determine a first connection point corresponding to each first indication information in the at least one first indication information to obtain the at least one first connection point; Weaving the at least one notification into the at least one first connection point to obtain a second application, each of the at least one first connection point weaving at least one notification into the at least one notification; Running the second application to obtain at least one call link information corresponding to each first connection point of the at least one first connection point; Generate a call link file, the call link file including at least one call link information corresponding to each first connection point in the at least one first connection point, each call link information in the at least one call link information is obtained according to the sequential relationship of calling multiple first code files in the first application according to each notification in the at least one notification.
2. The method according to claim 1, characterized in that Each second indication information in the at least one second indication information or each first indication information in the at least one first indication information includes at least one of the following: a type matching wildcard, entry point indication information, and a logical operator.
3. The method according to claim 1 or 2, characterized in that: The generating of the call link file comprises: Determine a call link length corresponding to each call link information according to at least one call link information corresponding to each first connection point, so as to obtain multiple call link lengths; When there is a call link length greater than a first preset call link length among the multiple call link lengths, determining a length difference between each call link length among the multiple call link lengths and the first preset call link length to obtain multiple first length differences; Numbering the plurality of first length differences in descending order of length differences to obtain a plurality of numbers; The call link file is generated according to the multiple numbers.
4. The method according to claim 3, characterized in that The determining, according to at least one call link information corresponding to each first connection point, a call link length corresponding to each call link information to obtain multiple call link lengths includes: Performing a first preset operation on each call link information to obtain the multiple call link lengths; The first preset operation includes the following steps: Determine the call link information currently being processed; obtain at least one call identifier in the call link information currently being processed; and determine the call link length corresponding to the call link information currently being processed based on the at least one call identifier.
5. The method according to claim 4, characterized in that Each of the at least one calling identifier includes one of the following: an identifier of a called method, an identifier of a class to which the called method belongs, or an identifier of a called file.
6. An information processing device, characterized in that: include: An acquisition module, used for acquiring a target code including a cut point and at least one notification; A determination module, configured to obtain a plurality of suffixes corresponding to a plurality of first code files in a first application, wherein each of the plurality of first code files corresponds to a suffix; Determine the code file category to which each first code file belongs according to each suffix name; determine the order of at least one first connection point matching the tangent point in the multiple first code files according to the code file category to which each first code file belongs; obtain at least one second connection point included in the tangent point, each second connection point in the at least one second connection point is used to match each first connection point in the at least one first connection point; parse the second indication information corresponding to each connection point in the at least one second connection point to obtain at least one second indication information; in the process of compiling the target code, search for at least one first indication information corresponding to the at least one second indication information from the multiple first code files according to the order, each second indication information in the at least one second indication information corresponds to each first indication information in the at least one first indication information; Determine a first connection point corresponding to each first indication information in the at least one first indication information to obtain the at least one first connection point; a weaving module, configured to weave the at least one notification into the at least one first connection point to obtain a second application, each of the at least one first connection point weaving at least one notification into the at least one notification; A running module, used for running the second application to obtain at least one call link information corresponding to each first connection point of the at least one first connection point; A generation module is used to generate a call link file, wherein the call link file includes at least one call link information corresponding to each first connection point in the at least one first connection point, and each call link information in the at least one call link information is obtained according to the sequential relationship of calling multiple first code files in the first application according to each notification in the at least one notification.
7. An electronic device for information processing, characterized in that: The method comprises a processor, a memory, a communication interface and one or more programs, wherein the one or more programs are stored in the memory and are generated to be executed by the processor to perform instructions of the steps in any one of the methods of claims 1-5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is used to be executed by a processor to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and system for processing information
CN106789335A
Performance data log obtaining method and device
CN108228147A
Systems and methods for web service function, definition, implementation, and / or execution
US20050256882A1
