Process running monitoring method, electronic device and storage medium

By acquiring and matching process information, multi-process application monitoring was achieved without an SDK, solving the problem of poor monitoring stability in existing technologies and realizing efficient multi-process monitoring.

CN122195784APending Publication Date: 2026-06-12GUANGZHOU BOGUAN TELECOMM TECH LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU BOGUAN TELECOMM TECH LTD
Filing Date
2026-01-20
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing technologies cannot achieve accurate monitoring of multi-process applications without requiring applications to access the SDK, and factors such as network fluctuations lead to poor monitoring stability.

Method used

By acquiring the first process information of the target application and adding it to the first process list, acquiring the information of each running second process and adding it to the second process list, traversing the second process list and matching it with the first process list, using the process identifier and parent process identifier to determine the matching result, and adding the successfully matched second process information to the first process list, multi-process target application monitoring is achieved.

🎯Benefits of technology

It can accurately monitor the working status of multi-process applications without relying on SDK, improving the stability and efficiency of monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122195784A_ABST
    Figure CN122195784A_ABST
Patent Text Reader

Abstract

The application discloses a process running monitoring method, an electronic device and a storage medium. The method comprises the following steps: obtaining first process information of a first process to be monitored of a target application program, and adding the first process information into a first process list; obtaining second process information of each second process running, and adding each second process information into a second process list; traversing the second process information in the second process list, and matching the second process information with the first process list based on the second process information to obtain a matching result, wherein the second process information at least comprises process identification and parent process identification; if the matching result is a matching success, adding the second process information into the first process list; and determining a working state of the target application program based on the matching result of each second process information, wherein the working state comprises running or stopping running. The monitoring of a multi-process application program can be realized without relying on an SDK.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of battery capacity testing technology, specifically to a process operation monitoring method, electronic device, and storage medium. Background Technology

[0002] Currently, process monitoring relies on SDKs (Software Development Kits), which can only monitor single processes and cannot handle multi-process monitoring scenarios. Furthermore, factors such as network fluctuations may lead to decreased monitoring stability.

[0003] Therefore, how to accurately monitor the running status of multi-process applications without requiring the application to access any SDK is an urgent problem to be solved. Summary of the Invention

[0004] This application provides a method, electronic device, and storage medium for monitoring the operation of processes, which can monitor multi-process applications without relying on an SDK.

[0005] On one hand, embodiments of this application provide a method for monitoring the execution of a process, the method comprising: Obtain the first process information of the first process to be monitored in the target application, and add the first process information to the first process list; Obtain the second process information of each running second process, and add the second process information to the second process list; Traverse the second process information in the second process list, and match the second process information with the first process list to obtain the matching result. The second process information includes at least the process identifier and the parent process identifier. If the matching result is a successful match, then the second process information is added to the first process list; Based on the matching results of each of the second process information, the working status of the target application is determined, including running or stopped running.

[0006] On the other hand, embodiments of this application provide an electronic device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the process monitoring method described in any of the above embodiments by calling the computer program stored in the memory.

[0007] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute the process monitoring method described in any of the above embodiments.

[0008] The process monitoring method, electronic device, and storage medium provided in this application acquire first process information of the first process to be monitored, and then add the first process information to a first process list for easy process matching later. Next, the second process information of each currently running second process is added to a second process list. Then, by traversing the second process information (such as process identifier and parent process identifier) ​​in the second process list, the running processes in the second process list are matched with the processes to be monitored in the first process list, thereby obtaining the matching results for each second process information. After each second process information is matched, the successfully matched second process information is added to the first process list. This allows for accurate monitoring of the working status of a multi-process target application without relying on an SDK. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a schematic diagram of a monitoring system provided in an embodiment of this application.

[0011] Figure 2 This is a first flowchart illustrating the process monitoring method provided in an embodiment of this application.

[0012] Figure 3 This is a second flowchart illustrating the process monitoring method provided in an embodiment of this application.

[0013] Figure 4 This is a schematic diagram of the operation monitoring device provided in the embodiments of this application.

