CN115454670A - Computer process information enumeration method and device and electronic equipment - Google Patents

Computer process information enumeration method and device and electronic equipment Download PDF

Info

Publication number
CN115454670A
CN115454670A CN202211076100.3A CN202211076100A CN115454670A CN 115454670 A CN115454670 A CN 115454670A CN 202211076100 A CN202211076100 A CN 202211076100A CN 115454670 A CN115454670 A CN 115454670A
Authority
CN
China
Prior art keywords
management object
remote
computer
target computer
remote target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211076100.3A
Other languages
Chinese (zh)
Inventor
李雪峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Baoqu Technology Co Ltd
Original Assignee
Zhuhai Baoqu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Baoqu Technology Co Ltd filed Critical Zhuhai Baoqu Technology Co Ltd
Priority to CN202211076100.3A priority Critical patent/CN115454670A/en
Publication of CN115454670A publication Critical patent/CN115454670A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The embodiment of the invention discloses a method and a device for enumerating computer process information and electronic equipment, and relates to the technical field of computer application. The method comprises the following steps: creating a remote management object of a process management function system plug-in WMI of a remote target computer; creating a first process management object of a remote target computer through the remote management object of the WMI; wherein the first process management object comprises process query result information of a remote target computer; and displaying the process query result information of the remote target computer in the first process management object. The invention can check the running process information on the remote PC equipment, enhances the process management capability and reduces the operation and maintenance cost.

Description

