RPA process debugging method, device, electronic device and storage medium

By recording the mapping relationship between instruction components and code line numbers in the RPA process, the problem of complexity of positioning instruction components in RPA process debugging is solved, and debugging efficiency and development efficiency are improved.

CN117520155BActive Publication Date: 2024-09-10乐麦信息技术(杭州)有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311438384.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-30
Publication Date
2024-09-10
Estimated Expiration
2043-10-30

AI Technical Summary

Technical Problem

During the RPA process debugging process, the temporarily generated Python source code and visual locator calculation logic are complex, resulting in performance loss, and the complexity of the user-developed process is uncontrollable, resulting in long Python program stack traceback information, making it difficult to quickly locate the cause of the error, reducing Development efficiency.

Method used

Record the line number mapping relationship between the instruction component in the RPA process and the code line number in the code file, use the debugger to debug the code file, and determine the instruction component based on the line number mapping relationship and the prompt message output by the debugger to facilitate coding Positioning between lines and directive components.

Benefits of technology

It improves the convenience and efficiency of RPA process debugging, simplifies the error location process, and improves development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117520155B
    Figure CN117520155B
Patent Text Reader

Abstract

The present invention provides an RPA process debugging method, device, electronic device and storage medium, which relate to the field of RPA debugging. The method comprises: obtaining an RPA process to be debugged; the RPA process includes a visualized instruction component; converting the RPA process into a code file, and recording a line number mapping relationship between the instruction component and the code line number in the code file during the conversion process; debugging the code file using a debugger, and upon receiving a prompt message returned by the debugger, determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message; the line number mapping relationship between each instruction component in the RPA process and the code line number in the code file can be recorded, so that when debugging the code using the debugger, the instruction component corresponding to the prompt message can be determined according to the line number mapping relationship and the code line number in the prompt message output by the debugger, thereby facilitating the positioning between the code line and the instruction component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of RPA debugging, and in particular to an RPA process debugging method, device, electronic device and storage medium. Background Art

[0002] To improve operational management efficiency, enterprises can introduce RPA (Robotic Process Automation) to automatically perform tasks with low repetitiveness and low added value. RPA can simulate manual operations through robot software, thereby achieving the purpose of automatically operating computers.

[0003] In the related art, during the debugging of the RPA process, on the one hand, since each debugging requires temporary generation of Python source code, and the logic of using the visual locator to calculate the next visualization block to be executed is too complicated, it leads to a certain performance loss; on the other hand, due to the uncontrollable complexity of the process developed by the user and the many scenarios, for example, if multiple layers of Try statements are used to wrap the RPA instructions, when the instructions report an error, the obtained Python program stack backtrace information is long, which is not conducive to the user to quickly locate the cause of the error, thereby reducing development efficiency. Summary of the invention

[0004] The purpose of the present invention is to provide an RPA process debugging method, device, electronic device and storage medium, which can record the line number mapping relationship between each instruction component in the RPA process and the code line number in the code file, thereby facilitating the positioning between the code line and the instruction component.

[0005] In order to solve the above technical problems, the present invention provides an RPA process debugging method, comprising:

[0006] Obtain an RPA process to be debugged; the RPA process includes a visualized instruction component;

[0007] Convert the RPA process into a code file, and record a line number mapping relationship between the instruction component and the code line number in the code file during the conversion process;

[0008] The code file is debugged using a debugger, and when a prompt message returned by the debugger is received, the instruction component corresponding to the prompt message is determined according to the line number mapping relationship and the code line number in the prompt message.

[0009] Optionally, converting the RPA process into a code file and recording a line number mapping relationship between the instruction component and the code line number in the code file during the conversion process includes:

[0010] Convert each RPA sub-process in the RPA process into a corresponding code file, and record the line number mapping relationship between the instruction component in each RPA sub-process and the code line number in each code file during the conversion process;

[0011] The code files of the RPA sub-processes are named using the process names of the RPA sub-processes, and the corresponding relationship between the mapping relationship between the process names and the line numbers of the RPA sub-processes is recorded;

[0012] The determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message includes:

[0013] Determine the corresponding target RPA sub-process and target line number mapping relationship according to the corresponding relationship and the code file name in the prompt message;

[0014] The instruction component corresponding to the prompt message is determined in the target RPA sub-process according to the target line number mapping relationship and the code line number in the prompt message.

[0015] Optionally, after determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message, the method further includes:

[0016] Adjusting the visualization interface according to the orchestration mode of the RPA process so that the instruction component corresponding to the prompt message is located in the visible area of ​​the visualization interface;

[0017] According to the prompt form corresponding to the prompt message, the prompt message is output to the corresponding instruction component.

[0018] Optionally, it also includes:

[0019] Receive input breakpoint adjustment information, and determine the instruction component to be adjusted and the adjustment status in the breakpoint adjustment information;

[0020] When it is determined that the adjustment state is to add a breakpoint, the code line number corresponding to the instruction component to be adjusted is determined according to the line number mapping relationship, and a breakpoint mapping relationship between the instruction component to be adjusted and the corresponding code line number is set;

[0021] When it is determined that the adjustment state is to delete the breakpoint, deleting the breakpoint mapping relationship corresponding to the instruction component to be adjusted;

[0022] The step of debugging the code file using a debugger includes:

[0023] Assembling a breakpoint debugging command according to the code line number contained in the breakpoint mapping relationship;

[0024] The breakpoint debugging command is sent to the debugger, so that the debugger sets a breakpoint in the code file according to the code line number in the breakpoint debugging command, and debugs the code file based on the breakpoint mode.

[0025] Optionally, the prompt message is a debugging message returned by a debugging module in the debugger;

[0026] After receiving the prompt message returned by the debugger, the method further includes:

[0027] When the instruction component corresponding to the code line number in the debug message cannot be queried according to the line number mapping relationship, determining whether the code line number in the debug message is less than the maximum code line number corresponding to the instruction component in the code file;

[0028] If yes, controlling the debugger to debug the code file based on the single-step mode;

[0029] If not, the debugger is controlled to continue debugging the code file.

[0030] Optionally, the debugging the code file using a debugger includes:

[0031] Using the execution core in the debugger to wrap the code corresponding to each of the instruction components with a Try / except statement, and using the execution core to execute the code wrapped with the Try / except statement;

[0032] Outputting the exception traceback message generated by the execution kernel when executing the code wrapped with the Try / except statement and throwing an exception to a local file.

[0033] Optionally, after determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message, the method further includes:

[0034] Determine whether the code line number in the process abnormal termination message corresponds to the instruction component in the RPA process; the prompt message includes the process abnormal termination message, and the execution kernel in the debugger generates the process abnormal termination message when determining that the RPA process is abnormally terminated;

[0035] If yes, outputting the process abnormal termination message to the corresponding instruction component;

[0036] If not, the process abnormal termination message is output in the visible area of ​​the visualization interface.

[0037] The present invention also provides an RPA process debugging device, including:

[0038] An acquisition module, used to acquire the RPA process to be debugged; the RPA process includes a visualized instruction component;

[0039] A conversion module, used to convert the RPA process into a code file, and record a line number mapping relationship between the instruction component and the code line number in the code file during the conversion process;

[0040] The debugging module is used to debug the code file using a debugger, and when receiving a prompt message returned by the debugger, determine the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message.

[0041] The present invention also provides an electronic device, comprising:

[0042] Memory for storing computer programs;

[0043] A processor is used to implement the RPA process debugging method as described above when executing the computer program.

[0044] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the RPA process debugging method as described above is implemented.

[0045] The present invention provides an RPA process debugging method, comprising: obtaining an RPA process to be debugged; the RPA process includes a visualized instruction component; converting the RPA process into a code file, and recording a line number mapping relationship between the instruction component and the code line number in the code file during the conversion process; debugging the code file using a debugger, and upon receiving a prompt message returned by the debugger, determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message.

[0046] It can be seen that the present invention can first obtain the RPA process to be debugged, wherein the RPA process includes a visualized instruction component, that is, the RPA process can be arranged in a visual arrangement manner. Subsequently, the present invention can convert the RPA process into a code file, and record the line number mapping relationship between the instruction component and the code line number in the code file during the conversion process; further, when the code file is debugged using a debugger, when receiving the prompt message returned by the debugger, the instruction component corresponding to the prompt message can be determined according to the line number mapping relationship and the code line number in the prompt message, thereby facilitating the positioning between the code line and the instruction component, and improving the debugging convenience of the RPA process. The present invention also provides an RPA process debugging device, an electronic device, and a computer-readable storage medium, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0048] Figure 1 A flowchart of an RPA process debugging method provided by an embodiment of the present invention;

[0049] Figure 2 A schematic diagram of a row number mapping relationship dictionary provided by an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of a breakpoint mapping relationship dictionary provided by an embodiment of the present invention;

[0051] Figure 4 A flowchart of a specific method for debugging RPA process orchestration provided by an embodiment of the present invention;

[0052] Figure 5 A flowchart of interruption point information debugging of a specific method for debugging RPA process orchestration provided by an embodiment of the present invention;

[0053] Figure 6 A flowchart of a specific method for debugging RPA process orchestration provided by an embodiment of the present invention;

[0054] Figure 7 A structural block diagram of an RPA process debugging device provided by an embodiment of the present invention;

[0055] Figure 8 The present invention provides a structural block diagram of an electronic device. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0057] In the related art, in the process of debugging the RPA process, on the one hand, because each debugging requires temporary generation of Python source code, and the logic of using the visual locator to calculate the next visualization block to be executed is too complicated, it leads to a certain performance loss. On the other hand, due to the uncontrollable complexity of the user's development process and the many scenarios, for example, if a multi-layer Try statement is used to wrap the RPA instruction, when the instruction reports an error, the obtained Python program stack backtrace information is long, which is not conducive to the user to quickly locate the cause of the error, reducing the development efficiency. In view of this, the present invention can provide an RPA process debugging method, which can record the line number mapping relationship between each instruction component in the RPA process and the line number of the code in the code file, so that when debugging the code using a debugger, according to the line number mapping relationship and the line number of the code in the prompt message output by the debugger, the prompt message can be output to the corresponding instruction component, thereby facilitating the positioning between the error code and the instruction component.

[0058] It should be noted that the embodiment of the present invention does not limit the type of hardware for executing the method, for example, it can be a personal computer, a server, etc., and can be set according to actual application requirements.

[0059] Please refer to Figure 1 , Figure 1 A flowchart of an RPA process debugging method provided by an embodiment of the present invention, the method may include:

[0060] S101. Obtain an RPA process to be debugged; the RPA process includes a visualized instruction component.

[0061] In an embodiment of the present invention, the RPA process can be arranged in a graphical arrangement manner, which may include one or more visual instruction components. These instruction components can be arranged in a flowchart arrangement method to obtain an RPA process, or they can be arranged in a sequence arrangement method to obtain an RPA process, so that it is convenient for users to use. In addition, the RPA process may also include multiple RPA sub-processes, each of which also includes an instruction component. The main process of the RPA process can call each RPA sub-process based on the form of an instruction component, and each RPA sub-process can also call each other based on the form of an instruction component. It should be pointed out that the debugging method for the RPA sub-process is consistent with the debugging method for the RPA process.

[0062] It should be noted that the embodiments of the present invention do not limit the specific forms of the RPA process, RPA sub-process and instruction components, and reference may be made to the relevant technologies of RPA.

[0063] S102: Convert the RPA process into a code file, and record the line number mapping relationship between the instruction component and the code line number in the code file during the conversion process.

[0064] The embodiment of the present invention can specifically convert the RPA process into a code file for debugging. The embodiment of the present invention does not limit the specific conversion method. For example, for the instruction component in the RPA process, a code template can be set in advance for each type of instruction component, and the parameters involved in the instruction component in the RPA process can be filled into the corresponding code template to form the code corresponding to the instruction component. Then, according to the arrangement order of the instruction components in the RPA process, the code sequence of each instruction component can be added to the code file, thereby completing the code file conversion. Of course, the code file can also contain other code logic related to the RPA process, which is not limited by the embodiment of the present invention.