[0014] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0016] This application provides a method, apparatus, storage medium, device, and program product for monitoring the execution of processes. Specifically, the process monitoring method of this application can be executed by an electronic device, which can be a terminal or a server, etc.

[0017] The terminal can be a smartphone, tablet, laptop, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a game client, browser client, instant messaging client, or mini-program, etc.

[0018] A server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0019] For example, when the process monitoring method runs on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present game visuals and receive commands generated by the player interacting with the game visuals. The game visuals may include a portion of a virtual game scene, which is a virtual world where virtual characters move. The processor is used to store the game application, run the game, generate game visuals, respond to commands, and control the display of the game visuals on the display screen. When the player interacts with the game visuals through the display screen, the game visuals can control the local content of the terminal device in response to the received operation commands. The terminal device can provide the graphical user interface to the player in various ways, such as rendering the display on the terminal device's screen or presenting the graphical user interface through holographic projection.

[0020] For example, when the process monitoring method runs on a server, it can be implemented and executed based on a cloud system. A cloud system refers to a gaming approach based on cloud computing. A cloud system includes servers and client devices. The core of the game application and the core of the game screen presentation are separate. The storage and execution of the process monitoring method are completed on the server. The game screen presentation is completed on the client, which is mainly used for receiving and sending game data and displaying the game screen. For example, the client can be a display device with data transmission capabilities located close to the player, such as a mobile terminal, television, computer, PDA, personal digital assistant, or head-mounted display device. However, the terminal device for processing game data is the server in the cloud. During gameplay, the player operates the client to send commands to the server. The server controls the game operation according to the commands, encodes and compresses game screen data, returns it to the client via the network, and finally, the client decodes and outputs the game screen.

[0021] It should be noted that in the embodiments of this application, the execution subject of the process running monitoring method can be a terminal device or a server, and the embodiments of this application do not limit the type of execution subject.

[0022] It is understood that in the specific implementation of this application, user object data, context data and other related data are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0023] For example, in conjunction with the above description, Figure 1 This application illustrates a monitoring system 1000 for implementing a process monitoring method, as provided in an embodiment of this application. The monitoring system 1000 may include at least one terminal 1001, at least one server 1002, at least one database 1003, and a network. The terminal 1001 can connect to different servers via the network. The terminal can be any device with computing hardware capable of supporting and executing software application tools corresponding to the game.

[0024] In the aforementioned monitoring system 1000, terminal 1001 is used to install and run the game application. In some cases, the game application may not need to be pre-installed on terminal 1001, and players can directly access the game through a browser or other client. Players log in to the game application using their registered game account to control the virtual character corresponding to that account and participate in the game. When a player logs in to the game application, terminal 1001 sends a login request to server 1002. Server 1002 verifies the game account used by the player and determines the game mechanism corresponding to the game account based on the login request. If the verification is successful, a login success notification is returned to terminal 1001. During the player's participation in the game through the game application, terminal 1001 and server 1002 exchange data. Terminal 1001 sends various information to server 1002. Server 1002 determines the display data for terminal 1001 based on the stored game mechanism and the received information, and sends the display data back to terminal 1001 so that terminal 1001 can display the display data sent by server 1002 to the player.

[0025] In possible application scenarios, different terminals 1001 may be served by different servers 1002. Therefore, in order to distinguish the servers 1002 corresponding to different game terminals 1001, the embodiments of this application will use the terms "first" and "second" to describe them. In fact, the servers 1002 corresponding to different game terminals 1001 can be the same server 1002. Therefore, without distinguishing between "first" and "second", it can be understood that the terminals 1001 corresponding to virtual characters in the same game scene are served by the same server 1002.

[0026] Furthermore, when the monitoring system 1000 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and servers. The network can be a wireless network or a wired network; for example, wireless networks include Wireless Local Area Network (WLAN), Local Area Network (LAN), cellular networks, 2G networks, 3G networks, 4G networks, 5G networks, etc. Additionally, different terminals can also connect to other terminals or to servers using their own Bluetooth networks or hotspot networks. Furthermore, the system 100 can include multiple databases coupled to different servers, and can continuously store game-related information in the databases while different users are playing multiplayer games online.

