Monitoring system, monitoring method, monitoring device and storage medium
Through the monitoring system of the client and server, real-time transmission of monitoring records is solved through the websocket connection, and the problem of poor monitoring effect in the existing technology is solved, real-time monitoring and adjustment of the target program is achieved, ensuring that the program runs stably and the results are in line with expectations.
Patent Information
- Application Number
- CN202510331525.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-11
AI Technical Summary
The existing monitoring system has poor monitoring of the execution process of the target program and cannot effectively ensure the stable operation of the program and the expected operation results.
The monitoring system of the client and server is adopted to transmit monitoring records in real time through websocket connection, and the client displays monitoring records for users to make adjustments.
Real-time monitoring of target programs is achieved, monitoring effect is improved, and users can adjust programs in a timely manner to ensure stable operation and meet expected results.
Smart Images

Figure CN120295857A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular, to a monitoring system, a monitoring method, a device, and a storage medium. Background Art
[0002] Currently, during the development process of a target program, in order to ensure that the developed target program can run stably and the running result meets expectations during subsequent actual applications, the target program can be input into a monitoring system in advance to monitor the execution process of the target program through the monitoring system, so as to make corresponding adjustments to the target program according to the monitoring results, so that the adjusted target program can run stably and the running result meets expectations.
[0003] However, when using an existing monitoring system to monitor the execution process of a target program, the monitoring effect is often poor. Summary of the Invention
[0004] This specification provides a monitoring system, a monitoring method, a device, and a storage medium to partially solve the above problems existing in the prior art.
[0005] This specification adopts the following technical solutions:
[0006] This specification provides a monitoring system for monitoring a target program, and the system includes: a client and a server. Among them,
[0007] The client is used to display a first page to the user, and in response to a confirmation operation performed by the user on the first page, send a first request and a second request to the server. The first request carries the program identifier of the target program, and the second request carries a connection identifier for establishing a websocket connection with the server;
[0008] The server is used to receive the first request and execute the target program that matches the program identifier carried in the first request to monitor the target program, and receive the second request and establish a websocket connection with the client according to the connection identifier carried in the second request, so as to return the monitoring record obtained by monitoring the target program to the client through the websocket connection. The monitoring record is used to reflect the status information of the target program during the execution process and the execution result obtained by executing the target program;
[0009] The client is used to receive the monitoring record and display the monitoring record on a second page, so that the user can perform an adjustment service based on the monitoring record displayed on the second page.
[0010] Optionally, the client is further configured to resend a second request to the server when a connection exception occurs in the WebSocket connection between the client and the server.
[0011] The server is further configured to receive the second request resent by the client, and re - establish a WebSocket connection with the client based on the connection identifier included in the second request resent by the client.
[0012] Optionally, when receiving multiple first requests, the server is further configured to determine a program execution sequence according to the priorities of the target programs corresponding to each first request, so as to sequentially execute each target program in the order of the target programs in the program execution sequence.
[0013] Optionally, when monitoring that an exception occurs in the execution process of the target program, the server is further configured to determine at least part of the program code with a running exception in the target program, so as to determine exception cause information based on the at least part of the program code, and return the exception cause information to the client.
[0014] The client is further configured to receive the exception cause information and display the exception cause information on the second page, so that the user can adjust the target program based on the exception cause information displayed on the second page.
[0015] Optionally, when monitoring that an exception occurs in the execution process of the target program, the server is further configured to generate reference adjustment information and return the reference adjustment information to the client.
[0016] The client is further configured to receive the reference adjustment information and display the reference adjustment information on the second page, so that the user can adjust the target program based on the reference adjustment information displayed on the second page.
[0017] This specification provides a monitoring method, which is applied to a server and includes:
[0018] Obtain a first request sent by a client, execute a target program that matches the program identifier carried in the first request to monitor the target program, and obtain a second request sent by the client, and establish a WebSocket connection with the client according to the connection identifier carried in the second request.
[0019] Return the monitoring records obtained by monitoring the target program to the client through the websocket connection, so that the client can display a second page containing the monitoring records to the user. The monitoring records are used to reflect the status information of the target program during execution and the execution results obtained by executing the target program.
[0020] Optionally, the method further includes:
[0021] When receiving multiple first requests sent by the client, determine a program execution sequence according to the priorities of the target programs corresponding to each first request, and sequentially execute each target program in the order of the target programs in the program execution sequence.
[0022] This specification provides a monitoring device, including:
[0023] A first acquisition module: used to acquire a first request sent by the client, execute a target program that matches the program identifier carried in the first request to monitor the target program, and acquire a second request sent by the client, and establish a websocket connection with the client according to the connection identifier carried in the second request;
[0024] A monitoring module: used to return the monitoring records obtained by monitoring the target program to the client through the websocket connection, so that the client can display a second page containing the monitoring records to the user. The monitoring records are used to reflect the status information of the target program during execution and the execution results obtained by executing the target program.
[0025] This specification provides a computer-readable storage medium. The storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned monitoring method is implemented.
[0026] This specification provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above-mentioned monitoring method is implemented.
[0027] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0028] The monitoring system provided in this specification has a client that is used to display a first page to the user. In response to a confirmation operation performed by the user on the first page, the client sends a first request and a second request to the server. The server is used to receive the first request and execute a target program that matches the program identifier carried in the first request to monitor the target program. Additionally, the server receives the second request and establishes a websocket connection with the client based on the connection identifier carried in the second request, and returns the monitoring records obtained from monitoring the target program to the client through the websocket connection. The client is used to receive the monitoring records and display them on a second page so that the user can perform adjustment operations based on the monitoring records displayed on the second page.
[0029] From this, it can be seen that in the above monitoring system, the server can monitor the target program and, through the websocket connection established with the client, in real time return the monitored records to the client for display on the second page, enabling the user to perform adjustment operations based on the monitoring records displayed on the second page. That is, in the above monitoring system, the server does not need to wait for the client to initiate a request to obtain the monitoring records. Instead, it can, through the websocket connection with the client, in real time return the monitoring records to the client, thereby enabling the user to observe the execution process of the target program in real time and greatly improving the monitoring effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The drawings described herein are used to provide a further understanding of this specification and form a part of this specification. The illustrative embodiments and descriptions thereof in this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:
[0031] Figure 1 It is a schematic diagram of a first page provided in this specification;
[0032] Figure 2 It is a schematic diagram of a second page provided in this specification;
[0033] Figure 3 It is a schematic flowchart of a monitoring method provided in this specification;
[0034] Figure 4 It is a schematic diagram of a monitoring device provided in this specification;
[0035] Figure 5 It corresponds to Figure 3 a schematic structural diagram of an electronic device. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this specification without creative efforts shall fall within the scope of protection of this specification.
[0037] Currently, during the development of a target program, to ensure that the developed target program can run stably and the running result meets expectations during subsequent actual applications, the target program can be pre-input into a monitoring system to monitor the execution process of the target program through the monitoring system, so as to make corresponding adjustments to the target program according to the monitoring results, so that the adjusted target program can run stably and the running result meets expectations. However, when using an existing monitoring system to monitor the execution process of a target program, the monitoring effect is often poor.
[0038] Therefore, this specification provides a monitoring system, through which the problems in the prior art can be effectively solved.
[0039] In this specification, the monitoring system may include a client and a server. The monitoring system can monitor the target program, so that users can make corresponding adjustments to the target program based on the monitoring results, so that the adjusted target program can run stably and the running result meets expectations.
[0040] In this specification, users can select a corresponding target program according to their own needs and monitor it. For example, in the monitoring system, the client can display a first page to the user. Further, the user can select the corresponding target program on the first page and perform a confirmation operation. After the client detects the user's confirmation operation, it can send a first request and a second request to the server in response to the confirmation operation performed by the user on the first page. The first request sent by the client may carry the program identifier of the target program. Different program identifiers are used to identify different target programs. The client can inform the server to execute the corresponding target program by sending the first request. For example, the first request may be an Http request carrying the program identifier. The second request (websocket connection request) sent by the client may carry the connection identifier for establishing a websocket connection with the server. Different connection identifiers are used to identify different websocket connection channels. The specific form of the first page can be referred to as follows Figure 1 。
[0041] Figure 1 It is a schematic diagram of a first page provided by this specification.
[0042] From Figure 1 it can be seen that the user can import each target program in advance. Correspondingly, the client can display a first page containing these target programs for the user. On the first page, the user can hover the mouse over the link corresponding to the target program, and the client will display the specific content of the target program on the right side of the first page. Moreover, each target program corresponds to a confirmation control, and the user can select the corresponding target program for monitoring by touching the confirmation control corresponding to the target program. Of course, Figure 1 this is just one form of the first page. In actual application, different first pages can be set according to actual needs, and this manual will not list them one by one here.
[0043] In addition, the user can directly configure various parameters included in the target program displayed on the first page, so as to monitor different configured target programs.
[0044] After receiving the first request, the server can execute the target program that matches the program identifier carried in the first request, and then can monitor the target program.
[0045] After receiving the second request, the server can establish a websocket connection with the client according to the connection identifier carried in the second request, and then can return the monitoring record obtained by monitoring the target program to the client through the established websocket connection. Among them, the monitoring record can reflect the status information during the execution of the target program and the execution result obtained by executing the target program. For example, the monitoring record can include information such as the running status (whether there is an abnormal operation), running process, and running result of each program code included in the target program during the execution process.
[0046] Correspondingly, after receiving the monitoring record sent by the server, the client can display the monitoring record on the second page, and then the user can perform adjustment operations (adjust the parameters in the target program, adjust some program codes, etc.) based on the monitoring record displayed on the second page.
[0047] It should be emphasized that in this manual, the server synchronizes the monitored monitoring record to the client in real time based on the established websocket connection with the client, so that the user can view and analyze the status information and execution result of the target program during the execution process based on these real-time synchronized monitoring records.
[0048] In this specification, the client can send the first request first and then the second request. Or, it can send the second request first and then the first request. Of course, it can also send the first request and the second request together. Therefore, the order of the first request and the second request is not limited here.
[0049] In the actual application process, due to reasons such as network latency, the websocket connection between the client and the server may become abnormal. Therefore, in the above monitoring system, when the websocket connection between the client and the server becomes abnormally connected, the client can resend the second request to the server. For example, the client can use the heartbeat mechanism to monitor whether the websocket connection with the server is abnormally connected. Specifically, the client can send a heartbeat request to the server, and after receiving the heartbeat request, the server can return a corresponding heartbeat response to the client. When the client does not receive the heartbeat response returned by the server within the specified time, it can be determined that the websocket connection with the server is abnormally connected, and thus the second request can be resent to the server.
[0050] Of course, when the websocket connection between the client and the server becomes abnormally connected, the client can also display the information of the websocket connection abnormality and the monitoring record on the second page for the user to view through the second page.
[0051] After receiving the second request resent by the client, the server can re - establish the websocket connection with the client based on the connection identifier included in the second request resent by the client, and return the monitoring record to the client through the re - established websocket connection.
[0052] In addition, in the actual application process, the user may need to monitor multiple target programs. For this purpose, the user can perform corresponding confirmation operations on each target program to be monitored on the first page displayed by the client. Correspondingly, the client can send the corresponding first request and second request to the server in response to each confirmation operation performed by the user. Furthermore, when executing the target programs, the server can determine the program execution sequence according to the priority of each target program corresponding to each first request, and execute each target program in sequence according to the order of the target programs in the program execution sequence.
[0053] For example, the server can determine the priorities of target programs by referring to the current resource status of the server (such as CPU occupancy rate, memory occupancy rate, etc.) and the resource consumption of each target program (such as the memory space required to execute the target program). Among them, the server can determine the target programs (Target Program A and Target Program B) corresponding to each first request received within a specified time period. If the resource consumption of Target Program A is significantly higher than that of Target Program B, and the current memory occupancy rate of the server is relatively high, then, in order to reduce the load on the server, Target Program B can be preferentially executed (that is, the priority of Target Program B is higher than that of Target Program A), and then Target Program A is executed.
[0054] Of course, the server can also execute each target program directly based on the time when the first request is received without considering the current resource status and the resource consumption of each target program, that is, the earlier the first request is received, the more preferentially the target program corresponding to it is executed.
[0055] During the process of monitoring the target program, when the server monitors that an exception occurs in the execution process of the target program, it can determine at least part of the program code in the target program where the exception occurs. Furthermore, based on the determined at least part of the program code where the exception occurs, it can determine the exception cause information of the program code where the exception occurs and return the exception cause information to the client.
[0056] For example, there may be a situation where there is a syntax error in the program code in the target program. For this situation, during the execution of the target program by the server, the program code at the point where the code execution abnormally stops can be used as the program code where the exception occurs. Correspondingly, the exception cause information (such as: the current program code is missing a semicolon and a parenthesis.) can be determined based on the program code where the exception occurs, and the exception cause information is returned to the client.
[0057] Another example is that there may be a situation where there is a logical error in the program code in the target program. For this situation, during the execution of the target program by the server, it can monitor the output results of each program code in the target program. If it monitors that the output result of a certain program code is empty, then it can be determined that there is a logical error in the current program code. Then, the exception cause information (the current program code has a logical error) can be determined based on the program code where the exception occurs, and the exception cause information is returned to the client.
[0058] For another example, issues such as incorrect file paths in the program code or file formats not conforming to the preset format may also occur in the target program. To address this, the server can monitor the execution process of the target program. When it detects a failure in data reading, it takes the corresponding program code as the abnormal program code. Then, it can determine the abnormal cause information based on the abnormal program code (the file path called by the current program code is incorrect, resulting in a data reading failure) and return the abnormal cause information to the client.
[0059] Furthermore, the client can receive the abnormal cause information sent by the server and display it on the second page, enabling it to be used to adjust the target program based on the abnormal cause information displayed on the second page (such as: correcting syntax errors at the location of the abnormal program code, adjusting the code logic at the location of the abnormal program code, etc.).
[0060] In addition, when the server monitors an abnormality in the execution process of the target program, it can generate corresponding reference adjustment information and return the reference adjustment information to the client. The reference adjustment information can be used to guide the user on how to specifically adjust the abnormal program code in the target program. Correspondingly, the client can receive the reference adjustment information and display it on the second page, enabling the user to adjust the target program based on the reference adjustment information displayed on the second page. The second page can be specifically referred to as follows Figure 2 .
[0061] Figure 2 This is a schematic diagram of a second page provided in this specification.
[0062] As Figure 2 can be seen, the monitoring record of the target program B being executed can be displayed on the second page. From the displayed monitoring record of the target program B, it can be seen that there is abnormal program code during the execution of the target program B. And from the reference adjustment information therein, it can be seen that a semicolon needs to be added at the position corresponding to the third line of the target program B to resolve the abnormal situation of the target program B. Of course, Figure 2 this is just one form of the first page. In actual application, different first pages can be set according to actual needs, and this specification will not list them one by one here.
[0063] Of course, in this specification, in addition to being able to adjust the abnormal program code in the target program, the user can also adjust the various parameters in the target program according to the running results of the respective program codes of the target program in the monitoring record, so that the execution result of the adjusted target program meets the expectations.
[0064] In addition, in the above system, there is no restriction on the type of the target program, such as C code, C++ code, JAVA code, python code, etc.
[0065] It can be seen from this that in the above monitoring system, the server can monitor the target program and, through the websocket connection established with the client, return the monitored monitoring records to the client in real time, so as to display the monitoring records on the second page, enabling the user to execute the adjustment service according to the monitoring records displayed on the second page. That is, in the above monitoring system, the server does not need to wait for the client to initiate a request to obtain the monitoring records, but can return the monitoring records to the client in real time through the websocket connection with the client, thereby enabling the user to observe the execution process of the target program in real time and greatly improving the monitoring effect.
[0066] In addition to the description of the above monitoring system, this specification also provides a monitoring method, as Figure 3 shown. This method is applied to the server included in the above monitoring system.
[0067] Figure 3 It is a schematic flowchart of a monitoring method provided by this specification.
[0068] S301: Obtain a first request sent by the client, execute a target program that matches the program identifier carried in the first request to monitor the target program, and obtain a second request sent by the client, and establish a websocket connection with the client according to the connection identifier carried in the second request.
[0069] In the above monitoring method, the server can monitor the currently executed target program and return the monitoring records obtained by monitoring the target program to the user in real time. Specifically, after the server receives the second request sent by the client used by the user, it can establish a websocket connection with the client, and thus can return the monitored monitoring records to the client in real time through the established websocket connection with the client, so as to facilitate the user to view each piece of information in the monitoring records in real time.
[0070] S302: Return the monitoring records obtained by monitoring the target program to the client through the websocket connection, so that the client displays a second page containing the monitoring records to the user, and the monitoring records are used to reflect the status information of the target program during the execution process and the execution result obtained by executing the target program.
[0071] After the server returns the monitoring records to the client, the client can display the monitoring records on the second page. Furthermore, the user can make corresponding adjustments to the target program based on the monitoring records displayed on the second page. For example, when the monitoring records indicate that a syntax error occurs at the second line of the target program, the user can make appropriate modifications to the second line of the target program. Another example is that the user can also make corresponding adjustments to the various parameters included in the target program based on the running results of the program codes in the target program recorded in the monitoring records, so that the adjusted target program meets the expected requirements.
[0072] Of course, in the actual application process, the user may need to monitor multiple target programs. For this purpose, the server can determine the program execution sequence according to the priorities of these target programs. For example, the priorities of the target programs can be determined by referring to the resource consumption of each target program and the current resource status of the server. Furthermore, the target programs can be executed according to the determined program execution sequence. Or, the corresponding target programs can be directly executed in the order of the time when the first request is received.
[0073] It can be seen from this that in the above monitoring method, the server can monitor the target program and, through the websocket connection established with the client, return the monitored monitoring records to the client in real time, so as to display the monitoring records on the second page, enabling the user to perform adjustment operations based on the monitoring records displayed on the second page. That is, in the above monitoring system, the server does not need to wait for the client to initiate a request to obtain the monitoring records, but can return the monitoring records to the client in real time through the websocket connection with the client, thereby enabling the user to observe the execution process of the target program in real time, greatly improving the monitoring effect.
[0074] The above is the method of one or more embodiments of this specification. Based on the same idea, this specification also provides a monitoring device, as Figure 4 shown.
[0075] Figure 4 The figure is a schematic diagram of a monitoring device provided in this specification. This device is deployed in the server included in the above monitoring system and includes:
[0076] The first acquisition module 401: configured to acquire a first request sent by the client, execute a target program that matches the program identifier carried in the first request to monitor the target program, and acquire a second request sent by the client, and establish a websocket connection with the client according to the connection identifier carried in the second request;
[0077] Monitoring module 402: It is used to return the monitoring records obtained by monitoring the target program to the client through the websocket connection, so that the client can display a second page containing the monitoring records to the user. The monitoring records are used to reflect the status information of the target program during execution and the execution results obtained by executing the target program.
[0078] Optionally, the device further includes: a sorting module 403;
[0079] The sorting module 403 is specifically configured to: when receiving multiple first requests sent by the client, determine a program execution sequence according to the priorities of the target programs corresponding to each first request, so as to execute each target program in sequence according to the order of the target programs in the program execution sequence.
[0080] This specification also provides a computer-readable storage medium, which stores a computer program that can be used to execute the above Figure 3 shown monitoring method.
[0081] This specification also provides Figure 5 a schematic structural diagram of an electronic device corresponding to Figure 3 as shown. As Figure 5 shown, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory. Of course, it may also include other hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above Figure 3 shown monitoring method.
[0082] Of course, in addition to the software implementation, this specification does not exclude other implementation methods, such as logical devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logical unit, and can also be hardware or logical devices.
[0083] In the 1990s, it was possible to clearly distinguish whether an improvement to a technology was a hardware improvement (e.g., an improvement to the circuit structure of diodes, transistors, switches, etc.) or a software improvement (an improvement to the method flow). However, with the development of technology, many method flow improvements today can be regarded as direct improvements to the hardware circuit structure. Almost all designers obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented using a hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is an integrated circuit whose logical function is determined by the user programming the device. Designers can program themselves to "integrate" a digital system onto a single PLD without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, today, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a Hardware Description Language (HDL). There is not only one type of HDL, but many types, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into the integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.
[0084] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to make the controller implement the same function in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or the structures within the hardware component.
[0085] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0086] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0087] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0088] This specification is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the specification. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, so that the instructions executed by the processors of the computer or other programmable data processing devices produce a means for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 means for implementing the functions specified in one or more boxes or multiple boxes.
[0089] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including an instruction means that implements the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 means for implementing the functions specified in one or more boxes or multiple boxes.
[0090] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the Figure 1 one or more flows and / or blocks Figure 1 means for implementing the functions specified in one or more boxes or multiple boxes.
[0091] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and a memory.
[0092] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0093] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0094] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0095] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0096] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0097] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the corresponding descriptions in the method embodiments.
[0098] The above description is only for the embodiments of this specification and is not intended to limit this specification. For those skilled in the art, various modifications and changes can be made to this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this specification shall be included within the scope of the claims of this specification.
Claims
1. A monitoring system, wherein, The system is used to monitor a target program. The system includes: a client and a server. Among them, The client is used to display a first page to the user, and in response to the confirmation operation performed by the user on the first page, send a first request and a second request to the server. The first request carries the program identifier of the target program, and the second request carries the connection identifier for establishing a websocket connection with the server; The server is used to receive the first request, and execute the target program that matches the program identifier carried in the first request to monitor the target program. In addition, the server is used to receive the second request, and establish a websocket connection with the client according to the connection identifier carried in the second request, so as to return the monitoring record obtained by monitoring the target program to the client through the websocket connection. The monitoring record is used to reflect the status information during the execution of the target program and the execution result obtained by executing the target program; The client is used to receive the monitoring record and display the monitoring record on a second page, so that the user can perform adjustment operations based on the monitoring record displayed on the second page.
2. The system according to claim 1, wherein The client is also used to, when a connection exception occurs in the websocket connection between the client and the server, resend the second request to the server; The server is also used to receive the second request resent by the client, and re-establish a websocket connection with the client based on the connection identifier included in the second request resent by the client received.
3. The system according to claim 1, wherein The server is also used to, when receiving multiple first requests, determine the program execution sequence according to the priorities of the target programs corresponding to each first request, so as to execute each target program in sequence according to the order of the target programs in the program execution sequence.
4. The system according to claim 1, wherein The server is also used to, when an exception occurs in the execution process of the target program, determine at least part of the program code that has a runtime exception in the target program, so as to determine the exception cause information based on the at least part of the program code, and return the exception cause information to the client; The client is also used to receive the exception cause information and display the exception cause information on the second page, so that the user can adjust the target program based on the exception cause information displayed on the second page.
5. The system according to claim 1, wherein The server is also used to, when an exception occurs in the execution process of the target program, generate reference adjustment information and return the reference adjustment information to the client; The client is also used to receive the reference adjustment information and display the reference adjustment information on the second page, so that the user can adjust the target program based on the reference adjustment information displayed on the second page.
6. A monitoring method, characterized in that, The method is applied to a server and includes: Obtain a first request sent by a client, execute a target program that matches the program identifier carried in the first request to monitor the target program, and obtain a second request sent by the client, and establish a websocket connection with the client according to the connection identifier carried in the second request; Return the monitoring record obtained by monitoring the target program to the client through the websocket connection, so that the client can display a second page containing the monitoring record to the user, and the monitoring record is used to reflect the status information of the target program during execution and the execution result obtained by executing the target program.
7. The method according to claim 6, wherein The method further includes: When receiving multiple first requests sent by the client, determine a program execution sequence according to the priorities of the target programs corresponding to each first request, so as to execute each target program in sequence according to the order of the target programs in the program execution sequence.
8. A monitoring device, characterized in that, Includes: A first acquisition module: used to obtain a first request sent by a client, execute a target program that matches the program identifier carried in the first request to monitor the target program, and obtain a second request sent by the client, and establish a websocket connection with the client according to the connection identifier carried in the second request; A monitoring module: used to return the monitoring record obtained by monitoring the target program to the client through the websocket connection, so that the client can display a second page containing the monitoring record to the user, and the monitoring record is used to reflect the status information of the target program during execution and the execution result obtained by executing the target program.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any one of claims 6-7 above is implemented.
10. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, the method described in any one of claims 6-7 above is implemented.