WO2023044879A1 - 应用程序监控方法、装置及可读存储介质 - Google Patents

应用程序监控方法、装置及可读存储介质 Download PDF

Info

Publication number
WO2023044879A1
WO2023044879A1 PCT/CN2021/120802 CN2021120802W WO2023044879A1 WO 2023044879 A1 WO2023044879 A1 WO 2023044879A1 CN 2021120802 W CN2021120802 W CN 2021120802W WO 2023044879 A1 WO2023044879 A1 WO 2023044879A1
Authority
WO
WIPO (PCT)
Prior art keywords
function block
interface
event port
user
input
Prior art date
Application number
PCT/CN2021/120802
Other languages
English (en)
French (fr)
Inventor
金鑫
廖亮
Original Assignee
西门子(中国)有限公司
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 西门子(中国)有限公司 filed Critical 西门子(中国)有限公司
Priority to CN202180101895.6A priority Critical patent/CN117940907A/zh
Priority to PCT/CN2021/120802 priority patent/WO2023044879A1/zh
Publication of WO2023044879A1 publication Critical patent/WO2023044879A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software

Definitions

  • the present application relates to the field of application program technology, in particular to an application program monitoring method, device and readable storage medium.
  • the embodiment of the present application proposes an application program monitoring method on the one hand, and an application program monitoring device on the other hand.
  • Other aspects of the present application also provide non-transitory computer-readable storage media, electronic equipment, and computer program products, so as to Improve application monitoring efficiency.
  • an application monitoring method includes:
  • the first function block In response to a function block call request input by the user carrying the name of the first function block, the first function block is searched from the function block library and displayed on the interface, and the displayed content includes at least: the name of the first function block and The name of each event port contained in the first function block; wherein, the first function block is any function block contained in the first application program to be designed by the user;
  • the code of the first function block is found in the function block library, the first event port is found in the code, and the Adding a breakpoint flag at the first event port; wherein, the first event port is any event port of the first function block;
  • the name of the first data parameter, the name of the first event port and the name of the first function block are used as A monitoring parameter table item is added to the monitoring parameter table;
  • the code of each function block is found in the function block library, and according to the found code and each function block Execution sequence relationship between blocks, run the code of each function block;
  • the setting of breakpoints and monitoring parameters in the application program is realized through graphical tools, which has strong visualization, simple operation, and no need to view codes, so that setting breakpoints and monitoring parameters in the application program can be completed without rich programming experience. parameters, thus improving monitoring/debugging efficiency.
  • the response to the breakpoint setting request input by the user on the interface for the first event port of the first function block includes:
  • Breakpoint setting request It is detected that the user has clicked the breakpoint tool on the interface, and it is detected that the user has clicked the first event port of the first function block on the interface, then it is determined that the user has input the command for the first event port of the first function block on the interface. Breakpoint setting request.
  • the response to the monitoring parameter setting request input by the user on the interface for the first data parameter of the input or output of the first event port includes:
  • a monitor parameter setting request for the first data parameter It is detected that the user selects the first data parameter of the input or output of the first event port of the first function block on the interface, and then it is determined that the user has input the input or output of the first event port of the first function block on the interface.
  • a monitor parameter setting request for the first data parameter It is detected that the user selects the first data parameter of the input or output of the first event port of the first function block on the interface, and then it is determined that the user has input the input or output of the first event port of the first function block on the interface.
  • the monitoring parameter setting request of the output first data parameter includes:
  • a monitoring parameter search box is displayed on the interface
  • the name of each event port where the first data parameter is located and the name of the function block where each event port is located are displayed on the interface;
  • adding a breakpoint flag at the first event port further includes: setting the state of the first event port as unnotified on the interface;
  • the code of suspending the operation of the first function block further includes: setting the state of the event port where the detected breakpoint flag is located on the interface to: in notification;
  • the state of the event port where the detected breakpoint flag is located is set to: notified on the interface.
  • an application program monitoring device which includes:
  • the function block calling module is configured to search for the first function block from the function block library and display the first function block on the interface in response to the function block call request input by the user carrying the name of the first function block, and the display content at least includes: The name of the first function block and the names of the various event ports contained in the first function block; wherein, the first function block is any function block contained in the first application program to be designed by the user;
  • the breakpoint and monitoring parameter setting module is used to respond to the breakpoint setting request input by the user on the interface for the first event port of the first function block, and find the code of the first function block in the function block library.
  • the first event port is found in the code, and a breakpoint flag is added at the first event port; wherein, the first event port is any event port of the first function block; in response to user input on the interface for the first event port
  • the monitoring parameter setting request of the input or output first data parameter, the name of the first data parameter, the name of the first event port and the name of the first function block are added to the monitoring parameter table as a monitoring parameter table item;
  • the operation and monitoring module is used to respond to the first application program running request input by the user, according to the name of each function block contained in the first application program displayed on the interface, to find the code of each function block in the function block library, according to The searched code and the execution sequence relationship between each function block, run the code of each function block; and, when running the first function block, query the monitoring parameters of the first function block in the monitoring parameter table, if found, Then, during the running process, the value of the monitoring parameter is acquired, and when a breakpoint flag is detected, the code of the first function block is suspended and the current value of the monitoring parameter is displayed on the interface.
  • a non-transitory computer-readable storage medium stores instructions, and it is characterized in that, when executed by a processor, the instructions cause the processor to perform any of the above The steps of the application program monitoring method.
  • an electronic device including: a processor and a memory, the memory stores a computer program that can run on the processor, and when the processor executes the computer program, any of the above The steps of the application monitoring method described in the item.
  • a computer program product including a computer program or an instruction, and when the computer program or instruction is executed by a processor, the steps of the application program monitoring method described in any one of the above items are implemented.
  • Fig. 1 is an example diagram of marking debugging parameters in an existing computer program
  • FIG. 2 is a flow chart of the application program monitoring method provided in the first embodiment of the present application
  • FIG. 3 is a flow chart of the application program monitoring method provided in the second embodiment of the present application.
  • Fig. 4 is an example diagram 1 of the interface of the application program editor
  • Figure 5 is the second example of the interface of the application program editor
  • Fig. 6 is the interface example Fig. 3 of the application program editor
  • Fig. 7 is the interface example Fig. 4 of the application program editor
  • Figure 8 is the fifth example of the interface of the application program editor
  • Figure 9 is an example figure 6 of the interface of the application program editor
  • Figure 10 is the seventh example of the interface of the application program editor
  • FIG. 11 is a schematic structural diagram of an application program monitoring device provided by an embodiment of the present application.
  • FIG. 12 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • step 51 breakpoint tool 81 run tool 111 function block call module 112 Output-Input Relationship Building Module 113 Breakpoint and monitoring parameter setting module 114 Operation and Monitoring Module 121 processor 122 memory 123 power supply 124 I/O unit
  • FIG. 2 is a flow chart of the application program monitoring method provided in the first embodiment of the present application, and its specific steps are as follows:
  • Step S201 In response to the function block call request input by the user carrying the name of the first function block, search for the first function block from the function block library and display the first function block on the interface, the displayed content at least includes: the first function block and the name of each event port included in the first function block; wherein, the first function block is any function block included in the first application program to be designed by the user.
  • the execution sequence relationship between the first function block and the second function block displayed on the interface set by the user in response to the execution sequence relationship between the first function block and the second function block displayed on the interface set by the user, the execution sequence relationship between the first function block and the second function block is saved.
  • the first function block and the second function block are any two function blocks included in the first application program.
  • Step S202 In response to the breakpoint setting request input by the user on the interface for the first event port of the first function block, the code of the first function block is found in the function block library, and the first event is found in the code port, adding a breakpoint flag at the first event port; wherein, the first event port is any event port of the first function block.
  • Step S203 In response to the monitoring parameter setting request of the first data parameter for the input or output of the first event port of the first function block input by the user on the interface, set the name of the first data parameter, the name of the first event port and the name of the first function block are added to the monitoring parameter table as a monitoring parameter table item.
  • Step S204 In response to the first application program running request input by the user, according to the name of each function block contained in the first application program displayed on the interface, find the code of each function block in the function block library, and according to the found code And the execution sequence relationship between each function block, run the code of each function block; and, when running the first function block, query the monitoring parameters of the first function block in the monitoring parameter table, if found, then in the running process , obtain the value of the monitoring parameter, and when a breakpoint flag is detected, the code of the first function block is suspended and the current value of the monitoring parameter is displayed on the interface.
  • the setting of breakpoints and monitoring parameters in the application program is realized through graphical tools, which has strong visualization, simple operation, and no need to view codes, so that setting breakpoints and monitoring parameters in the application program can be completed without rich programming experience. parameters, thus improving monitoring/debugging efficiency.
  • step S202 in response to the breakpoint setting request input by the user on the interface for the first event port of the first function block, including:
  • Breakpoint setting request It is detected that the user has clicked the breakpoint tool on the interface, and it is detected that the user has clicked the first event port of the first function block on the interface, then it is determined that the user has input the command for the first event port of the first function block on the interface. Breakpoint setting request.
  • step S203 in response to the monitoring parameter setting request input by the user on the interface for the first data parameter of the input or output of the first event port of the first function block, including:
  • the code of the first function block is searched in the function block library, and the code of the first event port is searched in the code. All data parameters input or output are displayed on the interface;
  • a monitor parameter setting request for the first data parameter It is detected that the user selects the first data parameter of the input or output of the first event port of the first function block on the interface, and then it is determined that the user has input the input or output of the first event port of the first function block on the interface.
  • a monitor parameter setting request for the first data parameter It is detected that the user selects the first data parameter of the input or output of the first event port of the first function block on the interface, and then it is determined that the user has input the input or output of the first event port of the first function block on the interface.
  • step S202 in response to the breakpoint setting request input by the user on the interface for the first event port of the first function block, and in step 203, in response to the input by the user on the interface for The monitoring parameter setting request of the first data parameter input or output of the first event port of the first function block includes:
  • a monitoring parameter search box is displayed on the interface
  • the name of each event port where the first data parameter is located and the name of the function block where each event port is located are displayed on the interface;
  • step S204 after suspending the running of the code of the first function block, the method further includes: responding to a request to continue running inputted by the user on the interface, continuing to run subsequent codes.
  • step S202 adding a breakpoint flag at the first event port further includes: setting the state of the first event port as unnotified on the interface;
  • suspending the operation of the code of the first function block further includes: setting the state of the event port where the detected breakpoint flag is located on the interface to: in notification;
  • the state of the event port where the detected breakpoint flag is located is set to: notified on the interface.
  • FIG. 3 is a flow chart of the application program monitoring method provided in the second embodiment of the present application, and its specific steps are as follows:
  • Step S301 The application program editor receives the function block call request with the name of the first function block input by the user on the interface, searches for the first function block from the function block library (FB Library, Function Block Library), and displays the first function block on the interface Displaying the first function block, the displayed content at least includes: the name of the first function block and the name of each event port contained in the first function block; wherein, the first function block is any function block.
  • the function block library FB Library, Function Block Library
  • Fig. 4 is an example diagram 1 of the interface of the application program editor. As shown in Fig. 4, the original code of each function block used to realize various functions is stored in the function block library. Users can design the application program with the functions they want by calling the function blocks in the function block library. For example: in Fig. 4, the user wants to design an application program, and the application program needs four function blocks A, B, C, and D to complete, and the user calls the function blocks A, B, C, and D from the function block library.
  • the event ports include: a start event port, an error event port, a screw-driving event port, and an end event port.
  • Step S302 The application program editor detects that the user has set an execution order relationship between the first function block and the second function block displayed on the interface, and saves the execution order relationship between the first function block and the second function block;
  • the first function block and the second function block are any two function blocks included in the first application program.
  • the first function block is function block A
  • the second function block is function block B.
  • Step S303 The application editor detects that the user clicks the breakpoint tool on the tool bar of the interface, and then highlights all event ports of all function blocks displayed on the interface.
  • Step S304 The application program editor detects that the user has input a display request for the data parameter list input or output of the first event port of the first function block, and finds the input of the first event port of the first function block in the function block library The names of all data parameters input or output by the first event port of the first function block are displayed in a list on the interface.
  • Step S305 The application program editor detects that the user has selected the first event port of the first function block, then finds the code of the first function block in the function block library, finds the first event port in the code, and finds the first event port in the function block library. Add a breakpoint flag to an event port.
  • first event port For example: if the first event port is the start event port, add a breakpoint mark at the beginning of the code of the first function block; if the first event port is the end event port, then add a breakpoint mark at the end of the code of the first function block If the first event port is an error event port, add a breakpoint mark at the position where the error event is generated in the code; Add breakpoint marks at positions 1 to 3 of screwing events.
  • Fig. 7 shows an interface example diagram of adding a breakpoint flag at the screw-tightening 1 event port in the code of function block C.
  • Step S306 The application program editor detects that the user selects the name of the first data parameter in the name list of the data parameters input or output by the first event port of the first function block displayed on the interface, and the name of the first data parameter is set to The name, the name of the first event port and the name of the first function block are added as a monitoring parameter table item to the monitoring parameter table maintained by itself.
  • the user selects the name of data parameter 2 of the end event port of function block A; in FIG. 7 , the user selects the name of data parameter 1 of the screw-tightening 1 event port of function block C.
  • Step S307 The application program editor receives the running request for the first application program, and determines according to the names of the function blocks contained in the first application program displayed on the interface and the saved execution sequence relationship between the function blocks.
  • the running sequence of each function block according to the running sequence of each function block, find the code of each function block in the function block library in turn, and run each function in turn according to the code of each function block and the execution sequence relationship between each function block block code; and, when a function block is to be run, first query the monitoring parameter table maintained by itself, and query all monitoring data parameters of the function block in the table. If found, the real-time acquisition of the For each monitoring data parameter value of the function block, when a breakpoint flag is detected, the code of the function block is suspended, and the current value of each monitoring parameter is displayed on the interface.
  • a continue button When the operation is paused, a continue button will be displayed at the corresponding event port of the function block on the interface, and if it is detected that the user clicks the button, the operation will continue. As shown in FIG. 8 , a continue button is displayed below the screw-tightening 1 event port of function block C.
  • the application editor when the application editor detects that the user clicks the breakpoint tool on the tool bar of the interface, it can further display a monitoring parameter search box on the interface, and when it detects that the user enters the name of a data parameter in the search box , according to the names of all function blocks displayed on the interface, search for the code of each function block in the function block library, and search for the data parameter in the code of each function block, if found, then according to the search result, the The name of the data parameter is combined with the name of each event port where the data parameter is located and the name of the function block where each event port is located, and each combination is displayed in the drop-down box of the search box as a table item (that is, each An entry includes: the name of the data parameter, the name of an event port where the data parameter is located, and the name of the function block where the event port is located);
  • the speed data parameters are searched in the codes of function blocks A to D, and the search results show that the output data parameters of the end event port of function block A contain speed data parameter, the output data parameter of the end event port of function block D also includes the speed data parameter, then two search result items will be displayed in the drop-down box of the search box: speed: end event, function block A; speed: end event, function block D.
  • speed: end event, function block A table item all data parameters output by the end event port of function block A are displayed below the end event port of function block A, and the speed is highlighted.
  • FIG. 10 is an example diagram of the interface of the application editor after the setting of breakpoints and monitoring parameters is completed through FIG. 9 .
  • an event port with a breakpoint flag set three states can be set for it: not notified, notifying and notified.
  • the default state of the event port with a breakpoint flag is not notified, which means that the monitoring parameter value at the port has not been displayed to the user; when the code runs to an event port and starts to pause, the event port will be displayed on the interface The status of the event port is changed from unread to notifying, indicating that the monitoring parameter value is being displayed to the user; when the pause state ends and the code continues to run, the status of the event port is changed to notified, indicating that the monitoring parameter value of the event port has been Notify the user.
  • FIG. 11 is a schematic structural diagram of an application program monitoring device 110 provided by an embodiment of the present application.
  • the device 110 mainly includes:
  • the function block calling module 111 is configured to search for the first function block from the function block library and display the first function block on the interface in response to the function block call request input by the user carrying the name of the first function block, and the display content includes at least : the name of the first function block and the names of each event port included in the first function block; wherein, the first function block is any function block included in the first application program to be designed by the user.
  • the breakpoint and monitoring parameter setting module 112 is used to respond to the breakpoint setting request of the first event port of the first function block input by the user on the interface, and find the code of the first function block in the function block library.
  • the first event port is found in the code, and a breakpoint flag is added at the first event port; wherein, the first event port is any event port of the first function block; in response to user input on the interface for the first function
  • the monitoring parameter setting request of the first data parameter input or output of the first event port of the block, the name of the first data parameter, the name of the first event port and the name of the first function block are added as a monitoring parameter entry to in the monitoring parameter table.
  • the running and monitoring module 113 is configured to respond to the first application running request input by the user, and to find the code of each function block in the function block library according to the names of the function blocks contained in the first application displayed on the interface, Run the codes of each function block according to the searched code and the execution sequence relationship between each function block; and, when running the first function block, query the monitoring parameters of the first function block in the monitoring parameter table, if , then during the running process, the value of the monitoring parameter is obtained, and when a breakpoint flag is detected, the code of the first function block is suspended and the current value of the monitoring parameter is displayed on the interface.
  • the application program monitoring device further includes: an output-input relationship establishment module 114, configured to save the first function block and the second function block in response to the execution order relationship set by the user on the interface.
  • Execution sequence relationship between a function block and a second function block; the first function block and the second function block are any two function blocks included in the first application program.
  • the breakpoint and monitoring parameter setting module 112 responds to the breakpoint setting request for the first event port of the first function block input by the user on the interface, including:
  • Breakpoint setting request It is detected that the user has clicked the breakpoint tool on the interface, and it is detected that the user has clicked the first event port of the first function block on the interface, then it is determined that the user has input the command for the first event port of the first function block on the interface. Breakpoint setting request.
  • the breakpoint and monitoring parameter setting module 112 responds to the monitoring parameter setting request of the first data parameter of the input or output of the first event port of the first function block input by the user on the interface, including:
  • a monitor parameter setting request for the first data parameter It is detected that the user selects the first data parameter of the input or output of the first event port of the first function block on the interface, and then it is determined that the user has input the input or output of the first event port of the first function block on the interface.
  • a monitor parameter setting request for the first data parameter It is detected that the user selects the first data parameter of the input or output of the first event port of the first function block on the interface, and then it is determined that the user has input the input or output of the first event port of the first function block on the interface.
  • the breakpoint and monitoring parameter setting module 112 responds to a breakpoint setting request input by the user on the interface for the first event port of the first function block, and in response to a user input on the interface for The monitoring parameter setting request of the first data parameter input or output of the first event port of the first function block includes:
  • a monitoring parameter search box is displayed on the interface
  • the name of each event port where the first data parameter is located and the name of the function block where each event port is located are displayed on the interface;
  • the running and monitoring module 113 after the running and monitoring module 113 suspends running the code of the first function block, it further includes: responding to a request for continuing to run input by the user on the interface, continuing to run subsequent codes.
  • the breakpoint and monitoring parameter setting module 112 adds a breakpoint flag at the first event port, further comprising: setting the status of the first event port on the interface as unnotified;
  • the operation and monitoring module 113 suspends the code of the first function block, and further includes: setting the state of the event port where the detected breakpoint mark is located on the interface to: in notification;
  • the running and monitoring module 113 sets the status of the event port where the detected breakpoint flag is located as: notified on the interface.
  • the embodiment of the present application also provides a computer-readable storage medium, where the computer-readable storage medium stores instructions, and when the instructions are executed by a processor, the steps in the above application program monitoring method can be executed.
  • the computer-readable medium may be included in each device/device/system of the above-mentioned embodiments, or may exist independently without being assembled into the device/device/system.
  • instructions are stored in the computer-readable storage medium, and the stored instructions can execute the steps in the above application program monitoring method when executed by the processor.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as may include but not limited to: portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM) ), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above, but not used to limit this application scope of protection.
  • a computer-readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in combination with an instruction execution system, apparatus or device.
  • An embodiment of the present application further provides a computer program product, including a computer program or an instruction.
  • a computer program product including a computer program or an instruction.
  • the embodiment of the present application also provides an electronic device.
  • Figure 12 shows a schematic structural diagram of the electronic device involved in the embodiment of the present application, specifically:
  • the electronic device may include a processor 121 of one or more processing cores, a memory 122 of one or more computer-readable storage media, and a computer program stored on the memory and executable on the processor.
  • a processor 121 of one or more processing cores a processor 121 of one or more processing cores
  • a memory 122 of one or more computer-readable storage media a computer program stored on the memory and executable on the processor.
  • the electronic device may further include components such as a power supply 123 and an input and output unit 124 .
  • components such as a power supply 123 and an input and output unit 124 .
  • the structure of the electronic device shown in Figure 12 does not constitute a limitation to the electronic device, and may include more or less components than shown in the illustration, or combine some components, or different components layout. in:
  • the processor 121 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device, by running or executing software programs and/or modules stored in the memory 122, and calling Data, perform various functions of the server and process data, so as to monitor the electronic equipment as a whole.
  • the memory 122 can be used to store software programs and modules, that is, the above-mentioned computer-readable storage medium.
  • the processor 121 executes various functional applications and data processing by executing software programs and modules stored in the memory 122 .
  • the memory 122 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function, etc.; the data storage area may store data created according to the use of the server, and the like.
  • the memory 122 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
  • the memory 122 may further include a memory controller to provide the processor 121 with access to the memory 122 .
  • the electronic device also includes a power supply 123 for supplying power to various components, which can be logically connected to the processor 121 through the power management system, so that functions such as charging, discharging, and power consumption management can be realized through the power management system.
  • the power supply 123 may also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
  • the electronic device may also include an input/output unit 124, the input unit output 124 may be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • the input unit output 124 can also be used to display information input by the user or provided to the user, as well as various graphical user interfaces. These graphical user interfaces can be composed of graphics, text, icons, videos and any combination thereof.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that includes one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the different figures. For example, two blocks shown connected in series may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block in the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a A combination of dedicated hardware and computer instructions.

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