[0027] It should be noted that in this embodiment, multiple terminal devices are running the same virtual game. Therefore, data interaction between the multiple terminal devices can be achieved through the virtual game's server. Thus, sending data from terminal device 1 to terminal device 2 can be understood as: terminal device 1 sends data to the virtual game's server, and the server sends the data to terminal device 2. Receiving data from terminal device 2 can be understood as: terminal device 1 receives data sent by the virtual game's server, which is the data sent by terminal device 2 to the server. Alternatively, there may be no game server, and terminal device 1 directly sends game data to terminal device 2.

[0028] It should be noted that, Figure 1 The schematic diagram of the monitoring system shown is merely an example. The monitoring system 1000 described in this application embodiment is intended to more clearly illustrate the technical solution of this application embodiment and does not constitute a limitation on the technical solution provided in this application embodiment. As those skilled in the art will know, with the evolution of monitoring systems and the emergence of new business scenarios, the technical solution provided in this application embodiment is also applicable to similar technical problems.

[0029] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0030] Please see Figure 2 It should be noted that the steps shown may be executed in a logical order different from that shown in the flowchart. The process monitoring method of this application may include the following steps: Step 011: Obtain the first process information of the first process to be monitored in the target application, and add the first process information to the first process list; In this context, a process refers to a running instance of a program within the operating system, serving as an independent unit for resource allocation and scheduling. Each process is identified by a unique process identifier. The first process specifically refers to the first process created when the target application starts; it can be understood that the target application may create one or more processes during its subsequent execution.

[0031] The process information includes information related to the process. For example, process information includes the process name, process path, process identifier (such as process ID (PID)), and parent process identifier (such as parent process ID (ParentID)).

[0032] The process name refers to the name of the process, used to identify the application corresponding to that process; the process path refers to the complete storage location on the disk of the executable file (or script) corresponding to the process running in the operating system, which is the core basis for locating the source of the process and judging its legitimacy; the process identifier is a unique numerical identifier assigned by the operating system kernel to each running process; and the parent process identifier refers to the process identifier of the parent process that the current process depends on.

[0033] Before creating the first process of the target application, you can obtain the list of processes to be monitored for the target application through the server interface. The list of processes to be monitored generally includes at least the process information of the first process created by the target application. The first process information of the first process in the list of processes to be monitored can be saved to the first process list for subsequent process matching.

[0034] In one optional embodiment, to ensure the effectiveness of process monitoring, after any target application starts, a first process of the target application is created (e.g., through a preset process creation function). Then, it is determined whether the process ID of the created first process is greater than 0. If the process ID of the first process is greater than 0, the first process is determined to be valid, allowing for subsequent process matching and monitoring of the target application's runtime status. If the process ID of the first process is less than or equal to 0, the first process is determined to be invalid, and monitoring of the target application is stopped.

[0035] Step 012: Obtain the second process information of each running second process and add the second process information to the second process list.

[0036] It is understandable that to monitor the working status of a target application, it is necessary to determine whether the processes associated with the target application are running.

[0037] Therefore, it is necessary to obtain the secondary process information of each running secondary process. For example, taking the Windows system as an example, the various secondary processes can be quickly obtained by obtaining the system's process snapshot information.

[0038] At this point, the various second processes running in the system are identified. If a second process is a process of the target application, then the target application can be confirmed to be running. Therefore, the information of each second process can be added to a second process list, and then the second process list can be matched with the first process list to determine whether the processes in the first process list are running, thereby achieving the monitoring of the target application.

[0039] Step 013: Traverse the second process information in the second process list, and match the second process information with the first process list to obtain the matching result. The second process information includes at least the process identifier and the parent process identifier.