[0065] Furthermore, to facilitate the debugging of the RPA process, the embodiment of the present invention particularly records the line number mapping relationship between the instruction component and the code line number of the code line in the code file during the code file conversion process. In other words, the embodiment of the present invention specifically determines which codes in the code file are used to implement the logic of the corresponding instruction component, and can establish a mapping relationship between these codes and the instruction component. In this way, when debugging the code file, the target instruction component corresponding to the code line currently being debugged or the code line with an error can be determined based on the line number mapping relationship, so as to facilitate the user to understand the debugging situation.

[0066] It should be noted that an instruction component may have a line number mapping relationship with one or more lines of code in a code file; in addition, a code line in a code file may have a line number mapping relationship with a certain instruction component, or may not have a line number mapping relationship with any instruction component.

[0067] It should be noted that the embodiment of the present invention does not limit the specific language type used by the code file, for example, it can be Python language. The embodiment of the present invention also does not limit the name of the code file. When only a single RPA process that does not contain multiple RPA sub-processes is debugged, the code file can have any name. When debugging an RPA process containing multiple RPA sub-processes, since each RPA sub-process needs to generate a corresponding code file, in order to facilitate determining which RPA sub-process the code file corresponds to, the code file name can also be the process name of the RPA sub-process. It should be noted that the debugging method of the RPA sub-process is consistent with the debugging method of the RPA process. Further, the embodiment of the present invention does not limit how to manage the line number mapping relationship. For example, the key-value pair recording method can be used to record the above line number mapping relationship in the form of "{lineno:uuid}", where "lineno" represents the code line number and "uuid" represents the identification information of the instruction component. It is more convenient to record the one-to-many relationship between the instruction component and the code line number in the form of a key-value pair. Furthermore, when debugging an RPA process that contains multiple RPA sub-processes, for ease of management, you can also establish a correspondence between the RPA sub-processes and the line number mapping relationship. This correspondence can also be recorded in the form of a key-value pair, in the form of "{flow:lineNodeMap}", where "flow" represents the RPA sub-process and "lineNodeMap" represents the above line number mapping relationship. Please refer to Figure 2 , Figure 2 A schematic diagram of a line number mapping relationship dictionary (flowLineMap) provided in an embodiment of the present invention.

[0068] Based on this, the RPA process is converted into a code file, and the line number mapping relationship between the instruction component and the code line number in the code file is recorded during the conversion process, which may include:

[0069] Step 11: Convert each RPA sub-process in the RPA process into a corresponding code file, and record the line number mapping relationship between the instruction components in each RPA sub-process and the code line numbers in each code file during the conversion process;

[0070] Step 12: Name the code files of each RPA sub-process using the process name of each RPA sub-process, and record the mapping relationship between each process name and the line number of each RPA sub-process.

[0071] S103: Debug the code file using a debugger, and upon receiving a prompt message returned by the debugger, determine the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message.

[0072] It should be noted that the embodiments of the present invention do not limit the implementation form of the debugger. For example, in order to debug an RPA process written in Python, the debugger may include two parts: an execution kernel and a debugging module, wherein the execution kernel is used to execute the Python statement code corresponding to the instruction component, and the debugging module is used to provide debugging functions (such as single-step debugging function and breakpoint debugging function). The debugging module can further be PDB (Python Debugger). In the actual debugging process, both the execution kernel and the debugging module can generate prompt messages, and the prompt messages generated by the execution kernel and the debugging module both include the code line number and the code file name. Obviously, since the embodiment of the present invention presets the line number mapping relationship, it is possible to quickly locate the unique instruction component in the RPA process according to the preset line number mapping relationship and the code line number in the prompt message, thereby facilitating the debugging of the RPA process.

[0073] It should also be pointed out that the embodiments of the present invention do not limit the specific form of the above-mentioned prompt message. For example, the prompt message can be output in the form of a general string, or in the form of a JSON string (JavaScript Object Notation), or in other forms, which can be set according to actual application requirements. In one possible scenario, since the debugging module can be implemented by the PDB module, the debugging module can output the prompt message in the form of a pure string in accordance with the PDB protocol; and the execution kernel can return the prompt message in the JSON format, thereby facilitating message parsing. Furthermore, when parsing different types of prompt messages, they can be parsed according to their output form. For example, the prompt message output in the form of a general string can be parsed based on a regular expression, and the prompt message output in the JSON format can be parsed based on the JSON format parsing method. Furthermore, in the process of debugging an RPA process containing multiple RPA sub-processes, since the name of the code file can be the process name of the RPA sub-process, and the prompt message also contains the code file name, the target RPA sub-process and the target line number mapping relationship corresponding to the code file name in the prompt message can be found according to the correspondence between the preset RPA sub-process name and the line number mapping relationship, and then the instruction component corresponding to the prompt message in the target RPA sub-process can be determined according to the target line number mapping relationship and the code line number in the prompt message.

[0074] Based on this, determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message may include:

[0075] Step 21: Determine the corresponding target RPA sub-process and target line number mapping relationship based on the corresponding relationship and the code file name in the prompt message;

[0076] Step 22: Determine the prompt message according to the target line number mapping relationship and the code line number in the prompt message, and determine the instruction component corresponding to the prompt message in the target RPA sub-process.

[0077] Further, after the instruction component is located, the embodiment of the present invention can output a prompt message as needed. The embodiment of the present invention does not limit the form in which the prompt message is output, and can be set according to actual application requirements. For example, the prompt message can be output to a text file, or reported to a server, or the prompt message can be visually output to the corresponding instruction component. For example, in one possible scenario, the debugging module will output a debugging message to indicate the code line it is currently debugging; and the execution kernel will output an exception backtracking message and a process abnormal termination message, wherein the execution kernel generates the instruction abnormal backtracking message when executing the code corresponding to each instruction component and throwing an exception, and generates a process abnormal termination message when determining that the RPA process is abnormally terminated. Corresponding to the debugging message, the embodiment of the present invention can highlight the instruction component corresponding to the debugging message in yellow; for the abnormal backtracking message, the embodiment of the present invention can output it to a text file, or report it to a server; for the process abnormal termination message, if it corresponds to a certain instruction component, it can be output to the corresponding instruction component, and if it does not correspond to any instruction component, the embodiment of the present invention can also output the process abnormal termination message at any position in the visual interface. Of course, various types of prompt messages may also be output in other forms, which can be set according to actual application requirements.