本申请实施例公开了应用程序监控方法、装置及可读存储介质。方法包括:响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,在功能块库中查找第一功能块的代码,在代码的第一事件端口处添加断点标志;响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,将第一数据参数的名称、第一事件端口的名称和第一功能块的名称作为一条监控参数表项添加到监控参数表中;响应于用户输入的第一应用程序运行请求,当运行第一功能块时,在监控参数表中查询第一功能块的监控参数,在检测到断点标志时,暂停运行第一功能块的代码并将监控参数的当前值显示在界面上。本申请实施例提高了应用程序监控效率。

Description

应用程序监控方法、装置及可读存储介质 技术领域
本申请涉及应用程序技术领域,特别是应用程序监控方法、装置及可读存储介质。
背景技术
目前,当需要对包括机器人生产线在内的各种自动化生产线进行维护和升级时,由于工艺和设备工程师缺乏自动化程序的编程经验,他们通常依靠系统集成商(SI)的编程工程师完成这项工作,很难自行维护和升级。
另外,在自动化软件或电子硬件开始使用前,需要对实现自动化软件的计算机程序或者用于控制电子硬件的计算机程序进行调试。通过调试来查找和减少计算机程序中的错误或缺陷,从而使其按预期运行。由于需要用户阅读并理解计算机程序的编程语言,调试过程很耗时。
对于用户来说,当计算机程序使用多种编程语言时,调试往往会更加困难,并且其中一种编程语言的变化可能会导致另一种编程语言出现错误。
使用调试过程来监控和提高计算机程序的效率,通常需要自动化工程师了解编程语言,并在其中标记调试参数,从而在调试过程中读取调试参数值,以判断程序是否在按预期运行,如图1所示,工程师在代码的37行前做了标记,以提示该行存在调试参数。当生产变量的数量很多时,用户需要在编程语言中找到每个变量的代码,费时且效率很低,且对于低代码编程软件来说很难识别且没有必要。
发明内容
有鉴于此,本申请实施例一方面提出了应用程序监控方法,另一方面提出了应用程序监控装置、本申请其他方面还提出了非瞬时计算机可读存储介质、电子设备和计算机程序产品,以提高应用程序的监控效率。
第一方面,提供一种应用程序监控方法,该方法包括:
响应于用户输入的携带第一功能块名称的功能块调用请求,从功能块库中搜索到第一功能块并在界面上显示第一功能块,显示内容至少包括:第一功能块的名称和第一功能块包含的各个事件端口的名称;其中,第一功能块为用户要设计的第一应用程序中包含的任一功能块;
响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,在功能块库中查找到第一功能块的代码,在该代码中查找到第一事件端口,在第一事件端口处添加断点标志;其中,第一事件端口为第一功能块的任一事件端口;
响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,将第一数据参数的名称、第一事件端口的名称和第一功能块的名称作为一条监控参数表项添加到监控参数表中;
响应于用户输入的第一应用程序运行请求,根据界面上显示的第一应用程序包含的各功能块的名称,在功能块库中查找到各功能块的代码,根据查找到的代码以及各功能块之间的执行顺序关系,运行各功能块的代码;
当运行第一应用程序中的第一功能块时,在监控参数表中查询第一功能块的监控参数,若查询到,则在运行过程中,获取监控参数值,并在检测到断点标志时,暂停运行第一功能块的代码并将监控参数的当前值显示在界面上。
上述实施例中,通过图形工具来实现在应用程序中设置断点和监控参数,可视化强,操作简单,无需查看代码,从而无需丰富的编程经验,就可完成在应用程序中设置断点和监控参数,从而提高了监控/调试效率。
可选地,所述响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,包括:
检测到用户点击了界面上的断点工具,且检测到用户在界面上点击了第一功能块的第一事件端口,则确定用户在界面上输入了针对第一功能块的第一事件端口的断点设置请求。
通过上述实施例,实现了通过图形工具在应用程序中设置断点。
可选地,所述响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,包括:
检测到用户输入了针对第一功能块的第一事件端口的输入或输出的数据参数的显示请求,则在功能块库中查找第一功能块的代码,在该代码中查找第一事件端口的输入或输出的所有数据参数,将该所有数据参数显示(S304)在界面上;
检测到用户在界面上选中了第一功能块的第一事件端口的输入或输出的第一数据参数,则确定用户在界面上输入了针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求。
通过上述实施例,实现了通过图形工具设置应用程序的监控参数。
可选地,所述响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,以及,所述响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,包括:
检测到用户点击了界面上的断点工具,则在界面上显示监控参数搜索框;
检测到用户在所述搜索框中输入了第一数据参数的名称,则根据界面上显示的所有功能块的名称,在功能块库中查找各功能块的代码,并在各功能块的代码中搜索第一数据参数;
根据搜索结果,将第一数据参数所在的每个事件端口的名称以及每个事件端口所在的功能块的名称显示在界面上;
检测到用户在界面上选中了第一数据参数所在的第一事件端口的名称以及第一事件端口所在的第一功能块的名称,则确定用户在界面上输入了针对第一功能块的第一事件端口的断点设置请求,同时,确定用户输入了针对第一功能块的第一事件端口的第一数据参数的监控参数设置请求。
通过上述实施例,实现了通过图形工具同时设置应用程序的断点和监控参数。
可选地,所述暂停运行第一功能块的代码之后,进一步包括:
响应于用户在界面上输入的继续运行请求,则继续运行后续代码。
可选地,所述在第一事件端口处添加断点标志,进一步包括:在界面上设置第一事件端口的状态为未通知;
所述暂停运行第一功能块的代码,进一步包括:在界面上将检测到的断点标志所在的事件端口的状态设置为:通知中;
且,当继续运行代码时,在界面上将检测到的断点标志所在的事件端口的状态设置为:已通知。
第二方面,提供一种应用程序监控装置,该装置包括:
功能块调用模块,用于响应于用户输入的携带第一功能块名称的功能块调用请求,从功能块库中搜索到第一功能块并在界面上显示第一功能块,显示内容至少包括:第一功能块的名称和第一功能块包含的各个事件端口的名称;其中,第一功能块为用户要设计的第一应用程序中包含的任一功能块;
断点及监控参数设置模块,用于响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,在功能块库中查找到第一功能块的代码,在该代码中查找到第一事件端口,在第一事件端口处添加断点标志;其中,第一事件端口为第一功能块的任一事件端口;响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,将第一数据参数的名称、第一事件端口的名称和第一功能块的名称作为一条监控参数表项添加到监控参数表中;
运行及监控模块,用于响应于用户输入的第一应用程序运行请求,根据界面上显示的第一应用程序包含的各功能块的名称,在功能块库中查找到各功能块的代码,根据查找到的代码以及各功能块之间的执行顺序关系,运行各功能块的代码;且,当运行第一功能块时,在监控参数表中查询第一功能块的监控参数,若查询到,则在运行过程中,获取监控参数值,并在检测到断点标志时,暂停运行第一功能块的代码并将监控参数的当前值显示在界面上。
第三方面,提供一种非瞬时计算机可读存储介质,所述非瞬时计算机可读存储介质存储指令,其特征在于,所述指令在由处理器执行时使得所述处理器 执行如上任一项所述的应用程序监控方法的步骤。
第四方面,提供一种电子设备,包括:处理器和存储器,所述存储器存储有能在所述处理器上运行的计算机程序,所述处理器在执行所述计算机程序时,实现如上任一项所述的应用程序监控方法的步骤。
第五方面,提供一种计算机程序产品,包括计算机程序或指令,该计算机程序或指令被处理器执行时实现如上任一项所述的应用程序监控方法的步骤。
附图说明
下面将通过参照附图详细描述本申请的优选实施例,使本领域的普通技术人员更清楚本申请的上述及其它特征和优点,附图中:
图1为现有的在计算机程序中标记调试参数的示例图;
图2为本申请第一实施例提供的应用程序监控方法流程图;
图3为本申请第二实施例提供的应用程序监控方法流程图;
图4为应用程序编辑器的界面示例图一;
图5为应用程序编辑器的界面示例图二;
图6为应用程序编辑器的界面示例图三;
图7为应用程序编辑器的界面示例图四;
图8为应用程序编辑器的界面示例图五;
图9为应用程序编辑器的界面示例图六;
图10为应用程序编辑器的界面示例图七;
图11为本申请一实施例提供的应用程序监控装置的结构示意图;
图12为本申请一实施例提供的电子设备的结构示意图。
其中,附图标记如下:
标号 含义
S201~S204 步骤
S301~S307 步骤
51 断点工具
81 运行工具
111 功能块调用模块
112 输出输入关系建立模块
113 断点及监控参数设置模块
114 运行及监控模块
121 处理器
122 存储器
123 电源
124 输入输出单元
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,以下举实施例对本申请进一步详细说明。
图2为本申请第一实施例提供的应用程序监控方法流程图,其具体步骤如下:
步骤S201:响应于用户输入的携带第一功能块名称的功能块调用请求,从功能块库中搜索到第一功能块并在界面上显示第一功能块,显示内容至少包括:第一功能块的名称和第一功能块包含的各个事件端口的名称;其中,第一功能块为用户要设计的第一应用程序中包含的任一功能块。
一可选实施例中,响应于用户在界面上显示的第一功能块与第二功能块之间设置的执行顺序关系,保存第一功能块与第二功能块之间的执行顺序关系。其中,第一功能块和第二功能块为第一应用程序中包含的任意两个功能块。
步骤S202:响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,在功能块库中查找到第一功能块的代码,在该代码中查找到第 一事件端口,在第一事件端口处添加断点标志;其中,第一事件端口为第一功能块的任一事件端口。
步骤S203:响应于用户在界面上输入的针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求,将第一数据参数的名称、第一事件端口的名称和第一功能块的名称作为一条监控参数表项添加到监控参数表中。
步骤S204:响应于用户输入的第一应用程序运行请求,根据界面上显示的第一应用程序包含的各功能块的名称,在功能块库中查找到各功能块的代码,根据查找到的代码以及各功能块之间的执行顺序关系,运行各功能块的代码;且,当运行第一功能块时,在监控参数表中查询第一功能块的监控参数,若查询到,则在运行过程中,获取监控参数值,并在检测到断点标志时,暂停运行第一功能块的代码并将监控参数的当前值显示在界面上。
上述实施例中,通过图形工具来实现在应用程序中设置断点和监控参数,可视化强,操作简单,无需查看代码,从而无需丰富的编程经验,就可完成在应用程序中设置断点和监控参数,从而提高了监控/调试效率。
一可选实施例中,步骤S202中,响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,包括:
检测到用户点击了界面上的断点工具,且检测到用户在界面上点击了第一功能块的第一事件端口,则确定用户在界面上输入了针对第一功能块的第一事件端口的断点设置请求。
通过上述实施例,实现了通过图形工具在应用程序中设置断点。
一可选实施例中,步骤S203中,响应于用户在界面上输入的针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求,包括:
检测到用户输入了针对第一功能块的第一事件端口的输入或输出的数据参数的显示请求,则在功能块库中查找第一功能块的代码,在该代码中查找第一 事件端口的输入或输出的所有数据参数,将该所有数据参数显示在界面上;
检测到用户在界面上选中了第一功能块的第一事件端口的输入或输出的第一数据参数,则确定用户在界面上输入了针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求。
通过上述实施例,实现了通过图形工具设置应用程序的监控参数。
一可选实施例中,步骤S202中,响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,以及,步骤203中,响应于用户在界面上输入的针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求,包括:
检测到用户点击了界面上的断点工具,则在界面上显示监控参数搜索框;
检测到用户在所述搜索框中输入了第一数据参数的名称,则根据界面上显示的所有功能块的名称,在功能块库中查找各功能块的代码,并在各功能块的代码中搜索第一数据参数;
根据搜索结果,将第一数据参数所在的每个事件端口的名称以及每个事件端口所在的功能块的名称显示在界面上;
检测到用户在界面上选中了第一数据参数所在的第一事件端口的名称以及第一事件端口所在的第一功能块的名称,则确定用户在界面上输入了针对第一功能块的第一事件端口的断点设置请求,同时,确定用户输入了针对第一功能块的第一事件端口的第一数据参数的监控参数设置请求。
通过上述实施例,实现了通过图形工具同时设置应用程序的断点和监控参数。
一可选实施例中,步骤S204中,暂停运行第一功能块的代码之后,进一步包括:响应于用户在界面上输入的继续运行请求,则继续运行后续代码。
一可选实施例中,步骤S202中,在第一事件端口处添加断点标志,进一步包括:在界面上设置第一事件端口的状态为未通知;
步骤S204中,暂停运行第一功能块的代码,进一步包括:在界面上将检测到的断点标志所在的事件端口的状态设置为:通知中;
且,当继续运行代码时,在界面上将检测到的断点标志所在的事件端口的状态设置为:已通知。
图3为本申请第二实施例提供的应用程序监控方法流程图,其具体步骤如下:
步骤S301:应用程序编辑器接收到用户在界面上输入的携带第一功能块名称的功能块调用请求,从功能块库(FB Library,Function Block Library)中搜索到第一功能块,在界面上显示第一功能块,显示内容至少包括:第一功能块的名称和第一功能块包含的各个事件端口的名称;其中,第一功能块为用户要设计的第一应用程序中包含的任一功能块。
图4为应用程序编辑器的界面示例图一,如图4所示,功能块库中保存了用于实现各种功能的各功能块的原始代码。用户可以通过调用功能块库中的功能块,来设计自己想要的功能的应用程序。例如:图4中,用户要设计一个应用程序,该应用程序需要四个功能块A、B、C、D配合完成,则用户从功能块库中调用出功能块A、B、C和D。
其中,事件端口如:开始事件端口、错误事件端口、拧螺丝事件端口、结束事件端口。
步骤S302:应用程序编辑器检测到用户在界面上显示的第一功能块与第二功能块之间设置了执行顺序关系,则保存第一功能块与第二功能块之间的执行顺序关系;第一功能块和第二功能块为第一应用程序中包含的任意两个功能块。
如图4所示,设第一功能块为功能块A,第二功能块为功能块B,功能块A与功能块B之间存在:执行完A后接着执行B的执行顺序关系。则,用户会在界面上画一个由功能块A的结束事件端口指向功能块B的开始事件端口的箭头, 应用程序编辑器检测到该箭头后,保存功能块A与功能块B的执行顺序关系:A->B。
如图4所示,功能块B与功能块C之间、功能块C与功能块D之间也存在执行顺序关系:B->C、C->D。
步骤S303:应用程序编辑器检测到用户点击了界面的工具栏上的断点工具,则对界面上显示的所有功能块的所有事件端口进行突出显示。
如图5所示,当断点工具51被点击时,功能块A、B、C、D的开始、错误、拧螺丝1~3、结束事件端口都被突出显示了。
步骤S304:应用程序编辑器检测到用户输入了针对第一功能块的第一事件端口输入或输出的数据参数列表的显示请求,在功能块库中查找到第一功能块的第一事件端口输入或输出的所有数据参数的名称,将第一功能块的第一事件端口输入或输出的所有数据参数的名称以列表的方式显示在界面上。
如图6所示,当应用程序编辑器检测到鼠标悬停在一功能块的一事件端口上,如:功能块A的结束事件端口上,则在功能块库中查找到功能块A的结束事件端口输出的所有数据参数的名称,然后在结束事件端口的右侧以列表的方式显示查找到的结束事件端口输出的所有数据参数的名称,如图6中的数据参数1~4的名称。
步骤S305:应用程序编辑器检测到用户选中了第一功能块的第一事件端口,则在功能块库中查找到第一功能块的代码,在该代码中查找到第一事件端口,在第一事件端口处添加断点标志。
例如:若第一事件端口为开始事件端口,则在第一功能块的代码的开始位置处添加断点标志;若第一事件端口为结束事件端口,则在第一功能块的代码的结束位置处添加断点标志;若第一事件端口为错误事件端口,则在代码中产生错误事件的位置处添加断点标志;若第一事件端口为拧螺丝事件1~3端口,则在代码中产生拧螺丝事件1~3的位置处添加断点标志。
例如:当应用程序编辑器检测到用户单击了功能块A的事件端口a时,则确定用户选中了功能块A的事件端口a。
如图6所示,当功能块A的结束事件端口被点击时,则在功能块库中查找到功能块A的代码,在该代码中查找到结束事件端口,在结束事件端口处添加断点标志。
可通过步骤S305在任一功能块的代码中添加一个或多个断点标志。图7给出了在功能块C的代码中的拧螺丝1事件端口处添加断点标志的界面示例图。
步骤S306:应用程序编辑器检测到用户在界面上显示的第一功能块的第一事件端口输入或输出的数据参数的名称列表中选中了第一数据参数的名称,则将第一数据参数的名称、第一事件端口的名称和第一功能块的名称作为一条监控参数表项添加到自身维护的监控参数表中。
如:图6中,用户选中了功能块A的结束事件端口的数据参数2的名称;图7中,用户选中了功能块C的拧螺丝1事件端口的数据参数1的名称。
步骤S307:应用程序编辑器接收到针对第一应用程序的运行请求,则根据界面上显示的第一应用程序包含的各功能块的名称,以及保存的各功能块之间的执行顺序关系,确定各功能块的运行顺序,按照各功能块的运行顺序,在功能块库中依次查找到各功能块的代码,根据各功能块的代码以及各功能块之间的执行顺序关系,依次运行各功能块的代码;且,当要运行一功能块时,先查询自身维护的监控参数表,在该表中查询该功能块的所有监控数据参数,若查询到,则在运行过程中,实时获取该功能块的各监控数据参数值,当检测到断点标志时,暂停运行该功能块的代码,并将各监控参数的当前值显示在界面上。
如图8所示,运行工具81被点击,则开始运行功能块A~D,当运行到功能块C的拧螺丝1事件端口时,检测到断点标志,则暂停运行,并在界面上显示监控参数的当前值。
当暂停运行时,在界面上该功能块的对应事件端口处显示继续按钮,若检测到用户点击了该按钮,则继续运行。如图8所示,在功能块C的拧螺丝1事件端口的下方显示继续按钮。
另外,当应用程序编辑器检测到用户点击了界面的工具栏上的断点工具时, 可进一步在界面上显示监控参数搜索框,当检测到用户在该搜索框中输入了一数据参数的名称时,则根据界面上显示的所有功能块的名称,在功能块库中查找各功能块的代码,并在各功能块的代码中搜索该数据参数,若搜索到,则根据搜索结果,将该数据参数的名称分别和该数据参数所在的每一事件端口的名称及每一事件端口所在的功能块的名称进行组合,每一组合作为一条表项显示在搜索框的下拉框中(即,每一表项中包含:该数据参数的名称、该数据参数所在的一事件端口的名称、以及该事件端口所在的功能块的名称);
此后,当检测到用户选中下拉框中的一表项时,则确定用户输入了针对该表项中的事件端口的断点设置请求,以及输入了针对该表项中的数据参数的监控参数设置请求,从而根据该表项中的功能块的名称和事件端口的名称,在功能块库中查找到该功能块的代码,在该代码中查找到该事件端口,在该事件端口处设置断点标志;同时,将该表项中的数据参数的名称、该事件端口的名称和该功能块的名称作为一条监控参数表项添加到自身维护的监控参数表中。
如图9所示,检测到用户在搜索框输入了速度,则在功能块A~D的代码中搜索速度数据参数,搜索结果显示:功能块A的结束事件端口的输出数据参数中包含速度数据参数,功能块D的结束事件端口的输出数据参数中也包含速度数据参数,则在搜索框的下拉框中显示两条搜索结果表项:速度:结束事件,功能块A;速度:结束事件,功能块D。同时,由于鼠标停留在速度:结束事件,功能块A表项上,则在功能块A的结束事件端口下方显示结束事件端口输出的所有数据参数,其中,速度突出显示。当检测到用户点击了搜索框的下拉框中的速度:结束事件,功能块A表项时,则在功能块A的代码的结束事件端口处设置断点标志,同时,将速度数据参数、结束事件端口和功能块A的名称作为一条监控参数表项添加到监控参数表中。
图10为通过图9完成断点和监控参数设置后的应用编辑器的界面示例图。
另外,对于设置有断点标志的事件端口,可为其设置三种状态:未通知、通知中和已通知。其中,设置有断点标志的事件端口的默认状态为未通知,表 示该端口处的监控参数值还未显示给用户;当代码运行到一事件端口处开始暂停时,在界面上将该事件端口的状态由未读更改为通知中,表示正在将监控参数值显示给用户;当暂停状态结束,代码继续运行时,将该事件端口的状态更改为已通知,表示该事件端口的监控参数值已经通知给用户。
图11为本申请一实施例提供的应用程序监控装置110的结构示意图,该装置110主要包括:
功能块调用模块111,用于响应于用户输入的携带第一功能块名称的功能块调用请求,从功能块库中搜索到第一功能块并在界面上显示第一功能块,显示内容至少包括:第一功能块的名称和第一功能块包含的各个事件端口的名称;其中,第一功能块为用户要设计的第一应用程序中包含的任一功能块。
断点及监控参数设置模块112,用于响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,在功能块库中查找到第一功能块的代码,在该代码中查找到第一事件端口,在第一事件端口处添加断点标志;其中,第一事件端口为第一功能块的任一事件端口;响应于用户在界面上输入的针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求,将第一数据参数的名称、第一事件端口的名称和第一功能块的名称作为一条监控参数表项添加到监控参数表中。
运行及监控模块113,用于响应于用户输入的第一应用程序运行请求,根据界面上显示的第一应用程序包含的各功能块的名称,在功能块库中查找到各功能块的代码,根据查找到的代码以及各功能块之间的执行顺序关系,运行各功能块的代码;且,当运行第一功能块时,在监控参数表中查询第一功能块的监控参数,若查询到,则在运行过程中,获取监控参数值,并在检测到断点标志时,暂停运行第一功能块的代码并将监控参数的当前值显示在界面上。
一可选实施例中,应用程序监控装置进一步包括:输出输入关系建立模块114,用于响应于用户在界面上显示的第一功能块与第二功能块之间设置的执行 顺序关系,保存第一功能块与第二功能块之间的执行顺序关系;第一功能块和第二功能块为第一应用程序中包含的任意两个功能块。
一可选实施例中,断点及监控参数设置模块112响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,包括:
检测到用户点击了界面上的断点工具,且检测到用户在界面上点击了第一功能块的第一事件端口,则确定用户在界面上输入了针对第一功能块的第一事件端口的断点设置请求。
通过上述实施例,实现了通过图形工具在应用程序中设置断点。
一可选实施例中,断点及监控参数设置模块112响应于用户在界面上输入的针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求,包括:
检测到用户输入了针对第一功能块的第一事件端口输入或输出的数据参数的显示请求,则在功能块库中查找第一功能块的代码,在该代码中查找第一事件端口的输入或输出的所有数据参数,将该所有数据参数显示在界面上;
检测到用户在界面上选中了第一功能块的第一事件端口的输入或输出的第一数据参数,则确定用户在界面上输入了针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求。
通过上述实施例,实现了通过图形工具设置应用程序的监控参数。
一可选实施例中,断点及监控参数设置模块112响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,以及,响应于用户在界面上输入的针对第一功能块的第一事件端口的输入或输出的第一数据参数的监控参数设置请求,包括:
检测到用户点击了界面上的断点工具,则在界面上显示监控参数搜索框;
检测到用户在所述搜索框中输入了第一数据参数的名称,则根据界面上显示的所有功能块的名称,在功能块库中查找各功能块的代码,并在各功能块的代码中搜索第一数据参数;
根据搜索结果,将第一数据参数所在的每个事件端口的名称以及每个事件端口所在的功能块的名称显示在界面上;
检测到用户在界面上选中了第一数据参数所在的第一事件端口的名称以及第一事件端口所在的第一功能块的名称,则确定用户在界面上输入了针对第一功能块的第一事件端口的断点设置请求,同时,确定用户输入了针对第一功能块的第一事件端口的第一数据参数的监控参数设置请求。
通过上述实施例,实现了通过图形工具同时设置应用程序的断点和监控参数。
一可选实施例中,运行及监控模块113暂停运行第一功能块的代码之后,进一步包括:响应于用户在界面上输入的继续运行请求,则继续运行后续代码。
一可选实施例中,断点及监控参数设置模块112在第一事件端口处添加断点标志,进一步包括:在界面上设置第一事件端口的状态为未通知;
运行及监控模块113暂停运行第一功能块的代码,进一步包括:在界面上将检测到的断点标志所在的事件端口的状态设置为:通知中;
且,运行及监控模块113当继续运行代码时,在界面上将检测到的断点标志所在的事件端口的状态设置为:已通知。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储指令,所述指令在由处理器执行时可执行如上所述应用程序监控方法中的步骤。实际应用中,所述的计算机可读介质可以是上述实施例各设备/装置/系统所包含的,也可以是单独存在,而未装配入该设备/装置/系统中。其中,在计算机可读存储介质中存储指令,其存储的指令在由处理器执行时可执行如上应用 程序监控方法中的步骤。
根据本申请公开的实施例,计算机可读存储介质可以是非易失性的计算机可读存储介质,例如可以包括但不限于:便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件,或者上述的任意合适的组合,但不用于限制本申请保护的范围。在本申请公开的实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。
本申请实施例还提供一种计算机程序产品,包括计算机程序或指令,该计算机程序或指令被处理器执行时实现如上任一实施例所述的应用程序监控方法的步骤。
如图12所示,本申请实施例还提供一种电子设备。如图12所示,其示出了本申请实施例所涉及的电子设备的结构示意图,具体来讲:
该电子设备可以包括一个或一个以上处理核心的处理器121、一个或一个以上计算机可读存储介质的存储器122以及存储在存储器上并可在处理器上运行的计算机程序。在执行所述存储器122的程序时,可以实现上述应用程序监控方法。
具体的,实际应用中,该电子设备还可以包括电源123、输入输出单元124等部件。本领域技术人员可以理解,图12中示出的电子设备的结构并不构成对该电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。其中:
处理器121是该电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器122内的软件程序和/或模块,以及调用存储在存储器122内的数据,执行服务器的各种功能和处理数据,从而对该电子设备进行整体监控。
存储器122可用于存储软件程序以及模块,即上述计算机可读存储介质。处理器121通过运行存储在存储器122的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器122可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据服务器的使用所创建的数据等。此外,存储器122可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器122还可以包括存储器控制器,以提供处理器121对存储器122的访问。
该电子设备还包括给各个部件供电的电源123,可以通过电源管理系统与处理器121逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源123还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。
该电子设备还可包括输入输出单元124,该输入单元输出124可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。该输入单元输出124还可以用于显示由用户输入的信息或提供给用户的信息以及各种图像用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。
本申请附图中的流程图和框图,示出了按照本申请公开的各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或者代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应该注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同附图中所标准的顺序发生。例如,两个连接地表示的方框实际上可以基本并行地执行,它们有时也可以按照相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或者流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现, 或者可以用专用硬件与计算机指令的组合来实现。
本领域技术人员可以理解,本公开的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,即使这样的组合或结合没有明确记载于本申请中。特别地,在不脱离本申请精神和教导的情况下,本申请的各个实施例和/或权利要求中记载的特征可以进行多种组合和/或结合,所有这些组合和/或结合均落入本申请公开的范围。