[0040] After constructing the first and second process lists, process matching can begin. At this point, the process iterates through each process in the second process list, selecting any untraversed process and matching it against the first process list (e.g., by process name, process ID, parent process ID, etc.) to determine the matching result. The matching result indicates whether a matching process exists for that process in the first process list; if the matching result is a match, it means that a matching process exists for that process in the first process list; if the matching result is a no-match, it means that a matching process does not exist for that process in the first process list.

[0041] Optionally, when performing process matching, at least one of the process name, process path, process identifier, and parent process identifier of the currently traversed second process information can be matched with each of the third process information in the first process list to obtain the matching result.

[0042] Therefore, by using process information from multiple dimensions, the comprehensiveness and accuracy of process matching can be improved.

[0043] Please see Figure 3 Optionally, step 013 includes: Step 0131: Compare the process name of the second process information currently being traversed with the process names of each third process information to obtain the first comparison result; Step 0132: If the first comparison result is inconsistent, then the matching result is determined to be a mismatch, and it is determined whether the second process information currently being traversed is the last matched second process information; Step 0133: If yes, then confirm that all second process information in the second process list has been matched. Step 0134: If not, continue traversing the next second process information; Step 0135: If the first comparison result is consistent, determine whether the process path is empty; Step 0136: If the process path is not empty, determine whether the process path is located in the installation directory of the target application. Step 0137: If the process path is located in the installation directory of the target application, determine that the matching result is a match; Step 0138: If the process path is not located in the installation directory of the target application, determine that the matching result is a mismatch, and continue to traverse the next second process information.

[0044] Specifically, when performing process matching between the second process information and each third process information in the first process list, the process name of the selected second process information (hereinafter referred to as the current traversed process) can be compared with the process names of each third process information to obtain the first comparison result, and determine whether there is a third process in the first process list with the same process name as the current traversed process, thereby determining the first comparison result.

[0045] If a third process with the same name as the currently traversed process exists in the first process list, the first comparison result is determined to be consistent. If no third process with the same name as the currently traversed process exists in the first process list, the first comparison result is determined to be inconsistent.

[0046] If the first comparison result is inconsistent, it can be determined that the matching result of the current traversal process is a mismatch; then, it is determined whether the current traversal process is the second process information of the last match.

[0047] It's understandable that when process names are inconsistent, there's basically no need to match other information to determine that the matching result of the currently traversed process is a mismatch.

[0048] At this point, it's sufficient to determine if the second process list has been completely traversed (i.e., whether the currently traversed process is the last matched second process information). If not, quickly traverse the next second process information. If the traversal is complete, it's confirmed that all second process information in the second process list has been matched, and the working status of the target application can be determined based on the matching results of each second process information.

[0049] In this way, by using the process name, the current traversal process can be quickly matched, reducing the amount of computation required for matching.

[0050] If the first comparison result is consistent, it means that there is a third process with the same process name in the first process list of the current traversal process. However, process names can be tampered with. Therefore, it is not very reliable to directly determine the matching result of the current traversal process simply by the consistency of process names.

[0051] Therefore, if the first comparison result is consistent, the first step is to determine if the process path is empty. If the process path is not empty, the next step is to determine if the process path is located in the target application's installation directory. If the process path is also located in the target application's installation directory, then through the dual verification of the process name and process path, it can be basically determined that the currently traversed process has a matching third process in the first process list, meaning the matching result of the currently traversed process is a match. However, if the process path is not located in the target application's installation directory, it can be determined that the process name may have been tampered with. In this case, the matching result of the currently traversed process can be determined as a mismatch, and the traversal of the next second process information continues.

[0052] Thus, by combining the dual verification of process name and process path, the efficiency and reliability of process matching can be guaranteed.

[0053] Optionally, step 013 further includes: Step 0139: When the process path is empty, compare the process identifier of the second process information with the process identifiers of each third process information to obtain the second comparison result. Step 0140: If the second comparison result is consistent, the matching result is determined to be a match; Step 0141: If the second comparison result is inconsistent, compare the parent process identifier of the second process information with the process identifier of each third process information to obtain the third comparison result. Step 0142: If the third comparison result is consistent, the matching result is determined to be a match; Step 0143: If the third comparison result is inconsistent, determine that the matching result is not a match, and continue to traverse the next second process information.