Computer process information enumeration method and device and electronic equipment
Technical Field
The invention belongs to the technical field of computer application, and particularly relates to a computer process information enumeration method, a computer process information enumeration device and electronic equipment.
Background
A process is a running activity of a program in a Computer (PC) on a data set, is a basic unit for resource allocation and scheduling of a system, and is the basis of an operating system structure. Most of the process manager tools on the PC equipment at present are process information queried through Windows APIs, and since the APIs only support querying of local process data and only support viewing of the local process data, but not viewing of processes on other PC equipment.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for enumerating computer process information, and an electronic device, so as to solve the problem that the existing process manager tool does not support viewing process information on other PC devices. The method and the device are based on Windows WMI, and the running process information on the remote PC device is checked through the cross-device access capability of the WMI, so that the process management capability is enhanced, and the operation and maintenance cost is reduced.
In a first aspect, an embodiment of the present invention provides a computer process information enumeration method, including:
creating a remote management object of a process management function system plug-in WMI of a remote target computer;
creating a first process management object of a remote target computer through the remote management object of the WMI; wherein the first process management object comprises process query result information of a remote target computer;
and displaying the process query result information of the remote target computer in the first process management object.
With reference to the first aspect, in a first implementation manner of the first aspect, the presenting process query result information of the remote target computer in the first process management object includes:
and displaying the process query result information of the remote target computer in the first process management object to a user in a report form and/or UI (user interface) mode.
With reference to the first aspect, in a second implementation manner of the first aspect, after creating a remote management object of a process management function system plug-in WMI of the remote target computer, the method further includes:
receiving a process name to be inquired;
creating a second process management object of the remote target computer through the remote management object of the WMI and the process name to be inquired; the second process management object comprises query result information of whether the remote target computer is running the process corresponding to the name of the process to be queried;
and displaying whether the remote target computer is running the query result information of the process corresponding to the process name to be queried.
With reference to the second implementation manner of the first aspect, in a second implementation manner of the first aspect, the creating a first process management object/a second process management object of a remote target computer includes:
and creating a first process management object/a second process management object of the remote target computer by executing a preset query method.
In a second aspect, an embodiment of the present invention provides a computer process information enumeration apparatus, including:
the remote management object creating module is used for creating a remote management object of a process management function system plug-in WMI of a remote target computer;
the process management object creating module is used for creating a first process management object of a remote target computer through a remote management object of the WMI; wherein the first process management object comprises process query result information of a remote target computer;
and the display module is used for displaying the process query result information of the remote target computer in the first process management object.
With reference to the second aspect, in a first implementation manner of the second aspect, the presentation module is specifically configured to present, to a user, process query result information of the remote target computer in the first process management object in a form of a report and/or a UI interface.
With reference to the second aspect, in a second implementation manner of the second aspect, the computer process information enumeration apparatus further includes:
the query receiving module is used for receiving the process name to be queried;
the process management object creating module is also used for creating a second process management object of the remote target computer through the remote management object of the WMI and the process name to be inquired; the second process management object comprises query result information of whether the remote target computer is running the process corresponding to the name of the process to be queried;
the display module is further used for displaying whether the remote target computer is running the query result information of the process corresponding to the process name to be queried.
With reference to the second implementation manner of the second aspect, in a second implementation manner of the second aspect, the process management object creating module is specifically configured to create the first process management object/the second process management object of the remote target computer by executing a preset query method.
In a third aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, and is used for executing a computer process information enumeration method described in any one of the foregoing embodiments.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement a computer process information enumeration method described in any preceding embodiment.
The invention provides a computer process information enumeration method, a device and electronic equipment. The invention is a technical scheme based on Windows WMI, realizes remote viewing of the running process information on the PC equipment through the WMI cross-equipment access capability, enhances the process management capability and reduces the operation and maintenance cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of an embodiment of a method for enumerating computer process information according to an embodiment of the present invention;
FIG. 2 is a flowchart of an embodiment of a method for enumerating computer process information according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an embodiment of a computer process information enumeration device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a second embodiment of a computer process information enumeration device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of an embodiment of a method for enumerating computer process information according to an embodiment of the present invention. Referring to fig. 1, the method includes the following steps S101-S104:
s101: a remote management object of a process management function system plug-in WMI of the remote target computer is created.
In this step, schematic codes for creating a process management function WMI remote management object of the remote PC are as follows:
set objWMIServices=Getobject("winmgmts:{impersonationLevel=Delegate,authority=kerberos:MyDomain\Computer_B}!\\ComputerB\Root\CIMv2")
wherein objWMIServices isWMI remote management object of the schedule management function, winmgmts is a prefix indicating WMI service, immersonationlevel identifier is a remote connection delegation, authority, a user who needs to be connected to a remote target PC, myDomain, an IP address of a remote target PC to which connection is needed,\\ComputerB\Root\CIMv2the WMI zone is a WMI zone of a remote target PC in which WMI implements the process management functions of the PC. The process does not need to be executed by an administrator, only the account information of the target device needs to be known, and the execution authority is safer.
S102: and creating a first process management object of the remote target computer through the remote management object of the WMI.
Wherein the first process management object comprises process query result information of the remote target computer.
In this embodiment, a first process management object of a remote computer is created by executing a preset query method ExecQuery (a statement method similar to sql), and schematic codes are as follows:
Set colProcesses1=objWMIService.ExecQuery("SELECT*FROMWin32_Process")
the Win32_ Process is a class object of a management computer in a root \ CIMv2 naming space of WMI of the remote PC, and provides a Process creating method such as Create besides an ExecQuery method; the colprocessing 1 is a first process management object, and includes information of all processes running on the remote target PC, including process name, identifier, handle, and memory usage. Under the condition that a server program is not required to be additionally installed on the remote PC, the remote checking of the PC process information can be realized, further, the management of the remote PC process can be carried out through the VMI, and the remote PC process monitoring system has the advantages of convenience and quickness in implementation.
S103: and displaying the process query result information of the remote target computer in the first process management object.
Preferably, in step S103, the process query result information of the remote target computer in the first process management object may be specifically displayed to the user in a form of a report and/or a UI interface. The progress information of the remote PC is displayed to the user in a report form and/or UI interface mode, and the method has the advantages of being good in display effect, strong in readability and the like. Furthermore, the WMI is sleeved with a layer of UI for interaction, so that the function similar to that of a Windows task manager can be realized, and the process information capable of enumerating the remote PC is provided, so that a process management tool stronger than that of the task manager can be developed and realized.
In this embodiment, a method for enumerating computer process information is provided, which includes first creating a remote management object of a process management function system plug-in WMI of a remote PC, then creating a process management object of the remote PC, and finally displaying process query result information in the process management object. The invention is a technical scheme based on Windows WMI, realizes remote viewing of the running process information on the PC equipment through the WMI cross-equipment access capability, enhances the process management capability and reduces the operation and maintenance cost.
In an alternative embodiment, after step S101 shown in fig. 1, the method provided by the present invention may further include steps S201 to S203 shown in fig. 2:
s201: and receiving the process name to be queried.
S202: and creating a second process management object of the remote target computer through the remote management object of the WMI and the process name to be inquired.
And the second process management object comprises query result information of whether the remote target computer is running the process corresponding to the name of the process to be queried.
In this embodiment, a second process management object of the remote computer is created by executing a preset query method ExecQuery, and the schematic code is as follows:
Figure BDA0003830122310000061
the process is responsible for managing all resources of calculation, such as a window interface and the like, and colprocessses 2.Count =0 indicates that the remote PC does not run the process corresponding to the process name to be queried, so that the process to be queried is searched, and the method has the advantage of simple implementation.
S203: and displaying whether the remote target computer is running the query result information of the process corresponding to the name of the process to be queried.
The computer process information enumeration method provided by the embodiment of the invention not only can enumerate the information of all processes running on the remote PC, but also can check whether the specified processes are running on the remote PC, and a user can select one mode to check the running condition of the processes of the remote PC according to the requirement, thereby effectively improving the use experience of the user.
Fig. 3 is a schematic structural diagram of an embodiment of a computer process information enumeration apparatus according to an embodiment of the present invention. The apparatus, comprising:
the remote management object creating module 1 is used for creating a remote management object of a process management function system plug-in WMI of a remote target computer;
the process management object creating module 2 is used for creating a first process management object of a remote target computer through the remote management object of the WMI; wherein the first process management object comprises process query result information of a remote target computer; preferably, the process management object creating module 2 is specifically configured to create the first process management object of the remote target computer by using the WMI remote management object and executing a preset query method.
And the display module 3 is used for displaying the process query result information of the remote target computer in the first process management object. Preferably, the display module 3 is specifically configured to display, in a manner of a report and/or a UI interface, process query result information of the remote target computer in the first process management object to a user.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 4 is a schematic structural diagram of a second embodiment of a computer process information enumeration device according to an embodiment of the present invention. As shown in fig. 4, the apparatus of this embodiment, based on the apparatus structure shown in fig. 3, further includes:
the query receiving module 4 is used for receiving the process name to be queried;
the process management object creating module 2 is further used for creating a second process management object of the remote target computer through the remote management object of the WMI and the process name to be inquired; the second process management object comprises query result information of whether the remote target computer is running the process corresponding to the name of the process to be queried; preferably, the process management object creating module 2 is further specifically configured to create a second process management object of the remote target computer by using the WMI remote management object and the name of the process to be queried and executing a preset query method.
And the display module 3 is further configured to display query result information of whether the remote target computer is running the process corresponding to the process name to be queried.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment of the invention also provides the electronic equipment. Fig. 5 is a schematic structural diagram of an electronic device provided by the present invention, which can implement the flows of the embodiments shown in fig. 1 and fig. 2 of the present invention, and as shown in fig. 5, the electronic device may include: the electronic device comprises a shell 91, a processor 92, a memory 93, a circuit board 94 and a power supply circuit 95, wherein the circuit board 94 is arranged inside a space enclosed by the shell 91, and the processor 92 and the memory 93 are arranged on the circuit board 94; a power supply circuit 95 for supplying power to each circuit or device of the electronic apparatus; the memory 93 is used to store executable program code; the processor 92 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 93, and is configured to perform the computer process information enumeration method according to any of the foregoing embodiments.
The electronic device exists in a variety of forms, including but not limited to:
(1) A mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has mobile internet access characteristics. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This kind of equipment includes: audio and video playing modules (such as an iPod), handheld game consoles, electronic books, and intelligent toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with a data interaction function.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs can be executed by one or more processors to implement any one of the computer process information enumeration methods provided in the foregoing embodiments, so that corresponding technical effects can also be achieved, which has been described in detail above and will not be described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations of the invention.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and executed by a computer to implement the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are also within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A computer process information enumeration method, comprising:
creating a remote management object of a process management function system plug-in WMI of a remote target computer;
creating a first process management object of a remote target computer through the remote management object of the WMI; wherein the first process management object comprises process query result information of a remote target computer;
and displaying the process query result information of the remote target computer in the first process management object.
2. The computer process information enumeration method of claim 1, wherein said exposing process query result information of a remote target computer in said first process management object comprises:
and displaying the process query result information of the remote target computer in the first process management object to a user in a report form and/or UI (user interface) mode.
3. The computer process information enumeration method of claim 1, wherein after creating a remote management object of a process management function system plug-in WMI of a remote target computer, the method further comprises:
receiving a process name to be inquired;
creating a second process management object of the remote target computer through the remote management object of the WMI and the process name to be inquired; the second process management object comprises query result information of whether the remote target computer is running the process corresponding to the name of the process to be queried;
and displaying whether the remote target computer is running the query result information of the process corresponding to the name of the process to be queried.
4. The computer process information enumeration method of claim 3, wherein said creating a first process management object/a second process management object for a remote target computer comprises:
and creating a first process management object/a second process management object of the remote target computer by executing a preset query method.
5. A computer process information enumeration apparatus, comprising:
the remote management object creating module is used for creating a remote management object of a process management function system plug-in WMI of a remote target computer;
the process management object creating module is used for creating a first process management object of a remote target computer through a remote management object of the WMI; wherein the first process management object comprises process query result information of a remote target computer;
and the display module is used for displaying the process query result information of the remote target computer in the first process management object.
6. The computer process information enumeration device of claim 5, wherein the presentation module is specifically configured to present, to a user, process query result information of the remote target computer in the first process management object in a form of a report and/or a UI interface.
7. The computer process information enumeration apparatus of claim 5, wherein the apparatus further comprises:
the query receiving module is used for receiving the process name to be queried;
the process management object creating module is also used for creating a second process management object of the remote target computer through the remote management object of the WMI and the process name to be inquired; the second process management object comprises query result information of whether the remote target computer is running the process corresponding to the name of the process to be queried;
the display module is further used for displaying whether the remote target computer is running the query result information of the process corresponding to the process name to be queried.
8. The computer process information enumeration apparatus of claim 7, wherein the process management object creation module is specifically configured to create a first process management object/a second process management object of the remote target computer by executing a preset query method.
9. An electronic device, characterized in that the electronic device comprises: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, for executing the computer process information enumeration method of any one of the preceding claims 1-4.
10. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the computer process information enumeration method of any one of claims 1-4.
CN202211076100.3A 2022-09-02 2022-09-02 Computer process information enumeration method and device and electronic equipment Pending CN115454670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211076100.3A CN115454670A (en) 2022-09-02 2022-09-02 Computer process information enumeration method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211076100.3A CN115454670A (en) 2022-09-02 2022-09-02 Computer process information enumeration method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115454670A true CN115454670A (en) 2022-12-09