Claims (10)

  1. 一种应用程序监控方法,其特征在于,该方法包括:
    响应于用户输入的携带第一功能块名称的功能块调用请求,从功能块库中搜索(S201,S301)到第一功能块并在界面上显示第一功能块,显示内容至少包括:第一功能块的名称和第一功能块包含的各个事件端口的名称;其中,第一功能块为用户要设计的第一应用程序中包含的任一功能块;
    响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,在功能块库中查找(S202,S305)到第一功能块的代码,在该代码中查找到第一事件端口,在第一事件端口处添加断点标志;其中,第一事件端口为第一功能块的任一事件端口;
    响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,将第一数据参数的名称、第一事件端口的名称和第一功能块的名称作为一条监控参数表项添加(S203,S306)到监控参数表中;
    响应于用户输入的第一应用程序运行请求,根据界面上显示的第一应用程序包含的各功能块的名称,在功能块库中查找(S204,S307)到各功能块的代码,根据查找到的代码以及各功能块之间的执行顺序关系,运行各功能块的代码;
    当运行第一应用程序中的第一功能块时,在监控参数表中查询(S204,S307)第一功能块的监控参数,若查询到,则在运行过程中,获取监控参数值,并在检测到断点标志时,暂停运行第一功能块的代码并将监控参数的当前值显示在界面上。
  2. 根据权利要求1所述的方法,其特征在于,所述响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,包括:
    检测到用户点击(S303)了界面上的断点工具,且检测到用户在界面上点击(S305)了第一功能块的第一事件端口,则确定用户在界面上输入了针对第一功能块的第一事件端口的断点设置请求。
  3. 根据权利要求2所述的方法,其特征在于,所述响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,包括:
    检测到用户输入(S304)了针对第一功能块的第一事件端口的输入或输出的数据参数的显示请求,则在功能块库中查找第一功能块的代码,在该代码中查找(S304)第一事件端口的输入或输出的所有数据参数,将该所有数据参数显示在界面上;
    检测到用户在界面上选中(S306)了第一功能块的第一事件端口的输入或输出的第一数据参数,则确定用户在界面上输入了针对第一功能块的第一事件端口的输入或输出 的第一数据参数的监控参数设置请求。
  4. 根据权利要求1所述的方法,其特征在于,所述响应于用户在界面上输入的针对第一功能块的第一事件端口的断点设置请求,以及,所述响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,包括:
    检测到用户点击了界面上的断点工具,则在界面上显示监控参数搜索框;
    检测到用户在所述搜索框中输入了第一数据参数的名称,则根据界面上显示的所有功能块的名称,在功能块库中查找各功能块的代码,并在各功能块的代码中搜索第一数据参数;
    根据搜索结果,将第一数据参数所在的每个事件端口的名称以及每个事件端口所在的功能块的名称显示在界面上;
    检测到用户在界面上选中了第一数据参数所在的第一事件端口的名称以及第一事件端口所在的第一功能块的名称,则确定用户在界面上输入了针对第一功能块的第一事件端口的断点设置请求,同时,确定用户输入了针对第一功能块的第一事件端口的第一数据参数的监控参数设置请求。
  5. 根据权利要求1所述的方法,其特征在于,所述暂停运行(S204,S307)第一功能块的代码之后,进一步包括:
    响应于用户在界面上输入的继续运行请求,则继续运行后续代码。
  6. 根据权利要求1所述的方法,其特征在于,所述在第一事件端口处添加(S202,S305)断点标志,进一步包括:在界面上设置第一事件端口的状态为未通知;
    所述暂停运行(S204,S307)第一功能块的代码,进一步包括:在界面上将检测到的断点标志所在的事件端口的状态设置为:通知中;
    且,当继续运行代码时,在界面上将检测到的断点标志所在的事件端口的状态设置为:已通知。
  7. 一种应用程序监控装置(110),其特征在于,该装置(110)包括:
    功能块调用模块(111),用于响应于用户输入的携带第一功能块名称的功能块调用请求,从功能块库中搜索到第一功能块并在界面上显示第一功能块,显示内容至少包括:第一功能块的名称和第一功能块包含的各个事件端口的名称;其中,第一功能块为用户要设计的第一应用程序中包含的任一功能块;
    断点及监控参数设置模块(112),用于响应于用户在界面上输入的针对第一功能块 的第一事件端口的断点设置请求,在功能块库中查找到第一功能块的代码,在该代码中查找到第一事件端口,在第一事件端口处添加断点标志;其中,第一事件端口为第一功能块的任一事件端口;响应于用户在界面上输入的针对第一事件端口的输入或输出的第一数据参数的监控参数设置请求,将第一数据参数的名称、第一事件端口的名称和第一功能块的名称作为一条监控参数表项添加到监控参数表中;
    运行及监控模块(113),用于响应于用户输入的第一应用程序运行请求,根据界面上显示的第一应用程序包含的各功能块的名称,在功能块库中查找到各功能块的代码,根据查找到的代码以及各功能块之间的执行顺序关系,运行各功能块的代码;且,当运行第一功能块时,在监控参数表中查询第一功能块的监控参数,若查询到,则在运行过程中,获取监控参数值,并在检测到断点标志时,暂停运行第一功能块的代码并将监控参数的当前值显示在界面上。
  8. 一种非瞬时计算机可读存储介质,所述非瞬时计算机可读存储介质存储指令,其特征在于,所述指令在由处理器执行时使得所述处理器执行如权利要求1至6中任一项所述的应用程序监控方法的步骤。
  9. 一种电子设备,其特征在于,包括:处理器(121)和存储器(122),所述存储器(122)存储有能在所述处理器(121)上运行的计算机程序,所述处理器(121)在执行所述计算机程序时,实现如权利要求1至6中任一项所述的应用程序监控方法的步骤。
  10. 一种计算机程序产品,包括计算机程序或指令,其特征在于,该计算机程序或指令被处理器执行时实现如权利要求1至6中任一项所述的应用程序监控方法的步骤。
