Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a program problem location method according to an embodiment of the present invention, where this embodiment is applicable to a case where problem data in an operation process of a location application is checked, and the method may be executed by a program problem location method device, and the device may be implemented by software and/or hardware and integrated in a terminal having an application. The method specifically comprises the following steps:
s110, in the running process of the application program, if the trigger operation on the preset service is detected, the function of the preset service is realized by executing the service code of the preset service, and the input parameter and the output result of the target method function in the service code are recorded.
The application program may be any application program, for example, a client program of an e-commerce website, such as an application program of kyoto.
The preset service may be any preset service, for example, a service for submitting an order in the kyoto application program, and the like. The trigger operation of the preset service may be a click operation on a certain control in the page, for example, taking the preset service as a service for submitting an order as an example, the trigger operation of the preset service may be that the user clicks a control for "submitting an order" in the kyoto application program.
The target method function may be a method function in the service code for executing the preset service, where the target method function may include an entry method function of the preset service, and other method functions executed by the entry method function call. The entry method function may be a main function of a preset service, each service has an entry method function, and when a certain service is triggered, the entry method function of the service is called. For example, when the user clicks the control of "submit an order", the "submit an order" service corresponds to an entry method function, and the other method functions may be a function of generating an order number, a function of reducing stock, a function of warehousing an order, and the like.
The input parameter may be, for example, an input parameter that generates a purchase service in the service code when the user clicks on a quantity control behind a product when the user clicks on a purchase of a certain product. The output result may be a result obtained by calculating the input parameter through the objective method function based on the input parameter. For example, taking the target method function as an addition function, when the user clicks the quantity control behind the product, for example, the user clicks the control twice, and the quantity is added by 1 every time the user clicks the control, the input parameter 1 is generated in the service code, the target method function is executed, and the target method function adds the two input parameters 1 to obtain an output result, that is, 2.
In the running process of an application program, when a user executes triggering operation on a certain service, a service end can execute a service code of the service to realize the function of the service, and records input parameters and output results of a target method function in the service code of the service, so that flow data at the moment when a problem occurs in a production environment is recorded and is subjected to on-site snapshot, problem data required during reproduction is rapidly provided, the effect of data dependence on external services is eliminated, the data is real data, manual preparation is not needed, and the data is more authentic.
And S120, reporting the recorded input parameters and output results of the target method function to a server for storage, and checking and positioning the running problems of the preset service according to the stored contents.
For example, referring to the execution flow diagram of the program problem location method described in fig. 2, based on a trigger operation of a user on a preset service, an input parameter and an output result of a target method function of the preset service are recorded, the recorded input parameter and the recorded output result of the target method function are received and written into a preset storage area for recording, and the recorded input parameter and the recorded output result of the target method function are reported to a server for storage, for example, may be reported to a database of the server, for example, may be stored in a common database such as HBase, ElasticSearch, MySQL, or the like, so as to perform subsequent troubleshooting based on the stored operation problem of the preset service, and achieve an effect of performing low-cost, low-risk, efficient, and accurate location troubleshooting on the problem of the production environment.
It should be noted that, referring to the schematic block structure diagram of the program problem location method described in fig. 3, when recording the input parameters and the output results of the target method function of the preset service, the flow recorder may record and collect the input parameters and the output results of the entry method function in the preset service and the other method functions called and executed by the entry method function, and temporarily store the input parameters and the output results in the local memory buffer, and then report the input parameters and the output results to the flow dump memory through the background thread. The flow recorder needs to be deployed and embedded into a service system, and the flow recorder is internally pure in memory and asynchronously operated, so that the system performance is hardly influenced.
The flow dump can be responsible for receiving the input parameters and the output results of the entry method function in the preset service collected by the flow recorder and other method functions executed by the entry method function call, and storing the input parameters and the output results into the database, and the flow dump can support common databases such as HBase, ElasticSearch, MySQL and the like, which is a program needing to be independent.
Optionally, the reporting the recorded input parameters and output results of the target method function to the server for storage may specifically be: and reporting the recorded input parameters and output results of the target method function and a tracking identifier (trace ID) allocated for the trigger operation to a server for storage.
For example, the tracking identifier may be an identifier configured for a trigger operation of a preset service, and the identifier may be used to distinguish which service the user has performed the trigger operation for and a trigger time of the trigger operation.
The user performs a trigger operation for each pair of services, that is, a tracking identifier is assigned to the trigger operation, so that the trigger time of the service corresponding to the input parameter and the output result of the stored target method function can be distinguished based on the tracking identifier. The tracking identifier may be, for example, a tracking ID.
According to the technical scheme of the embodiment of the invention, in the running process of the application program, when a user executes the triggering operation on a certain service, the service end can execute the service code of the service to realize the function of the service, and records the input parameter and the output result of the target method function in the service code of the service, so that the flow data at the moment when a problem occurs in the production environment is recorded and is subjected to on-site snapshot, the problem data required in reproduction is rapidly provided, the effect of data dependence on external services is eliminated, the data is real data, manual preparation is not needed, and the authenticity is better. After the input parameters and the output results of the target method function of the preset service are written into the preset storage area for recording, the recorded input parameters and the recorded output results of the target method function are reported to the server for storage, so that the subsequent troubleshooting and positioning are carried out based on the stored operation problems of the preset service, and the effects of low cost, low risk, high efficiency and accurate positioning and troubleshooting on the problems of the production environment are realized.
Example two
Fig. 4 is a flowchart of a program problem locating method according to a second embodiment of the present invention, and the second embodiment of the present invention may be combined with various alternatives in the above embodiments. In this embodiment of the present invention, optionally, the recording input parameters and output results of the target method function in the service code includes: writing the input parameters of the entry method function into a preset storage area by executing an input parameter recording code preset at the beginning position in the entry method function; for each other method function called and executed by the entry method function, writing the input parameters of the other method functions into a preset storage area by executing an input parameter recording code preset at the beginning position in the other method functions, and writing the output results of the other method functions into the preset storage area by executing an operation result recording code preset at the ending position in the other method functions; and writing the output result of the entry method function into a preset storage area by executing an operation result recording code preset at the tail position in the entry method function.
As shown in fig. 4, the method of the embodiment of the present invention specifically includes the following steps:
s210, in the running process of the application program, if the trigger operation of the preset service is detected, the function of the preset service is realized by executing the service code of the preset service.
S220, writing the input parameters of the entry method function into a preset storage area by executing an input parameter recording code preset at the beginning position in the entry method function; for each other method function called and executed by the entry method function, writing the input parameters of the other method functions into a preset storage area by executing an input parameter recording code preset at the beginning position in the other method functions, and writing the output results of the other method functions into the preset storage area by executing an operation result recording code preset at the ending position in the other method functions; and writing the output result of the entry method function into a preset storage area by executing an operation result recording code preset at the tail position in the entry method function.
For example, the input parameter recording code may be a program code for inputting a parameter for recording, and the input parameter to be recorded may be recorded according to the program code.
Similarly, the operation result recording code may be a program code for recording an output result obtained by calculating the input parameter through the target method function, and the output result obtained by calculating the input parameter through the target method function to be recorded may be recorded according to the program code.
It should be noted that, for each service, a code for recording an input parameter is provided at the beginning of each entry method function and another function executed by the entry function call, and the code can be used to record the input parameter of the entry method function and another function executed by the entry function call of the service. Similarly, an operation result recording code is also arranged at the tail position of the entry method function of the service and the tail position of other functions executed by the entry function call, and the code can be used for respectively recording output results obtained by calculating the input parameters of the entry method function of the service and other functions executed by the entry function call through the entry method function and other method functions executed by the entry method function call.
The preset storage area may be a preset storage area in which the entry method function of a certain service and the input parameters and the output results of other functions executed by the entry function call are stored.
Each service has a thread for executing the target method function corresponding to the service, and each thread has a corresponding storage area. Therefore, the preset storage area can also be understood as a memory area corresponding to a thread where an objective method function of a certain service is located.
It should be noted that, after the input parameters of the entry method function are written in the preset storage area, other method functions executed by the entry method function call are executed, and for each other method function executed by the entry method function call, when the input parameter recording code preset at the head position in the other method function is executed, the input parameter recording code preset at the head position in the other method function is executed in the order in which the other method function is executed by the entry method function call. The method comprises the steps of firstly executing an input parameter recording code preset at the beginning position of one method function, and then executing an operation result recording code preset at the end position of the function in the method function. And then executing an input parameter recording code preset at the beginning position of the function in another method function, and then executing an operation result recording code preset at the end position of the function in the method function. And repeating the steps until all other method function calls are executed.
For example, taking a predetermined service as the service for submitting an order as an example, if there is an entry method function in the service and other method functions called and executed by the entry method. The other method functions are 3 functions of a function for generating an order number, a function for reducing stock and a function for warehousing an order, and the execution sequence of the 3 functions is as follows: and generating a function of order number, a function of deducting stock and a function of putting the order into a warehouse. When the input parameters and the output results of the target method function in the service codes are recorded, the input parameter recording code preset at the starting position of the entry method function of the service for submitting the order is executed, and the input parameter recording code at the starting position of the entry method function is written into the storage area of the thread corresponding to the submitted order. Then, the input parameter recording code preset at the beginning position in the function for generating the order number is executed, the input parameter recording code at the beginning position in the function for generating the order number is written into the storage area of the thread corresponding to the submitted order, then the operation result recording code preset at the ending position in the function for generating the order number is executed, and the operation result recording code at the ending position in the function for generating the order number is written into the storage area of the thread corresponding to the submitted order. Then, the input parameter recording code preset at the beginning position in the inventory deduction function is executed, the input parameter recording code at the beginning position in the inventory deduction function is written into the storage area of the thread corresponding to the submitted order, then the operation result recording code preset at the ending position in the inventory deduction function is executed, and the operation result recording code at the ending position in the inventory deduction function is written into the storage area of the thread corresponding to the submitted order. Then, executing an input parameter recording code preset at the beginning position in the order warehousing function, writing the input parameter recording code at the beginning position in the order warehousing function into a storage area of a thread corresponding to the submitted order, then executing an operation result recording code preset at the ending position in the order warehousing function, and writing the operation result recording code at the ending position in the order warehousing function into the storage area of the thread corresponding to the submitted order. And finally, executing a running result recording code preset at the tail position of the entry method function of the service of submitting the order, and writing the running result recording code at the tail position of the entry method function into a storage area of the thread corresponding to the submitted order.
It should be noted that, when writing the input parameters and the output results of the target method function of the preset service into the preset storage area, the input parameters and the output results of the target method function of the preset service may be written into the stack of the preset service in sequence. For example, in the above example, the input parameter recording code of the entry method function for submitting the order is first written into the stack of the service thread; then, sequentially writing the input parameter recording code and the running result recording code of the function for generating the order number into the stack of the service thread; then, sequentially writing the input parameter recording code and the running result recording code of the inventory deduction function into the stack of the service thread; then, sequentially writing the input parameter recording codes and the running result recording codes of the functions of the order warehousing into the stack of the service thread; and finally, writing the running result recording code of the inlet method function for submitting the order into the stack of the service thread.
Thus, the input parameters and the output results of the target method function of the preset service are recorded in order, and the on-site snapshot ensures that the input parameters and the output results of the target method function of the preset service are recorded completely. Meanwhile, all problem data needed in reproduction are rapidly provided, the effect of data dependence on external services is eliminated, the data are real data, manual preparation is not needed, and the method is more authentic.
And S230, reporting the recorded input parameters and output results of the target method function to a server for storage, and checking and positioning the running problems of the preset service according to the stored contents.
According to the technical scheme of the embodiment of the invention, the input parameters and the output results of the target method function of the preset service are recorded in order, and the input parameters and the output results of the target method function of the preset service are recorded completely through the on-site snapshot. Meanwhile, all problem data needed in reproduction are rapidly provided, the effect of data dependence on external services is eliminated, the data are real data, manual preparation is not needed, and the method is more authentic.
EXAMPLE III
Fig. 5 is a flowchart of a program problem location method according to a third embodiment of the present invention, where this embodiment is applicable to a case where problem data in an operation process of an application program is checked and located, and the method may be executed by a program problem location method device, and the device may be implemented by software and/or hardware and is integrated in a terminal having the application program. The method specifically comprises the following steps:
s310, when debugging the service code of the preset service in the application program, acquiring the input parameter and the output result of the target method function in the service code from the service end; wherein the input parameters and the output results are recorded during the on-line running of the application.
The application program may be any application program, for example, a client program of an e-commerce website, such as an application program of kyoto.
The preset service may be any preset service, for example, a service for submitting an order in the kyoto application program.
The target method function may be a method function in the service code of the preset service, and the target method function may include an entry method function of the preset service and other method functions executed by the entry method function call. The entry method function may be a main function of a preset service, each service has an entry method function, and when a certain service is triggered, the entry method function of the service is called. For example, when the user clicks the control of "submit an order", the "submit an order" service corresponds to an entry method function, and the other method functions may be a function of generating an order number, a function of reducing stock, a function of warehousing an order, and the like.
The input parameter may be, for example, an input parameter that generates a purchase service in the service code when the user clicks on a quantity control behind a product when the user clicks on a purchase of a certain product. The output result may be a result obtained by calculating the input parameter through the objective method function based on the input parameter. For example, taking the target method function as an addition function, when the user clicks the quantity control behind the product, for example, the user clicks the control twice, and the quantity is added by 1 every time the user clicks the control, the input parameter 1 is generated in the service code, the target method function is executed, and the target method function adds the two input parameters 1 to obtain an output result, that is, 2. The input parameters and the output results are recorded during the on-line operation of the application program.
When an application program has a problem in the online running process, a service code of a preset service in the application program needs to be debugged to find a specific position of the problem code. Therefore, the service code of the preset service for running the application program with problems needs to be acquired first. In the on-line running process of the application program, the input parameters and the output results of the target method function in the service code of the preset service can be recorded, so that the input parameters and the output results of the target method function in the service code can be obtained from the service end. So as to debug the input parameters and the output results of the acquired target function subsequently.
Optionally, the obtaining of the input parameter and the output result of the target method function in the service code from the server may specifically be: sending a recording information query request to a server, wherein the recording information query request comprises an input tracking identifier, so that the server calls a preset recording data query service according to the tracking identifier to obtain an input parameter and an output result of a target method function corresponding to the tracking identifier; and receiving input parameters and output results of the target method function returned by the server.
For example, the recording information query request may be a request command requesting query of recording information, for example, a request command requesting query of input parameters and output results of an objective method function in a service of submitting an order in kyoto recorded.
The tracking identifier may be an identifier configured for triggering a preset service, and the identifier may be used to distinguish which service the user has performed a triggering operation for and a triggering time.
The preset recorded data query service may be a preset query service for recorded data.
Referring to the schematic block diagram of the program problem location method described in fig. 6, taking a preset service as a service for submitting an order as an example, when a user clicks an "order submission" control, an operation on the service for submitting an order is triggered, and a tracking identifier is configured for the order submission service, for example, the tracking identifier is 123X, the user inputs the tracking identifier into a preset recording data query service system, and the preset recording data query service system can return input parameters and output results of a target method function of a service corresponding to the tracking identifier to the user side according to the tracking identifier input by the user. Therefore, the data recorded in the production environment can be reproduced in the development environment, and the problems that in the prior art, the data needs to be manually prepared in the development environment, so that the data risks of polluting normal user data, being misused by normal users or being utilized by malicious users are caused, and the prepared data cannot truly reflect a real scene are solved.
It should be noted that the recorded data query service provides a query function for recorded information, provides the query function for a local development environment, provides the query function in the form of an HTTP REST service, and facilitates integration of the local development environment. This is a program that needs to be independent and can be combined with the flow data dump for deployment.
And S320, checking and positioning the running problems of the preset service according to the acquired input parameters and output results of the target method function.
For example, referring to the schematic execution flow diagram of the program problem location method described in fig. 7, after obtaining the input parameter and the output result of the target method function, the input parameter and the output result of the target method function are restored, that is, reproduced, and the input parameter and the output result of the reproduced target method function are debugged to find out data with a problem in operation. Therefore, the reproduced recording data of the production environment is utilized to debug the data, the risk and the cost of data debugging are reduced, and the efficiency and the accuracy of troubleshooting and positioning of subsequent problem data are improved.
Optionally, the operation problem of the preset service is checked and positioned according to the obtained input parameter and output result of the target method function, which may specifically be: inputting the acquired input parameters of the entry method function into the entry method function to trigger the execution of the service code; taking the first other method function which is called and executed by the entrance method function as the current method function, outputting the obtained input parameters and output results of the current method function, and determining whether the current method function is a problem code according to the output content; and if the trigger operation of continuing debugging is detected, taking the next other method function to be called and executed as the current method function, and returning and executing the operation of outputting the acquired input parameters and output results of the current method function.
Illustratively, the current method function may be a method function that is currently being debugged.
Taking a preset service as an example of a service for submitting an order, if there is an entry method function and other method functions called and executed by the entry method in the service, the other method functions are 3 functions, namely, a function for generating an order number, a function for reducing stock and a function for putting the order in storage, and the execution sequence of the 3 functions is as follows: and generating a function of order number, a function of deducting stock and a function of putting the order into a warehouse.
After the input parameters and the output results of the target method function of the service for submitting the order are obtained, the input parameters of the entry method function in the target method function are input into the entry method function to trigger the execution of the service code of the service for submitting the order. The first other method function executed by the entrance method function call, namely the function for generating the order number is taken as the current method function, the obtained input parameters and the output result of the function for generating the order number are output, so that the user can determine whether the function for generating the order number is the problematic code according to the input parameters and the output result of the output function for generating the order number, if not, the next other method function is debugged continuously, namely the function of reducing the stock is taken as the current method function, the input parameters and the output results of the obtained function of reducing the stock are output, so that the user can determine whether the function of reducing the stock is a problematic code according to the input parameters of the output function of reducing the stock and the output result, and if not, and then taking the order warehousing function as the current method function to judge whether the input parameters and the output result of the order warehousing function are problematic codes.
If the current method function is determined to be the code with the problem according to the input parameters and the output result of the output current method function, it is not necessary to judge whether the input parameters and the output result of the other method functions are the code with the problem. For example, if it is determined that the function for generating the order number is a problematic code based on the input parameter and the output result of the output function for generating the order number, it is not necessary to determine whether the input parameter and the output result of the function for reducing stock and the input parameter and the output result of the function for putting the order in stock are problematic codes.
It should be noted that, determining whether the input parameter and the output result of the current method function are problematic codes is judged by a programmer, and when the programmer judges that the input parameter and the output result of the current method function are not problematic, the programmer executes a trigger operation for continuing debugging of the next other method function; and if the programmer judges that the input parameters and the output results of the current method function are problematic, executing the debugging work of the target method function for ending the service.
It should be noted that, as shown in fig. 6, when debugging the input parameter and the output result of the target method function, the simulator is used to debug the input parameter and the output result of the target method function, the simulator intercepts other method functions called by the entry method function in the program code to be debugged by using the Aspect Oriented Programming (AOP), acquires corresponding recorded data from the preset recorded data query service system according to the trace identifier, and directly returns the recorded method result at that time without executing a real method call, thereby eliminating the dependence on other interface methods in the development environment.
Therefore, whether the entry method function and other method functions called and executed by the entry method function are problem codes or not is judged in order, and the complete debugging of the target method function of the preset service is ensured.
It should be noted that the first embodiment, the second embodiment and the technical solutions of the embodiments of the present invention may be combined, that is, the input parameters and the output results of the target method function of the preset service are recorded in the production environment, and the input parameters and the output results of the target method function of the recorded preset service are debugged in the development environment. That is, the technical solution of the flowchart of the procedure problem locating method shown in fig. 8 is formed, and similarly, the module structure diagrams of the procedure problem locating methods of the first embodiment, the second embodiment and the embodiment of the present invention are combined to form the model structure diagram of the procedure problem locating method shown in fig. 9.
According to the technical scheme of the embodiment of the invention, when the service code of the preset service in the application program is debugged, the input parameter and the output result of the target method function in the service code are obtained from the service end, and the operation problem of the preset service is checked and positioned according to the obtained input parameter and the output result of the target method function, so that the data recorded in the production environment can be reproduced into the development environment, the problems that the data needs to be manually prepared in the development environment in the prior art, the data risk of polluting normal user data or misusing by normal users or using by malicious users is caused, the prepared data can not truly reflect the real scene are solved, the data recorded in the production environment can be repeatedly used, no additional risk is generated to the production environment, and the reproduced data recorded in the production environment is utilized to debug the application program, the risk and the cost of data debugging are reduced, and the efficiency and the accuracy of troubleshooting and positioning of follow-up problem data are improved.
The following is an embodiment of the program problem locating device provided in the embodiments of the present invention, which belongs to the same inventive concept as the program problem locating methods in the embodiments described above, and reference may be made to the embodiments of the program problem locating method described above for details that are not described in detail in the embodiments of the program problem locating device.
Example four
Fig. 10 is a schematic structural diagram of a procedure problem locating device according to a fourth embodiment of the present invention, as shown in fig. 10, the device includes: an information recording module 610 and a first ranking module 620.
The information recording module 610 is configured to, in an operation process of an application program, if a trigger operation on a preset service is detected, implement a function of the preset service by executing a service code of the preset service, and record an input parameter and an output result of a target method function in the service code;
and the first troubleshooting positioning module 620 is configured to report the recorded input parameters and output results of the target method function to a server for storage, so as to perform troubleshooting positioning on the operation problems of the preset service according to the stored contents.
Optionally, the target method function includes: the entry method function of the preset service and other method functions executed by the entry method function call.
On the basis of the technical solution of the embodiment of the present invention, the information recording module 610 is specifically configured to:
writing the input parameters of the entry method function into a preset storage area by executing an input parameter recording code preset at the beginning position in the entry method function;
for each other method function called and executed by the entry method function, writing the input parameters of the other method functions into the preset storage area by executing an input parameter recording code preset at the beginning position in the other method functions, and writing the output results of the other method functions into the preset storage area by executing an operation result recording code preset at the ending position in the other method functions;
and writing the output result of the entry method function into the preset storage area by executing an operation result recording code preset at the tail position in the entry method function.
Optionally, the preset storage area is a memory area corresponding to a thread where the target method function is located.
On the basis of the technical solution of the embodiment of the present invention, the first ranking positioning module 620 is specifically configured to:
and reporting the recorded input parameters and output results of the target method function and the tracking identifier allocated to the trigger operation to a server for storage.
Optionally, the application program is a client program of an e-commerce website.
The program problem positioning device provided by the embodiment of the invention can execute the method provided by any one of the first embodiment and the second embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the program problem location device, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
EXAMPLE five
Fig. 11 is a schematic structural diagram of a program problem locating device according to a fifth embodiment of the present invention, as shown in fig. 11, the device includes: an information acquisition module 710 and a second troubleshooting positioning module 720.
The information obtaining module 710 is configured to obtain, from a server, an input parameter and an output result of a target method function in a service code when debugging the service code of a preset service in an application; wherein the input parameters and output results are recorded during an online running of the application;
and the second troubleshooting and positioning module 720 is configured to perform troubleshooting and positioning on the operation problem of the preset service according to the obtained input parameter and output result of the target method function.
Optionally, the target method function includes: the entry method function of the preset service and other method functions executed by the entry method function call.
On the basis of the technical solution of the embodiment of the present invention, the second troubleshooting positioning module 720 is specifically configured to:
inputting the acquired input parameters of the entry method function into the entry method function to trigger the execution of the service code;
taking the first other method function called and executed by the entry method function as a current method function, and outputting the acquired input parameters and output results of the current method function so as to determine whether the current method function is a problem code according to the output content; and if the trigger operation of continuing debugging is detected, taking the next other method function to be called and executed as the current method function, and returning and executing the operation of outputting the acquired input parameters and output results of the current method function.
On the basis of the technical solution of the embodiment of the present invention, the information obtaining module 710 is specifically configured to:
sending a recording information query request to a server, wherein the recording information query request comprises an input tracking identifier, so that the server calls a preset recording data query service according to the tracking identifier to obtain an input parameter and an output result of a target method function corresponding to the tracking identifier;
and receiving the input parameters and the output results of the target method function returned by the server.
The program problem positioning device provided by the embodiment of the invention can execute the method provided by the third embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the program problem location device, the included units and modules are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
EXAMPLE six
Fig. 12 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention. FIG. 12 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 12 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in FIG. 12, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 12, and commonly referred to as a "hard drive"). Although not shown in FIG. 12, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, to implement a program problem location method provided by the embodiment of the present invention, the method includes:
in the running process of an application program, if the triggering operation of a preset service is detected, the function of the preset service is realized by executing a service code of the preset service, and the input parameter and the output result of a target method function in the service code are recorded;
and reporting the recorded input parameters and output results of the target method function to a server for storage, and carrying out troubleshooting and positioning on the operation problems of the preset service according to the stored contents. And/or the presence of a gas in the gas,
when debugging a service code of a preset service in an application program, acquiring an input parameter and an output result of a target method function in the service code from a service end; wherein the input parameters and output results are recorded during an online running of the application;
and according to the obtained input parameters and output results of the target method function, checking and positioning the running problems of the preset service.
Of course, those skilled in the art will appreciate that the processor may also implement the solution of the method for determining the reserved inventory provided by any embodiment of the present invention.
EXAMPLE seven
A seventh embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for locating a program problem according to any embodiment of the present invention, where the method includes:
in the running process of an application program, if the triggering operation of a preset service is detected, the function of the preset service is realized by executing a service code of the preset service, and the input parameter and the output result of a target method function in the service code are recorded;
and reporting the recorded input parameters and output results of the target method function to a server for storage, and carrying out troubleshooting and positioning on the operation problems of the preset service according to the stored contents. And/or the presence of a gas in the gas,
when debugging a service code of a preset service in an application program, acquiring an input parameter and an output result of a target method function in the service code from a service end; wherein the input parameters and output results are recorded during an online running of the application;
and according to the obtained input parameters and output results of the target method function, checking and positioning the running problems of the preset service.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer-readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It will be understood by those skilled in the art that the modules or steps of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and optionally they may be implemented by program code executable by a computing device, such that it may be stored in a memory device and executed by a computing device, or it may be separately fabricated into various integrated circuit modules, or it may be fabricated by fabricating a plurality of modules or steps thereof into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.