[0078] It is worth noting that the embodiments of the present invention can write the exception backtrace message to the local log file separately, which can not only help users locate the problem, but also prevent the loss of the exception backtrace message. For example, in the scenario where the user captures and processes the instruction exception by himself, resulting in the loss of the exception information, the present invention has further backed up the exception backtrace message to the local log file or reported it to the server, so it is convenient for the user to find it later.

[0079] Furthermore, the embodiments of the present invention do not limit the output timing of various prompt messages, and can be set according to actual application requirements. For example, a debug message can be output to the corresponding instruction component each time it is generated, so that the user can understand the instruction component currently being debugged; an abnormal backtracking message can be output when the RPA process terminates abnormally, but not when the RPA process ends normally; a process abnormal termination message can be output when the RPA process terminates abnormally. In other words, various prompt messages can set corresponding output trigger conditions, and can be output only when the output trigger conditions are met. Further, it can be understood that when the prompt message needs to be output to the corresponding instruction component, the instruction component may not be located in the visible area of ​​the designer's visual interface, so the designer's visual interface can be adjusted to output the prompt message after the instruction component corresponding to the prompt message is set in the visible area of ​​the visual interface. It should be pointed out that the adjustment of the visual interface needs to be performed according to the orchestration mode of the RPA process. For example, for the sequence orchestration mode, the method of the orchestration view instance needs to be called to move the instruction component to the visible area; for the flowchart orchestration mode, the method of the canvas instance needs to be called to scroll the instruction component to the center of the canvas.

[0080] Based on this, after determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message, the following may also be included:

[0081] Step 31: Adjust the visualization interface according to the orchestration mode of the RPA process so that the instruction component corresponding to the prompt message is located in the visible area of ​​the visualization interface;

[0082] Step 32: According to the prompt form corresponding to the prompt message, the prompt message is output to the corresponding instruction component.

[0083] Furthermore, it should be pointed out that an RPA process can contain multiple RPA sub-processes, each RPA sub-process also contains several instruction components, and these RPA sub-processes can jump to each other. In addition, when the designer opens an RPA process, it can open these multiple sub-processes at the same time, and display different RPA sub-processes on different pages. Then, when receiving the prompt message returned by the debugger, the RPA sub-process page corresponding to the prompt message may be invisible. At this time, you can first switch to the RPA sub-process page corresponding to the prompt message, and then output the prompt message to the corresponding instruction component on the page.

[0084] Furthermore, in some cases, the sub-process may have generated a corresponding code file, but the above-mentioned line number mapping relationship and corresponding relationship have not been set, resulting in failure to output a prompt message. In this case, the sub-process can be converted into a code file again, and the above-mentioned line number mapping relationship and corresponding relationship can be reset for the sub-process, and the prompt message can be output only after the above-mentioned relationships have been set.

[0085] Based on the above embodiments, the present invention can first obtain the RPA process to be debugged, wherein the RPA process includes a visual instruction component, that is, the RPA process can be displayed in a visual arrangement. Subsequently, the present invention can convert the RPA process into a code file, and record the line number mapping relationship between the instruction component and the code line number in the code file during the conversion process; further, when the code file is debugged using a debugger, when receiving a prompt message returned by the debugger, the prompt message can be output to the corresponding instruction component according to the line number mapping relationship and the code line number in the prompt message, thereby facilitating the positioning between the error code and the visual instruction component, thereby facilitating the debugging of the RPA process.

[0086] Based on the above embodiment, the breakpoint debugging method provided by the embodiment of the present invention is described in detail below. In a possible situation, the method may also include:

[0087] S201: receiving input breakpoint adjustment information, and determining the instruction component to be adjusted and the adjustment status in the breakpoint adjustment information.

[0088] It should be noted that the embodiment of the present invention does not limit the specific manner in which the user executes the breakpoint adjustment information, and may include, for example:

[0089] 1. Click the instruction component breakpoint setting area to add / delete breakpoint markers.

[0090] 2. Right-click the instruction component to add / delete breakpoint identifiers in batches.

[0091] Furthermore, when receiving the breakpoint adjustment information input by the user, it is necessary to determine the instruction component to be adjusted (uuid) and the adjustment status (status) in the breakpoint adjustment information. Of course, when debugging the RPA process, the breakpoint debugging information should also include the process name (flowName) of the sub-process.

[0092] S202: When it is determined that the adjustment state is to add a breakpoint, determine the code line number corresponding to the instruction component to be adjusted according to the line number mapping relationship, and set a breakpoint mapping relationship between the instruction component to be adjusted and the corresponding code line number.

[0093] It is worth pointing out that since the embodiment of the present invention has preset the line number mapping relationship between the instruction component and the code line, the breakpoint can be set directly on the instruction component, and according to the line number mapping relationship, the breakpoint can be further added to the corresponding code line, thereby realizing the debugging of the RPA process.

[0094] Furthermore, in order to facilitate the recording of breakpoint information, the embodiment of the present invention may also set a breakpoint mapping relationship between the instruction component to be adjusted and the corresponding code line number when adding breakpoints. The embodiment of the present invention does not limit the specific recording form of the breakpoint mapping relationship. For example, it can also be recorded in the form of a key-value pair. Furthermore, the breakpoint mapping relationship can also establish a correspondence with the RPA sub-process. This correspondence can be specifically recorded as "{flow:['lineno:uuid']}". The correspondence between each RPA sub-process and the breakpoint mapping relationship can also be saved in a dictionary. Please refer to Figure 3 , Figure 3 A schematic diagram of a breakpoint mapping relationship dictionary (BreakPoints) provided in an embodiment of the present invention.

[0095] S203: When it is determined that the adjustment state is to delete the breakpoint, the breakpoint mapping relationship corresponding to the instruction component to be adjusted is deleted.

[0096] Further, using a debugger to debug the code file may include:

[0097] S204: Assemble breakpoint debugging commands according to the code line numbers included in the breakpoint mapping relationship.

[0098] Specifically, the breakpoint debugging command can be "b(reak)[([filename:]lineno|function)]\n", where filename refers to the code file name, that is, the sub-process name.