PCT/CN2021/120802 2021-09-26 2021-09-26 应用程序监控方法、装置及可读存储介质 WO2023044879A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180101895.6A CN117940907A (zh) 2021-09-26 2021-09-26 应用程序监控方法、装置及可读存储介质
PCT/CN2021/120802 WO2023044879A1 (zh) 2021-09-26 2021-09-26 应用程序监控方法、装置及可读存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/120802 WO2023044879A1 (zh) 2021-09-26 2021-09-26 应用程序监控方法、装置及可读存储介质

Publications (1)

Publication Number Publication Date
WO2023044879A1 true WO2023044879A1 (zh) 2023-03-30

Family

ID=85719874

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/120802 WO2023044879A1 (zh) 2021-09-26 2021-09-26 应用程序监控方法、装置及可读存储介质

Country Status (2)

Country Link
CN (1) CN117940907A (zh)
WO (1) WO2023044879A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100073180A (ko) * 2008-12-22 2010-07-01 한국전자통신연구원 시각적 디버깅 장치 및 방법
CN103514072A (zh) * 2012-06-28 2014-01-15 中兴通讯股份有限公司 一种用于可视化编程的图形化业务的调试方法及装置
CN103729288A (zh) * 2013-11-01 2014-04-16 华中科技大学 一种嵌入式多核环境下应用程序的调试方法
CN104375938A (zh) * 2014-11-20 2015-02-25 工业和信息化部电信研究院 安卓应用程序的动态行为监测方法及系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20100073180A (ko) * 2008-12-22 2010-07-01 한국전자통신연구원 시각적 디버깅 장치 및 방법
CN103514072A (zh) * 2012-06-28 2014-01-15 中兴通讯股份有限公司 一种用于可视化编程的图形化业务的调试方法及装置
CN103729288A (zh) * 2013-11-01 2014-04-16 华中科技大学 一种嵌入式多核环境下应用程序的调试方法
CN104375938A (zh) * 2014-11-20 2015-02-25 工业和信息化部电信研究院 安卓应用程序的动态行为监测方法及系统