[0054] Specifically, if the process name matches but the process path is empty, it is necessary to combine other process information to further determine the matching of the processes.

[0055] Therefore, when the process path is empty, the process identifier of the second process information (i.e., the currently traversed process) is compared with the process identifiers of each third process information to obtain the second comparison result.

[0056] If the process identifier of the current traversed process matches the process identifier of any third process, the second comparison result is determined to be consistent; if the process identifier of the current traversed process does not match the process identifiers of all third processes, the second comparison result is determined to be inconsistent.

[0057] If the second comparison result is consistent, then by combining the dual verification of process name and process ID, it can be basically determined that there is a matching third process in the first process list of the currently traversed process, and the matching result can be determined to be a match.

[0058] If the second comparison result is inconsistent, it is considered that the currently traversed process may be a child process of one of the third processes in the first process list. Therefore, the parent process identifier of the currently traversed process is compared with the process identifiers of each third process to obtain the third comparison result.

[0059] If the parent process identifier of the current traversed process matches the process identifier of any third process, it can be determined that the current traversed process is a child process of one of the third processes in the first process list, and the third comparison result is determined to be consistent. If the parent process identifier of the current traversed process does not match the process identifier of any of the third process information, it can be determined that the current traversed process is not a child process of any of the third processes in the first process list, and the third comparison result is determined to be inconsistent.

[0060] If the third comparison result is consistent, then by combining the double verification of the process name and the parent process ID, it can be basically determined that the currently traversed process is a child process of one of the third processes in the first process list, and the matching result can be confirmed as a match.

[0061] If the third comparison result is inconsistent, it can be determined that the current traversed process is not a child process of any third process in the first process list, and it has been determined that the current traversed process does not have a matching third process in the first process list. Therefore, it can be determined that the matching result of the current traversed process is not a match, and the next second process information is traversed until all second process information is matched.

[0062] Optionally, step 0140 includes: Step 01401: If the second comparison result is consistent, determine whether the process path of the second process information corresponding to the process identifier is located in the installation directory of the target application. Step 01402: If yes, then the matching result is determined to be a match; Step 01403: If not, determine that the matching result is a mismatch and continue to traverse the next second process information.

[0063] Specifically, to prevent process IDs from being tampered with, after combining the process name and process ID for dual verification, it is also necessary to further verify the process path to determine whether the process path of the second process information corresponding to the process ID is located in the installation directory of the target application. If so, the matching result can be accurately determined as a match; if not, the process ID may have been tampered with. In this case, to ensure reliability, the matching result can be updated to a non-match.

[0064] Optionally, step 0140 includes: Step 01401: If the third comparison result is consistent, determine whether the process path of the second process information corresponding to the parent process identifier is located in the installation directory of the target application. Step 01402: If yes, then the matching result is determined to be a match; Step 01403: If not, determine that the matching result is a mismatch and continue to traverse the next second process information.

[0065] Specifically, to prevent the parent process ID from being tampered with, after combining the process name and the parent process ID for dual verification, it is also necessary to further verify the process path to determine whether the process path of the second process information corresponding to the parent process ID is located in the installation directory of the target application. If so, the matching result can be accurately determined as a match; if not, the parent process ID may have been tampered with. In this case, to ensure reliability, the matching result can be updated to a non-match.

[0066] Step 015: If the matching result is successful, add the second process information to the first process list; After determining the matching result, if the match is successful, it indicates that the second process information has a matching process in the first process list, meaning that the second process information is one of the processes associated with the target application. Therefore, the second process information can be added to the first process list so that the first process list contains all processes associated with the target application. This way, when traversing the next piece of second process information, matching the second process information with the first process list can achieve multi-process matching, thereby enabling the monitoring of multiple target applications. Afterwards, the process can continue to traverse other pieces of second process information in the second process list until all second process information has been matched.

[0067] If the second process information does not have a matching process in the first process list, then continue to traverse other second process information in the second process list until all second process information is matched.