[0099] S205: Send the breakpoint debugging command to the debugger, so that the debugger sets a breakpoint in the code file according to the code line number in the breakpoint debugging command, and debugs the code file based on the breakpoint mode.

[0100] It should be noted that the embodiments of the present invention do not limit how the debugger sets breakpoints and how to debug code files based on breakpoint modes, and reference may be made to related technologies of the debugger.

[0101] Furthermore, during the debugging process, the code line number in the debug message returned by the debugging module may not match the code line number corresponding to each instruction component. At this time, the embodiment of the present invention can also determine the debugging status of the debugger on the instruction component code according to the code line number in the debug message. Specifically, the maximum value maxLineN of the code line number corresponding to the instruction component in the RPA process can be calculated according to the line number mapping relationship (lineNodeMap). Furthermore, the size of lineno and maxLineN can be compared. If maxLineN<=lineno, it means that the process has not been executed yet, and the "c\n" command can be sent to the debugger to continue execution. Otherwise, send the "n\n" command to run in a single step.

[0102] Based on this, the prompt message is a debugging message returned by the debugging module in the debugger. After receiving the prompt message returned by the debugger, the following may also be included:

[0103] Step 31: when the instruction component corresponding to the code line number in the debug message cannot be found according to the line number mapping relationship, determine whether the code line number in the debug message is less than the maximum code line number corresponding to the instruction component in the code file; if so, proceed to step 32; if not, proceed to step 33;

[0104] Step 32: Control the debugger to debug the code file based on the single-step mode.

[0105] Step 33: Control the debugger to continue debugging the code file.

[0106] Based on the above embodiment, another debugging method provided by the embodiment of the present invention is described in detail below. In one possible situation, debugging a code file using a debugger may include:

[0107] S301, using the execution kernel in the debugger to wrap the Try / except statement for the code of each instruction component, and using the execution kernel to execute the instruction code block wrapped with the Try / except statement.

[0108] S302: Outputting the exception traceback message generated when the execution kernel executes the code wrapped with the Try / except statement and throws an exception to a local file.

[0109] To facilitate the discovery and processing of code execution errors, the execution kernel in the embodiment of the present invention can actively wrap the Try / except statement for the code of each instruction component to handle the exceptions encountered when executing the instruction component code based on the Try / except statement. The try / except statement is a common exception handling mechanism. In order to troubleshoot errors, the exception throwing logic can usually be set in the except statement to throw stack information when encountering an exception. The execution kernel will generate an exception backtracking message when executing the code wrapped with the Try / except statement and throwing an exception. The exception backtracking message can be sent to the designer through the IPC pipeline (Inter-Process Communication). Since this exception backtracking message records in detail all the corresponding error information when the code has an execution error, the embodiment of the present invention can output it to a local file, and the user can perform error location according to the exception backtracking message recorded in the file later. Of course, since the embodiment of the present invention can write the exception backtracking message to the local file separately, it can also prevent the loss of the exception backtracking message. For example, in a scenario where the user captures and processes the instruction exception by himself, resulting in the loss of exception information, the present invention has further backed up the exception traceback message to a local file, so the user can search for information from the local file, which can effectively prevent the loss of information.

[0110] Furthermore, the execution kernel can also generate a process abnormal termination message when executing the code, which is used to indicate that the RPA process encounters an abnormal termination. In other words, the execution kernel can generate two messages, wherein the execution kernel generates an exception traceback message (INSTRUCTION_TRACEBACK) when executing a code block wrapped with a Try / except statement and throwing an exception, and generates a process abnormal termination message (FINISH_WITH_WRONG) when determining that the RPA process terminates abnormally. The present invention can determine whether there is a debugging exception in the code file based on the above two messages, and whether the code line that causes the exception has a corresponding relationship with the instruction component.

[0111] The following is an introduction to the output method of the abnormal process termination message. In one possible case, after determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message, it can include:

[0112] Step 41: determine whether the code line number in the process abnormal termination message corresponds to the instruction component in the RPA process; the prompt message includes the process abnormal termination message, and the execution kernel in the debugger generates the process abnormal termination message when determining that the RPA process is abnormally terminated; if so, proceed to step 42; if not, proceed to step 43;

[0113] Step 42: Output the process abnormal termination message to the corresponding instruction component.

[0114] Step 43: Output a process abnormal termination message in the visible area of ​​the visualization interface.

[0115] Specifically, when the execution kernel determines that the RPA process execution is abnormally terminated, it can send a process abnormal termination message to the designer through the IPC pipeline. When the designer receives the process abnormal termination message, it can first parse the message to obtain the error process name flowname, error reason, error traceback, component identifier nodeId and other information. If nodeId is not empty, it means that the exception is caused by the RPA instruction. At this time, it is necessary to read the trackback information in the instruction abnormal traceback message, and then output this information to the corresponding instruction component; otherwise, the reason in the process abnormal termination message can be prompted globally.

[0116] It is worth pointing out that the traceback in the abnormal process termination message has been filtered by the execution kernel and only contains the execution stack information of the user's own developed code in the current RPA process. This is because when an exception occurs, the stack information may contain multiple contents, which is very lengthy and not conducive to parsing and analysis. Therefore, the execution kernel can filter the stack information to reduce the number of abnormal information and improve the pertinence of the abnormal information. Obviously, compared with the stack information containing multiple contents, the abnormal process termination message in this embodiment is easier to parse and read, so it can significantly improve the efficiency of locating the error code, thereby facilitating the debugging of the RPA process.

[0117] The following is a specific example to illustrate the above process, please refer to Figure 4 , Figure 4 This is a flowchart of a specific method for debugging RPA process orchestration provided by an embodiment of the present invention. The specific process is as follows:

[0118] 1. Before debugging, save the subprocess being edited, generate the corresponding Python code, and obtain the line number mapping dictionary (flowsLineMap) and the breakpoint mapping dictionary (breakPoints).

[0119] 2. When you click debug, the breakpoint mapping relationship dictionary data is traversed and assembled into a debugging command string commandText in the format of "b(reak)[([filename:]lineno|function)]\n". The designer starts the Python debugger subprocess in interactive mode and sends commandText to the subprocess before confirming the execution.