Family

ID=84300040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211076100.3A Pending CN115454670A (en) 2022-09-02 2022-09-02 Computer process information enumeration method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115454670A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116483483A (en) * 2023-06-21 2023-07-25 中科方德软件有限公司 Data query method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116483483A (en) * 2023-06-21 2023-07-25 中科方德软件有限公司 Data query method and device and electronic equipment
CN116483483B (en) * 2023-06-21 2023-09-19 中科方德软件有限公司 Data query method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN111880899B (en) Big data stream processing method and device based on cloud native architecture
CN105550252A (en) File positioning method and device and electronic equipment
CN110868377B (en) Method and device for generating network attack graph and electronic equipment
CN106250182B (en) File processing method and device and electronic equipment
CN106599680B (en) Method and device for setting application program permission and electronic equipment
CN111104551B (en) Live broadcast room label determining method and device, storage medium and electronic equipment
CN112087487A (en) Model training task scheduling method and device, electronic equipment and storage medium
CN115454670A (en) Computer process information enumeration method and device and electronic equipment
CN110652728A (en) Game resource management method and device, electronic equipment and storage medium
CN113961590A (en) Multi-source data fusion method and device and electronic equipment
CN113965402A (en) Configuration method and device of firewall security policy and electronic equipment
CN105320777A (en) Application program recommendation method and device
CN102984282B (en) Intelligent terminal obtains the method and apparatus of the media data of cloud storage file
CN106779844B (en) Method and device for acquiring value added service information and electronic equipment
CN111857865A (en) Event type task processing method and device, electronic equipment and storage medium
CN113922998A (en) Vulnerability risk assessment method and device, electronic equipment and readable storage medium
CN106648656B (en) Message deleting method and device and electronic equipment
CN112036132A (en) Document header and footer editing method and device and electronic equipment
CN111782362A (en) Message task scheduling method and device and electronic equipment
CN111880896A (en) Method and device for rapidly restoring container and running state data
CN110768945A (en) Method and device for evaluating website safe operation condition and storage medium
CN114637437A (en) Application program providing method and device for Windows10 system
CN113612642B (en) Method and device for describing heterogeneous tasks based on communication overhead and related products
CN114676356A (en) Bookmark collection method and device, electronic equipment and storage medium
CN111427740A (en) Development environment maintenance method and device for mobile terminal

Legal Events

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