[go: up one dir, main page]

CN113760696A - Program problem positioning method and device, electronic equipment and storage medium - Google Patents

Program problem positioning method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113760696A
CN113760696A CN202010628352.7A CN202010628352A CN113760696A CN 113760696 A CN113760696 A CN 113760696A CN 202010628352 A CN202010628352 A CN 202010628352A CN 113760696 A CN113760696 A CN 113760696A
Authority
CN
China
Prior art keywords
function
method function
service
preset
input parameters
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010628352.7A
Other languages
Chinese (zh)
Other versions
CN113760696B (en
Inventor
王晓烽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010628352.7A priority Critical patent/CN113760696B/en
Publication of CN113760696A publication Critical patent/CN113760696A/en
Application granted granted Critical
Publication of CN113760696B publication Critical patent/CN113760696B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Prevention of errors by analysis, debugging or testing of software
    • G06F11/362Debugging of software
    • G06F11/3644Debugging of software by instrumenting at runtime

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明实施例公开了一种程序问题定位方法、装置、电子设备和存储介质。所述方法包括:在应用程序的运行过程中,若检测到对预设服务的触发操作,则通过执行所述预设服务的服务代码来实现所述预设服务的功能,并记录所述服务代码中目标方法函数的输入参数和输出结果;将记录的所述目标方法函数的输入参数和输出结果上报给服务端进行存储,以根据存储的内容对所述预设服务的运行问题进行排查定位。通过本发明实施例的技术方案,对生产环境中出现问题时刻的流量数据进行录制,以及现场快照,并存储下来,快速提供了复现时需要的问题数据,消除了对外部服务的数据依赖,实现了对生产环境的问题进行低成本、低风险、高效、精确的定位排查的效果。

Figure 202010628352

The embodiments of the present invention disclose a method, device, electronic device and storage medium for locating a program problem. The method includes: in the running process of the application, if a triggering operation for a preset service is detected, implementing the function of the preset service by executing the service code of the preset service, and recording the service Input parameters and output results of the target method function in the code; report the recorded input parameters and output results of the target method function to the server for storage, so as to troubleshoot and locate the operation problem of the preset service according to the stored content . Through the technical solution of the embodiment of the present invention, the traffic data at the moment of the problem in the production environment is recorded, and snapshots of the scene are stored, so that the problem data required for the reproduction is quickly provided, the data dependence on external services is eliminated, and the realization of It has the effect of low-cost, low-risk, high-efficiency, and accurate positioning and troubleshooting of production environment problems.

Figure 202010628352

Description

Program problem positioning method and device, electronic equipment and storage medium
Technical Field
Embodiments of the present invention relate to computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for locating a program problem.
Background
When a problem occurs in a production environment, namely an online running environment, of a software system, the problem is usually very hidden, and the cause of the problem needs to be accurately checked and positioned so as to position a code position causing the problem.
At present, there are two main schemes for accurately troubleshooting and locating the cause of the problem, one of which is to perform individual debugging and troubleshooting by reproducing the program code in a development environment or a test environment and using a local development tool. The other method is that functional codes for realizing log printing are added in the program, and then the program is redeployed to the production environment, so that the program executes log printing operation when the production environment runs, and then a developer can perform troubleshooting positioning according to the log.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the two checking and positioning schemes have the problems of high cost, high risk, low efficiency and low accuracy.
Disclosure of Invention
The embodiment of the invention provides a program problem positioning method, a device, equipment and a storage medium, which are used for recording and storing flow data at the moment when a problem occurs in a production environment, quickly providing problem data required by reproduction, eliminating data dependence on external services and realizing the effects of low cost, low risk, high efficiency and accurate positioning and troubleshooting on the problem of the production environment.
In a first aspect, an embodiment of the present invention provides a method for locating a program problem, 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.
In a second aspect, an embodiment of the present invention further provides a method for locating a program problem, where the method includes:
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.
In a third aspect, an embodiment of the present invention further provides a program problem locating device, where the device includes:
the information recording module is used for realizing the function of the preset service by executing the service code of the preset service and recording the input parameter and the output result of the target method function in the service code if the triggering operation of the preset service is detected in the running process of the application program;
and the first investigation positioning module is used for reporting the recorded input parameters and output results of the target method function to a server for storage so as to perform investigation positioning on the operation problems of the preset service according to the stored contents.
In a fourth aspect, an embodiment of the present invention further provides a program problem locating apparatus, where the apparatus includes:
the information acquisition module is used for acquiring input parameters and output results of a target method function in a service code from a service end when the service code of a preset service in an application program is debugged; wherein the input parameters and output results are recorded during an online running of the application;
and the second troubleshooting and positioning module is used for troubleshooting and positioning the running problems of the preset service according to the acquired input parameters and output results of the target method function.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the program problem location method of any of the embodiments of the present invention.
In a sixth aspect, the embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for locating the problem according to any one of the embodiments of the present invention.
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.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings required for the embodiments or the technical solutions in the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart of a method for locating a program problem according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating an implementation of a method for locating a program problem according to an embodiment of the present invention;
FIG. 3 is a block diagram of a method for locating a program problem according to an embodiment of the present invention;
FIG. 4 is a flowchart of a program problem location method according to a second embodiment of the present invention;
FIG. 5 is a flowchart of a procedure problem locating method according to a third embodiment of the present invention;
fig. 6 is a schematic diagram of a model structure of a program problem location method according to a third embodiment of the present invention;
FIG. 7 is a flowchart illustrating an implementation of a program problem location method according to a third embodiment of the present invention;
FIG. 8 is a flowchart of a procedure problem locating method according to a third embodiment of the present invention;
FIG. 9 is a schematic diagram of a model structure of another program problem location method according to a third embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a procedure problem locating device according to a fourth embodiment of the present invention;
FIG. 11 is a schematic structural diagram of a program problem locating device according to a fifth embodiment of the present invention;
fig. 12 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention.
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.

Claims (14)

1.一种程序问题定位方法,其特征在于,包括:1. a program problem location method, is characterized in that, comprises: 在应用程序的运行过程中,若检测到对预设服务的触发操作,则通过执行所述预设服务的服务代码来实现所述预设服务的功能,并记录所述服务代码中目标方法函数的输入参数和输出结果;During the running process of the application, if a triggering 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 target method function in the service code is recorded. input parameters and output results; 将记录的所述目标方法函数的输入参数和输出结果上报给服务端进行存储,以根据存储的内容对所述预设服务的运行问题进行排查定位。The recorded input parameters and output results of the target method function are reported to the server for storage, so as to troubleshoot and locate the operation problem of the preset service according to the stored content. 2.根据权利要求1所述的方法,其特征在于,所述目标方法函数包括:所述预设服务的入口方法函数、以及所述入口方法函数调用执行的其他方法函数。2 . The method according to claim 1 , wherein the target method function comprises: an entry method function of the preset service and other method functions invoked and executed by the entry method function. 3 . 3.根据权利要求2所述的方法,其特征在于,记录所述服务代码中目标方法函数的输入参数和输出结果,包括:3. method according to claim 2, is characterized in that, recording the input parameter and output result of target method function in described service code, comprises: 通过执行预先设置在所述入口方法函数中开头位置的输入参数录制代码,将所述入口方法函数的输入参数写入预设存储区域;By executing the input parameter recording code preset at the beginning of the entry method function, the input parameter of the entry method function is written into the preset storage area; 对于所述入口方法函数调用执行的各其他方法函数,通过执行预先设置在所述其他方法函数中开头位置的输入参数录制代码,将所述其他方法函数的输入参数写入所述预设存储区域,通过执行预先设置在所述其他方法函数中结尾位置的运行结果录制代码,将所述其他方法函数的输出结果写入所述预设存储区域;For each other method function executed by the entry method function call, record the code by executing the input parameter preset at the beginning of the other method function, and write the input parameter of the other method function into the preset storage area , write the output result of the other method function into the preset storage area by executing the running result recording code preset at the end position in the other method function; 通过执行预先设置在所述入口方法函数中结尾位置的运行结果录制代码,将所述入口方法函数的输出结果写入所述预设存储区域。By executing the running result recording code preset at the end position of the entry method function, the output result of the entry method function is written into the preset storage area. 4.根据权利要求3所述的方法,其特征在于,所述预设存储区域为所述目标方法函数所在线程对应的内存区域。4 . The method according to claim 3 , wherein the preset storage area is a memory area corresponding to a thread where the target method function is located. 5 . 5.根据权利要求1所述的方法,其特征在于,将记录的所述目标方法函数的输入参数和输出结果上报给服务端进行存储,包括:5. The method according to claim 1, wherein the input parameters and the output result of the recorded target method function are reported to the server for storage, comprising: 将记录的所述目标方法函数的输入参数和输出结果、以及为所述触发操作分配的跟踪标识,上报给服务端进行存储。The recorded input parameters and output results of the target method function, and the tracking identifier allocated for the trigger operation are reported to the server for storage. 6.根据权利要求1-5中任一项所述的方法,其特征在于,所述应用程序为电商网站的客户端程序。6 . The method according to claim 1 , wherein the application program is a client program of an e-commerce website. 7 . 7.一种程序问题定位方法,其特征在于,包括:7. A method for locating program problems, comprising: 在对应用程序中预设服务的服务代码进行调试时,从服务端获取所述服务代码中目标方法函数的输入参数和输出结果;其中,所述输入参数和输出结果是在所述应用程序的线上运行过程中记录的;When debugging the service code of the preset service in the application program, the input parameters and output results of the target method function in the service code are obtained from the server; wherein, the input parameters and output results are in the application program. Recorded during online operation; 根据获取的所述目标方法函数的输入参数和输出结果,对所述预设服务的运行问题进行排查定位。According to the acquired input parameters and output results of the target method function, troubleshoot and locate the operation problem of the preset service. 8.根据权利要求7所述的方法,其特征在于,所述目标方法函数包括:所述预设服务的入口方法函数、以及所述入口方法函数调用执行的其他方法函数。8 . The method according to claim 7 , wherein the target method function comprises: an entry method function of the preset service, and other method functions invoked and executed by the entry method function. 9 . 9.根据权利要求8所述的方法,其特征在于,根据获取的所述目标方法函数的输入参数和输出结果,对所述预设服务的运行问题进行排查定位,包括:9. The method according to claim 8, characterized in that, according to the acquired input parameters and output results of the target method function, the operation problem of the preset service is checked and located, comprising: 将获取的所述入口方法函数的输入参数输入所述入口方法函数,以触发所述服务代码的执行;Input the acquired input parameters of the entry method function into the entry method function to trigger the execution of the service code; 将所述入口方法函数调用执行的第一个其他方法函数作为当前方法函数,将获取的当前方法函数的输入参数和输出结果进行输出,以根据输出内容确定当前方法函数是否是问题代码;若检测到继续调试的触发操作,则将调用执行的下一其他方法函数作为当前方法函数,并返回执行将获取的当前方法函数的输入参数和输出结果进行输出的操作。The first other method function that is called and executed by the entry method function is used as the current method function, and the obtained input parameters and output results of the current method function are output to determine whether the current method function is the problem code according to the output content; To the trigger operation of continuing debugging, the next other method function to be executed will be called as the current method function, and the operation of outputting the obtained input parameters and output results of the current method function will be returned. 10.根据权利要求7所述的方法,其特征在于,从服务端获取所述服务代码中目标方法函数的输入参数和输出结果,包括:10. The method according to claim 7, wherein obtaining the input parameters and output results of the target method function in the service code from the server, comprising: 向服务端发送录制信息查询请求,所述录制信息查询请求中包含输入的跟踪标识,以使服务端根据所述跟踪标识调用预设录制数据查询服务,获得所述跟踪标识对应的目标方法函数的输入参数和输出结果;Send a recording information query request to the server, where the recording information query request includes the input tracking identifier, so that the server calls the preset recording data query service according to the tracking identifier, and obtains the target method function corresponding to the tracking identifier. Input parameters and output results; 接收所述服务端返回的目标方法函数的输入参数和输出结果。Receive the input parameters and output results of the target method function returned by the server. 11.一种程序问题定位装置,其特征在于,包括:11. A program problem locating device, characterized in that, comprising: 信息记录模块,用于在应用程序的运行过程中,若检测到对预设服务的触发操作,则通过执行所述预设服务的服务代码来实现所述预设服务的功能,并记录所述服务代码中目标方法函数的输入参数和输出结果;The information recording module is used to realize the function of the preset service by executing the service code of the preset service if the triggering operation for the preset service is detected during the running process of the application program, and record the The input parameters and output results of the target method function in the service code; 第一排查定位模块,用于将记录的所述目标方法函数的输入参数和输出结果上报给服务端进行存储,以根据存储的内容对所述预设服务的运行问题进行排查定位。The first checking and locating module is configured to report the recorded input parameters and output results of the target method function to the server for storage, so as to check and locate the operation problem of the preset service according to the stored content. 12.一种程序问题定位装置,其特征在于,包括:12. A program problem locating device, characterized in that, comprising: 信息获取模块,用于在对应用程序中预设服务的服务代码进行调试时,从服务端获取所述服务代码中目标方法函数的输入参数和输出结果;其中,所述输入参数和输出结果是在所述应用程序的线上运行过程中记录的;The information acquisition module is used to obtain the input parameters and output results of the target method function in the service code from the server when debugging the service code of the preset service in the application program; wherein, the input parameters and output results are recorded during the online operation of the application; 第二排查定位模块,用于根据获取的所述目标方法函数的输入参数和输出结果,对所述预设服务的运行问题进行排查定位。The second checking and positioning module is used for checking and positioning the operation problem of the preset service according to the obtained input parameters and output results of the target method function. 13.一种电子设备,其特征在于,所述电子设备包括:13. An electronic device, characterized in that the electronic device comprises: 一个或多个处理器;one or more processors; 存储器,用于存储一个或多个程序;memory for storing one or more programs; 当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-6中任一所述的程序问题定位方法,和/或,权利要求7-10中任一所述的程序问题定位方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the program problem locating method according to any one of claims 1-6, and/or, The program problem location method according to any one of claims 7-10. 14.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1-6中任一所述的程序问题定位方法,和/或,权利要求7-10中任一所述的程序问题定位方法。14. A computer-readable storage medium on which a computer program is stored, characterized in that, when the program is executed by a processor, the program problem locating method according to any one of claims 1-6 is implemented, and/or, The program problem location method according to any one of claims 7-10.
CN202010628352.7A 2020-07-01 2020-07-01 A program problem locating method, device, electronic device and storage medium Active CN113760696B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010628352.7A CN113760696B (en) 2020-07-01 2020-07-01 A program problem locating method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010628352.7A CN113760696B (en) 2020-07-01 2020-07-01 A program problem locating method, device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN113760696A true CN113760696A (en) 2021-12-07
CN113760696B CN113760696B (en) 2025-02-21

Family

ID=78785462

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010628352.7A Active CN113760696B (en) 2020-07-01 2020-07-01 A program problem locating method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113760696B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826899A (en) * 2022-03-16 2022-07-29 青岛海尔科技有限公司 Debugging method and device of equipment control service, storage medium and electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030159133A1 (en) * 2001-10-26 2003-08-21 International Business Machines Corporation Method and system for tracing and displaying execution of nested functions
CN101571798A (en) * 2008-04-29 2009-11-04 环达电脑(上海)有限公司 Method for generating and using automatic test script
CN102184138A (en) * 2011-05-19 2011-09-14 广东威创视讯科技股份有限公司 Method and system for automatically reproducing and positioning software error
CN106940681A (en) * 2017-03-11 2017-07-11 郑州云海信息技术有限公司 A kind of method of utilization tracing function and analytical tool debugging storage software
CN107015896A (en) * 2017-03-31 2017-08-04 许继集团有限公司 A kind of embedded device CPU and its peripheral state method of real-time, system
CN107577594A (en) * 2017-07-12 2018-01-12 捷开通讯(深圳)有限公司 The abnormal method of record test, intelligent terminal and the device with store function
CN109815079A (en) * 2018-12-14 2019-05-28 平安普惠企业管理有限公司 Problem feedback method, device, computer equipment and storage medium
CN110069358A (en) * 2019-04-18 2019-07-30 彩讯科技股份有限公司 Call chain trace analysis method, apparatus, electronic equipment and storage medium
CN111221727A (en) * 2019-12-30 2020-06-02 瑞庭网络技术(上海)有限公司 Test method, test device, electronic equipment and computer readable medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030159133A1 (en) * 2001-10-26 2003-08-21 International Business Machines Corporation Method and system for tracing and displaying execution of nested functions
CN101571798A (en) * 2008-04-29 2009-11-04 环达电脑(上海)有限公司 Method for generating and using automatic test script
CN102184138A (en) * 2011-05-19 2011-09-14 广东威创视讯科技股份有限公司 Method and system for automatically reproducing and positioning software error
CN106940681A (en) * 2017-03-11 2017-07-11 郑州云海信息技术有限公司 A kind of method of utilization tracing function and analytical tool debugging storage software
CN107015896A (en) * 2017-03-31 2017-08-04 许继集团有限公司 A kind of embedded device CPU and its peripheral state method of real-time, system
CN107577594A (en) * 2017-07-12 2018-01-12 捷开通讯(深圳)有限公司 The abnormal method of record test, intelligent terminal and the device with store function
CN109815079A (en) * 2018-12-14 2019-05-28 平安普惠企业管理有限公司 Problem feedback method, device, computer equipment and storage medium
CN110069358A (en) * 2019-04-18 2019-07-30 彩讯科技股份有限公司 Call chain trace analysis method, apparatus, electronic equipment and storage medium
CN111221727A (en) * 2019-12-30 2020-06-02 瑞庭网络技术(上海)有限公司 Test method, test device, electronic equipment and computer readable medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
阎栋;谈鉴锋;王屏;李浩;白小龙;: "基于内核级程序快照的软件调试框架", 小型微型计算机系统, no. 10, 15 October 2013 (2013-10-15), pages 2231 - 2237 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826899A (en) * 2022-03-16 2022-07-29 青岛海尔科技有限公司 Debugging method and device of equipment control service, storage medium and electronic device
CN114826899B (en) * 2022-03-16 2024-01-23 青岛海尔科技有限公司 Debugging methods and devices, storage media and electronic devices for equipment control services

Also Published As

Publication number Publication date
CN113760696B (en) 2025-02-21

Similar Documents

Publication Publication Date Title
CN108683562B (en) Anomaly detection and positioning method, device, computer equipment and storage medium
CN108763076A (en) A kind of Software Automatic Testing Method, device, equipment and medium
CN111552633A (en) Interface abnormal call testing method and device, computer equipment and storage medium
CN109815119B (en) APP link channel testing method and device
CN113238940B (en) Interface test result comparison method, device, equipment and storage medium
CN111241111B (en) Data query method and device, data comparison method and device, medium and equipment
CN110597704B (en) Pressure test method, device, server and medium for application program
CN111198797B (en) Operation monitoring method and device and operation analysis method and device
CN113934758A (en) Vehicle fault repair method, device, vehicle terminal, server and storage medium
CN109408361A (en) Monkey tests restored method, device, electronic equipment and computer readable storage medium
CN113836014A (en) An interface testing method, device, electronic device and storage medium
CN110515758A (en) A fault location method, device, computer equipment and storage medium
CN109101412B (en) Test file generation method, test file generation device, test file testing method, test file testing device, storage medium and computer equipment
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN112162954A (en) User operation log generation method, user operation log generation device
CN113760696B (en) A program problem locating method, device, electronic device and storage medium
CN108399128A (en) A kind of generation method of user data, device, server and storage medium
CN110753136B (en) Domain name resolution method, device, equipment and storage medium
CN110750569A (en) Data extraction method, device, equipment and storage medium
CN117130946B (en) A test scenario generation method, device, electronic device and readable storage medium
CN117493113B (en) Data reporting method, device, computer equipment and storage medium
CN114218098B (en) Software system testing method, device, computer equipment and readable storage medium
CN115658519A (en) Method, device, equipment and storage medium for code testing
CN118606176A (en) Detection method, device, electronic device, medium and program product
CN116860651A (en) Automated testing methods, devices and storage media

Legal Events

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