[0120] 3. The designer monitors the events of the child process. The events can be divided into data events in the standard output stream (stdout) of the child process and exit events (exit) of the child process.

[0121] In the embodiment of the present invention, corresponding operations can be performed according to different events. When the event contains a debugging message, it is necessary to stop at the breakpoint and wait for user operation. For specific execution operations, please refer to Figure 5 , Figure 5 A flowchart of interruption point information debugging of a specific method for debugging RPA process orchestration provided by an embodiment of the present invention may include:

[0122] Step 1: Receive a debugging message, and determine whether there is a breakpoint message based on the debugging message. If there is, extract the currently running RPA process based on the breakpoint message, where the breakpoint message includes the file name and file line number.

[0123] Step 2: Determine whether there is a line number mapping relationship table corresponding to the file name in the line number mapping relationship dictionary. If not, execute step 3; otherwise, execute step 4.

[0124] Step 3: Open the process page of the RPA process, receive the node-line-info message, and add the correspondence between the process and its line number mapping information to the line number mapping dictionary.

[0125] Step 4: Determine whether the page is switched to the currently debugged RPA process. If not, jump to the process page and execute step 5. If it is switched, directly execute step 5.

[0126] Step 5: Obtain the line number mapping relationship (lineMap) corresponding to the currently debugged RPA process according to flowsNodeMap, obtain the uuid of the instruction to be executed from lineMap according to lineno, and calculate the maximum value (maxLineN) of the file line number corresponding to the instruction in the sub-process according to lineMap.

[0127] Step 6: Determine whether uuid is null. If it is null, go to step 7; otherwise, go to step 8.

[0128] Step 7: Determine whether maxLineN is less than or equal to lineno. If so, it means that the subprocess has not been completed, and send a "c\n" command to the subprocess to continue execution. Otherwise, send an "n\n" command to execute single-step operation. In the embodiment of the present invention, the debugger subprocess can also be killed according to the manual termination of debugging by the user.

[0129] Step 8: Store the uuid information in the global variable debugNode, and determine whether the process orchestration mode is a sequence orchestration mode. If so, execute step 9, otherwise execute step 10.

[0130] Step 9: Highlight the instruction block component whose instruction uuid is equal to debugNode in yellow. If the instruction block is not in the view, scroll the instruction block to the visible area.

[0131] Step 10: Scroll the instruction block component whose instruction uuid is equal to debugNode to the center of the canvas and highlight the instruction block component container border in yellow.

[0132] Step 11: Wait for user operation.

[0133] Based on the above embodiment, the present invention also provides a flowchart of a specific method for debugging RPA process orchestration during runtime. Please refer to Figure 6 , Figure 6 A flowchart of a specific method for debugging RPA process orchestration provided by an embodiment of the present invention may include:

[0134] Step S401: set an exception catching method for all instructions through the debugger, wherein the exception catching method is implemented based on the try / except statement. Execute the instructions using the debugger, and receive the exception backtrace message and process abnormal termination message sent by the debugger.

[0135] In the embodiment of the present invention, a layer of try / except statement can be added to the code package corresponding to each RPA instruction, and then when the debugger subprocess determines that a certain instruction reports an error, it can send an INSTRUCTION_TRACEBACK message (exception backtrace message) to the IPC pipeline. In addition, when the process terminates abnormally, the debugger subprocess can send a FINISH_WITH_WRONG message (process abnormal termination message). Among them, the exception backtrace message and the process abnormal termination message both carry key information such as filename (file name) and lineno (file line number). It should be noted that the exception backtrace message can be output to a local file; and for the process abnormal termination message, if the corresponding non-instruction error causes the process abnormality, it is necessary to globally prompt that the process abnormal termination message carries error information, otherwise, it is necessary to parse the information corresponding to the instruction component in the process abnormal termination message, and execute subsequent steps such as step S402 to output the process abnormal termination message to the corresponding instruction component.

[0136] Step S402: extract the sub-process corresponding to the file name in the abnormal process termination message, and determine whether the file name exists in the instruction line number mapping table. If not, execute step S403; if yes, execute step S404.

[0137] Step S403: According to the sub-process, an instruction line number relationship table corresponding to the file line number and the instruction identifier is obtained, and the instruction line number relationship table is saved in the instruction line number mapping table.

[0138] Step S404: Determine whether the process page of the current debugging process has been switched. If it has been switched, execute step S405. If it has not been switched, switch to the process page and execute step S405.

[0139] Step S405: According to the file name, determine the line number mapping relationship corresponding to the file name in the line number mapping relationship dictionary, and then determine the instruction component identifier corresponding to the code line number in the line number mapping relationship according to the code line number in the process abnormal termination message, and save the instruction component identifier to the global variable.

[0140] In the embodiment of the present invention, the line number mapping relationship (lineMap) of the current error reporting process can be obtained from flowNodeMap according to filename, and then the instruction component identifier (uuid) corresponding to the error reporting code line can be obtained from lineMap according to lineno, and the error information in the abnormal process termination message is saved in a global variable (errorData), wherein the global variable can contain information such as flowname (process name), reason (reason), traceback (error traceback) and nodeId (node ​​number).

[0141] Step S406: Send a message to locate the instruction block to the cache control module, the cache control module obtains the view instance (G) of the error reporting process, and determines whether the process arrangement mode is a sequence arrangement mode. If it is a sequence arrangement mode, execute step S407, otherwise execute step S408.

[0142] Step S407: highlight the instruction block and display the instruction error traceback message in a prompt box.

[0143] In an embodiment of the present invention, the instruction block component whose instruction uuid is equal to the nodeId in errorData can be highlighted in red. If the instruction block component does not exist in the view, the instruction block component is scrolled to the visible area using the method of arranging the view instance, and an error prompt box is displayed on the instruction block. There is no restriction on the style of the highlight mark and the prompt box.

[0144] Step S408: highlight the border of the instruction block and display the instruction error traceback message in the instruction block.

[0145] In the embodiment of the present invention, the border of the instruction block component container whose uuid is equal to the nodeId in errorData is highlighted in red, the method of the canvas instance is called to scroll the instruction block component to the center of the canvas, and the error information is displayed on the instruction block, wherein there is no restriction on the style of the highlight mark.