[0068] Step 016: Based on the matching results of each second process information, determine the working status of the target application, which includes running or stopped running.

[0069] After traversing and obtaining the matching results of each second process, it is possible to determine whether the target application is running or has stopped running based on the matching results of each second process.

[0070] It can be understood that if the matching result corresponding to any second process information is a match, it means that any process associated with the target application is running, and at this time the target application can be considered to be running.

[0071] If all the matching results for the second process information are non-matches, it can be determined that all processes associated with the target application are not running, and the target application is in a stopped state.

[0072] Optionally, the working status of the target application can be updated every preset period.

[0073] This allows for the timely updating of the target application's working status, ensuring that the target application's working status is always up-to-date and improving the effectiveness of target application monitoring.

[0074] The process monitoring method provided in this application obtains the first process information of the first process to be monitored and then puts the first process information into a first process list for easy process matching later. Then, it puts the second process information of each currently running second process into a second process list. Next, by traversing the second process information (such as process identifier and parent process identifier) ​​in the second process list, it matches the running processes in the second process list with the processes to be monitored in the first process list, thereby obtaining the matching results for each second process information. After each second process information is matched, the successfully matched second process information is put into the first process list. This method can accurately monitor the working status of a multi-process target application without relying on an SDK.

[0075] To facilitate better implementation of the process monitoring method of this application embodiment, this application embodiment also provides a process monitoring device. Please refer to... Figure 4 , Figure 4 A schematic diagram of the structure of the operation monitoring device provided in an embodiment of this application. The operation monitoring device 200 may include: The first acquisition module 201 is used to acquire the first process information of the first process to be monitored in the target application and add the first process information to the first process list; The second acquisition module 202 is used to acquire the second process information of each running second process and add the second process information to the second process list; The traversal module 203 is used to traverse the second process information in the second process list, and match the second process information with the first process list to obtain the matching result. The second process information includes at least the process identifier and the parent process identifier. If the matching result is successful, the second process information is added to the first process list. The monitoring module 204 is used to determine the working status of the target application based on the matching results of each second process information. The working status includes running or stopped running.

[0076] Each module or unit in the aforementioned operation monitoring device can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in the electronic device in hardware form, or stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each unit.

[0077] The operation monitoring device 200 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the operation monitoring device 200 can be the terminal or server.

[0078] Optionally, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0079] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may be a terminal or a server. Figure 5 As shown, the electronic device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figures does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0080] The processor 301 is the control center of the electronic device 300. It connects various parts of the electronic device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it executes various functions of the electronic device 300 and processes data, thereby performing overall processing of the electronic device 300.

[0081] Optional, such as Figure 5As shown, the electronic device 300 also includes: a display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0082] The display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 301, and can receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel according to the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the display screen 303 can also be used as part of the input unit 306 to achieve input functions.

[0083] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.

[0084] Audio circuitry 305 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and then processed by processor 301 before being transmitted via radio frequency circuitry 304 to, for example, another electronic device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and electronic devices.

[0085] The input unit 306 can be used to receive input numbers, characters, or object feature information (such as fingerprints, irises, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0086] Power supply 307 is used to supply power to various components of electronic device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0087] although Figure 5 As not shown in the diagram, the electronic device 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0088] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to an electronic device, and the computer program causes the electronic device to execute the corresponding processes in the process monitoring method described in the embodiments of this application; for brevity, further details are omitted here.

[0089] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the corresponding process in the process monitoring method described in the embodiments of this application. For simplicity, further details are omitted here.

[0090] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0091] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0092] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0093] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0094] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0096] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0097] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0098] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device (which may be a personal computer or a server) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0099] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for monitoring the execution of a process, characterized in that, include: Obtain the first process information of the first process to be monitored in the target application, and add the first process information to the first process list; Obtain the second process information of each running second process, and add the second process information to the second process list; Traverse the second process information in the second process list, and match the second process information with the first process list to obtain the matching result. The second process information includes at least the process identifier and the parent process identifier. If the matching result is a successful match, then the second process information is added to the first process list; Based on the matching results of each of the second process information, the working status of the target application is determined, including running or stopped running.