Also Published As

Publication number Publication date
CN117940907A (zh) 2024-04-26

Similar Documents

Publication Publication Date Title
JP2003241807A (ja) ロボット制御装置
US10203850B2 (en) Data editing apparatus, data editing method, and data editing program
JP2008097424A (ja) エンジニアリングツール
JP2021119478A (ja) 情報処理装置
US9811071B2 (en) System construction support apparatus
KR20140072929A (ko) 아카이빙 작업수행 자동화 방법
WO2023044879A1 (zh) 应用程序监控方法、装置及可读存储介质
US9395872B2 (en) Facilities controlling device, screen displaying method, and recording medium
WO2015181921A1 (ja) プログラマブル表示器及び作画ソフトウェア
US20230129280A1 (en) Computer readable storage medium, program creation support apparatus, and program creation support method
JP2013186740A (ja) 機械の管理システム
CN113779030A (zh) 枚举值查询方法、可读存储介质及计算机程序产品
JPS61255432A (ja) エラ−メツセ−ジ表示方式
KR20160092772A (ko) 선박 블록관리 모니터링 시스템 및 그 방법
CN113778038B (zh) 一种分散控制系统离线组态对比方法和系统
JPS63138459A (ja) 表内データ検索結果の表示方法
JP2003208333A (ja) トレース情報検索装置およびその方法
CN112363696B (zh) 增强现实快速开发系统及方法、电子设备及可读存储介质
KR101317581B1 (ko) 피엘시 래더 프로그램의 에러 추적 방법
CN109460497B (zh) 一种基于服务总线的计算模型可视化展示方法及系统
WO2022249358A1 (ja) ロボット制御装置及びロボット制御システム
CN117806859A (zh) 线程堆栈信息获取方法、装置、电子设备及存储介质
JPH10161891A (ja) タスク余裕度解析装置、タスク余裕度解析方法及びタスク余裕度解析プログラムを格納した記録媒体
US10394943B2 (en) Numerical controller
JP2008003732A (ja) 操作ログによる業務シナリオ通知機能

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21957997

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 202180101895.6

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2021957997

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2021957997

Country of ref document: EP

Effective date: 20240326

NENP Non-entry into the national phase

Ref country code: DE