[0146] It should be noted that in the embodiment of the present invention, if the instruction is folded when locating the instruction under debugging, it needs to be automatically expanded, and the properties of the error instruction can also be displayed on the right panel of the designer. Among them, when the RPA application is closed, all the breakpoint information of the application can be permanently stored in a local file, and when it is opened again, the breakpoint information in this file can be read first and saved in the memory.

[0147] In the embodiment of the present invention, when an error is reported, it is possible to automatically jump to a specific instruction block in any error reporting process, which is convenient for user debugging and improves development efficiency. It also implements a unified debugging method for different flow graph arrangement methods, with simple logic and high execution efficiency.

[0148] The following is an introduction to the RPA process debugging device, electronic device, and computer-readable storage medium provided in an embodiment of the present invention. The RPA process debugging device, electronic device, and computer-readable storage medium described below can be referenced to the RPA process debugging method described above.

[0149] Please refer to Figure 7 , Figure 7 This is a structural block diagram of an RPA process debugging device provided by an embodiment of the present invention, and the device may include:

[0150] The acquisition module 701 is used to acquire the RPA process to be debugged; the RPA process includes a visualized instruction component;

[0151] A conversion module 702 is used to convert the RPA process into a code file, and record the line number mapping relationship between the instruction component and the code line number in the code file during the conversion process;

[0152] The debugging module 703 is used to debug the code file using a debugger, and when receiving a prompt message returned by the debugger, determine the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message.

[0153] Optionally, the conversion module 702 may include:

[0154] The conversion submodule is used to convert each RPA sub-process in the RPA process into a corresponding code file, and record the line number mapping relationship between the instruction components in each RPA sub-process and the code line numbers in each code file during the conversion process;

[0155] The line number mapping relationship dictionary setting module is used to name the code files of each RPA sub-process using the process name of each RPA sub-process, and record the corresponding relationship between each process name and the line number mapping relationship of each RPA sub-process;

[0156] The debugging module 703 may include:

[0157] The search submodule is used to determine the corresponding target RPA sub-process and target line number mapping relationship based on the corresponding relationship and the code file name in the prompt message;

[0158] The confirmation submodule is used to determine the instruction component corresponding to the prompt message in the target RPA sub-process according to the target line number mapping relationship and the code line number in the prompt message.

[0159] Optionally, the device may further include:

[0160] An interface adjustment module, used to adjust the visual interface according to the orchestration mode of the RPA process so that the instruction component corresponding to the prompt message is located in the visible area of ​​the visual interface;

[0161] The information output module is used to output the prompt message to the corresponding instruction component according to the prompt form corresponding to the prompt message.

[0162] Optionally, the device may further include:

[0163] A breakpoint adjustment information receiving module, used to receive input breakpoint adjustment information, and determine the instruction component to be adjusted and the adjustment state in the breakpoint adjustment information;

[0164] A breakpoint adding module, for determining the code line number corresponding to the instruction component to be adjusted according to the line number mapping relationship when the adjustment state is determined to be to add a breakpoint, and setting a breakpoint mapping relationship between the instruction component to be adjusted and the corresponding code line number;

[0165] A breakpoint deletion module, used for deleting the breakpoint mapping relationship corresponding to the instruction component to be adjusted when it is determined that the adjustment state is to delete the breakpoint;

[0166] The debugging module 703 may include:

[0167] A breakpoint debugging command assembly submodule is used to assemble a breakpoint debugging command according to the code line number contained in the breakpoint mapping relationship;

[0168] The debugging submodule is used to send the breakpoint debugging command to the debugger, so that the debugger sets a breakpoint in the code file according to the code line number in the breakpoint debugging command, and debugs the code file based on the breakpoint mode.

[0169] Optionally, the prompt message is a debugging message returned by a debugging module in the debugger, and the debugging module 703 may further include:

[0170] The execution judgment module is used to judge whether the code line number in the debug message is less than the maximum code line number corresponding to the instruction component in the code file when the instruction component corresponding to the code line number in the debug message cannot be queried according to the line number mapping relationship; if so, the debugger is controlled to debug the code file based on the single-step mode.

[0171] If not, the debugger is controlled to continue debugging the code file.

[0172] Optionally, the debugging module 703 may include:

[0173] The processing submodule is used to use the execution kernel in the debugger to wrap the Try / except statement for the code corresponding to each instruction component, and use the execution kernel to execute the code wrapped with the Try / except statement.

[0174] The output submodule is used to output the exception traceback message generated by the execution kernel when executing the code wrapped with the Try / except statement and throwing an exception to a local file.

[0175] Optionally,

[0176] The debugging module 703 may include:

[0177] The judgment submodule is used to judge whether the code line number in the process abnormal termination message corresponds to the instruction component in the RPA process; the prompt message includes the process abnormal termination message, and the execution kernel in the debugger generates the process abnormal termination message when determining that the RPA process is abnormally terminated;

[0178] A first output submodule, configured to output a process abnormal termination message to a corresponding instruction component if yes;

[0179] The second output submodule is used to output a process abnormal termination message in the visible area of ​​the visualization interface if no.

[0180] Please refer to Figure 8 , Figure 8 This is a structural block diagram of an electronic device provided by an embodiment of the present invention, the device comprising:

[0181] A memory 10, used for storing computer programs;

[0182] The processor 20 is used to implement the above-mentioned RPA process debugging method when executing the computer program.

[0183] like Figure 8, which is a schematic diagram of the structure of an electronic device, may include: a memory 10 , a processor 20 , a communication interface 31 , an input / output interface 32 , and a communication bus 33 .

[0184] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present application, the memory 10 may store programs for implementing the following functions:

[0185] Obtain an RPA process to be debugged; the RPA process includes a visualized instruction component;

[0186] Convert the RPA process into a code file, and record a line number mapping relationship between the instruction component and the code line number in the code file during the conversion process;

[0187] The code file is debugged using a debugger, and when a prompt message returned by the debugger is received, the instruction component corresponding to the prompt message is determined according to the line number mapping relationship and the code line number in the prompt message.

[0188] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0189] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.

[0190] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .

[0191] The communication interface 31 may be an interface for connecting to other devices or systems.