2. The operation monitoring method according to claim 1, characterized in that, The second process information also includes the process name and process path. The matching process based on the second process information with the first process list to obtain a matching result includes: The process name, process path, process identifier, and parent process identifier of the currently traversed second process information are matched with each third process information in the first process list to obtain the matching result.

3. The operation monitoring method according to claim 2, characterized in that, The step of matching at least one of the process name, process path, process identifier, and parent process identifier of the currently traversed second process information with each third process information in the first process list to obtain a matching result includes: The process name of the second process information currently being traversed is compared with the process names of each third process information to obtain the first comparison result; If the first comparison result is inconsistent, then the matching result is determined to be a mismatch, and it is determined whether the second process information currently being traversed is the last matched second process information; If so, then it is determined that all the second process information in the second process list has been matched; If not, continue traversing the next second process information; If the first comparison result is consistent, determine whether the process path is empty; If the process path is not empty, determine whether the process path is located in the installation directory of the target application; If the process path is located in the installation directory of the target application, the matching result is determined to be a match; If the process path is not located in the installation directory of the target application, the matching result is determined to be a mismatch, and the process continues to traverse the next second process information.

4. The operation monitoring method according to claim 3, characterized in that, The step of matching at least one of the process name, process path, process identifier, and parent process identifier of the currently traversed second process information with each third process information in the first process list to obtain a matching result also includes: When the process path is empty, the process identifier of the second process information is compared with the process identifier of each of the third process information to obtain a second comparison result; If the second comparison result is consistent, the matching result is determined to be a match; If the second comparison result is inconsistent, the parent process identifier of the second process information is compared with the process identifier of each of the third process information to obtain the third comparison result; If the third comparison result is consistent, the matching result is determined to be a match; If the third comparison result is inconsistent, the matching result is determined to be a mismatch, and the process continues to traverse the next piece of second process information.

5. The operation monitoring method according to claim 4, characterized in that, The step of determining the matching result as a match when the second comparison result is consistent includes: If the second comparison result is consistent, determine whether the process path of the second process information corresponding to the process identifier is located in the installation directory of the target application; If so, then the matching result is determined to be a match; If not, the matching result is determined to be a mismatch, and the process continues to traverse the next piece of the second process information.

6. The operation monitoring method according to claim 4, characterized in that, Determining the matching result as a match when the third comparison result is consistent includes: If the third comparison result is consistent, determine whether the process path of the second process information corresponding to the parent process identifier is located in the installation directory of the target application; If so, then the matching result is determined to be a match; If not, the matching result is determined to be a mismatch, and the process continues to traverse the next piece of the second process information.

7. The operation monitoring method according to claim 1, characterized in that, The determination of the target application's working status based on the matching results of each of the second process information includes: If all the second process information is matched and the matching result for each second process information is a non-match, it is determined that the target application is in a stopped running state. If all the second process information has been matched and the matching result corresponding to any of the second process information is a match, then the target application is determined to be in a running state.

8. The operation monitoring method according to any one of claims 1-7, characterized in that, The first process includes each process in the target application's preset list of processes to be monitored, and the first process includes at least the first process created by the target application.

9. The operation monitoring method according to claim 8, characterized in that, Also includes: Create the first process of the target application; If the process identifier of the first process is greater than 0, the first process is determined to be valid; If the process identifier of the first process is less than or equal to 0, the first process is determined to be invalid, and monitoring of the target application is stopped.

10. The operation monitoring method according to any one of claims 1-9, characterized in that, The acquisition of second process information for each running second process includes: Get the current system process snapshot information; Based on the process snapshot information, obtain the second process information of each running second process.

11. The operation monitoring method according to claim 1, characterized in that, Also includes: The working status of the target application is updated once every preset period.

12. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing a computer program, and the processor executing the process monitoring method according to any one of claims 1-11 by calling the computer program stored in the memory.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to execute the process monitoring method as described in any one of claims 1-11.