[0192] The input / output interface 32 may be an interface for acquiring external input data or outputting data to the outside world.

[0193] Of course, it should be noted that Figure 3 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Figure 3 More or fewer components than shown, or combinations of certain components.

[0194] An embodiment of the present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the above-mentioned RPA process debugging method is implemented, for example, the RPA process to be debugged can be obtained; the RPA process includes a visualized instruction component; the RPA process is converted into a code file, and the line number mapping relationship between the instruction component and the code line number in the code file is recorded during the conversion process; the code file is debugged using a debugger, and when a prompt message returned by the debugger is received, the instruction component corresponding to the prompt message is determined according to the line number mapping relationship and the code line number in the prompt message.

[0195] Since the embodiment of the computer-readable storage medium part is similar to the embodiment of the above-mentioned RPA process debugging method, the embodiment of the computer-readable storage medium part can refer to the above-mentioned embodiment and will not be repeated here.

[0196] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0197] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0198] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0199] The above is a detailed introduction to an RPA process debugging method, device, electronic device and storage medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method and core ideas of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. An RPA process debugging method, characterized in that: include: Obtain an RPA process to be debugged; the RPA process includes a visualized instruction component; Convert the RPA process into a code file, and record a line number mapping relationship between the instruction component and the code line number in the code file during the conversion process; Debugging the code file using a debugger, and upon receiving a prompt message returned by the debugger, determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message; The converting the RPA process into a code file, and recording the line number mapping relationship between the instruction component and the code line number in the code file during the conversion process, includes: Convert each RPA sub-process in the RPA process into a corresponding code file, and record the line number mapping relationship between the instruction component in each RPA sub-process and the code line number in each code file during the conversion process; The code files of each RPA sub-process are named using the process names of the RPA sub-processes, and the correspondence between the process names and the line number mappings of each RPA sub-process is recorded; the correspondence is used to find the target RPA sub-process and target line number mapping corresponding to the code file name in the prompt message.

2. The RPA process debugging method according to claim 1, characterized in that: The determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message includes: Determine the corresponding target RPA sub-process and target line number mapping relationship according to the corresponding relationship and the code file name in the prompt message; The instruction component corresponding to the prompt message is determined in the target RPA sub-process according to the target line number mapping relationship and the code line number in the prompt message.

3. The RPA process debugging method according to claim 1, characterized in that: After determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message, the method further includes: Adjusting the visualization interface according to the orchestration mode of the RPA process so that the instruction component corresponding to the prompt message is located in the visible area of ​​the visualization interface; According to the prompt form corresponding to the prompt message, the prompt message is output to the corresponding instruction component.

4. The RPA process debugging method according to claim 1, characterized in that: Also includes: Receive input breakpoint adjustment information, and determine the instruction component to be adjusted and the adjustment status in the breakpoint adjustment information; When it is determined that the adjustment state is to add a breakpoint, the code line number corresponding to the instruction component to be adjusted is determined according to the line number mapping relationship, and a breakpoint mapping relationship between the instruction component to be adjusted and the corresponding code line number is set; When it is determined that the adjustment state is to delete the breakpoint, deleting the breakpoint mapping relationship corresponding to the instruction component to be adjusted; The step of debugging the code file using a debugger includes: Assembling a breakpoint debugging command according to the code line number contained in the breakpoint mapping relationship; The breakpoint debugging command is sent to the debugger, so that the debugger sets a breakpoint in the code file according to the code line number in the breakpoint debugging command, and debugs the code file based on the breakpoint mode.

5. The RPA process debugging method according to claim 4, characterized in that: The prompt message includes a debugging message returned by the debugging module in the debugger; After receiving the prompt message returned by the debugger, the method further includes: When the instruction component corresponding to the code line number in the debug message cannot be queried according to the line number mapping relationship, determining whether the code line number in the debug message is less than the maximum code line number corresponding to the instruction component in the code file; If yes, controlling the debugger to debug the code file based on the single-step mode; If not, the debugger is controlled to continue debugging the code file.

6. The RPA process debugging method according to claim 1, characterized in that: The step of debugging the code file using a debugger includes: Using the execution kernel in the debugger to wrap the code corresponding to each of the instruction components with a Try / except statement, and using the execution kernel to execute the code wrapped with the Try / except statement; Outputting the exception traceback message generated by the execution kernel when executing the code wrapped with the Try / except statement and throwing an exception to a local file.

7. The RPA process debugging method according to claim 1, characterized in that: After determining the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message, the method further includes: Determine whether the code line number in the process abnormal termination message corresponds to the instruction component in the RPA process; the prompt message includes the process abnormal termination message, and the execution kernel in the debugger generates the process abnormal termination message when determining that the RPA process is abnormally terminated; If yes, outputting the process abnormal termination message to the corresponding instruction component; If not, the process abnormal termination message is output in the visible area of ​​the visualization interface.

8. An RPA process debugging device, characterized in that: include: An acquisition module, used to acquire the RPA process to be debugged; the RPA process includes a visualized instruction component; A conversion module, used to convert the RPA process into a code file, and record a line number mapping relationship between the instruction component and the code line number in the code file during the conversion process; A debugging module, used to debug the code file using a debugger, and upon receiving a prompt message returned by the debugger, determine the instruction component corresponding to the prompt message according to the line number mapping relationship and the code line number in the prompt message; The conversion module comprises: A conversion submodule, used to convert each RPA sub-process in the RPA process into a corresponding code file, and record a line number mapping relationship between an instruction component in each RPA sub-process and a code line number in each code file during the conversion process; A line number mapping relationship dictionary setting module is used to name the code files of each RPA sub-process using the process name of each RPA sub-process, and record the correspondence between each process name and the line number mapping relationship of each RPA sub-process; the correspondence is used to find the target RPA sub-process and target line number mapping relationship corresponding to the code file name in the prompt message.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the RPA process debugging method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the RPA process debugging method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Data conversion method and multi-port transponder

    CN110262984A

  • Program debugging method and device, equipment and medium

    CN114398290A

  • Control method for realizing IA process editing interface based on RPA and AI

    CN115098205A

  • Debugging method of automatic process, electronic equipment and storage medium

    CN115481021A

  • Code injection for conditional breakpoints

    US20160299828A1