Application management method, device, computing device and readable storage medium
By using the program database to query the package name in the Linux system, the process number and the application are accurately matched, solving the problem of cumbersome and stuttering matching process in the existing technology, and improving the application's processing performance.
Patent Information
- Application Number
- CN202210298204.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-25
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2041-02-25
AI Technical Summary
In Linux systems, the prior art realizes the matching of process numbers and applications through package management tools. The process is cumbersome and easy to cause lag, especially when multiple processes are started at the same time, affecting the processing performance of the application.
Provides an application management method, by obtaining the target process number, querying the program database to obtain the corresponding package name, and obtaining the second package name according to the application in the application container, and implementing the exact association between the application and the process number through the matching of the package name.
This method achieves precise matching through the unique determinism of package names, avoids the tedious process of executing dpkg commands and information parsing multiple times in the prior art, improves the processing performance of the application, and avoids lag problems in a multi-process environment.
Smart Images

Figure CN114911755B_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed on February 25, 2021. The application number of the original application is: 2021102141042, and the name of the invention is: An application management method, device, computing device and readable storage medium. Technical Field
[0002] The present invention relates to the field of application management, and in particular to an application management method, apparatus, computing device and readable storage medium. Background Art
[0003] In the Linux system, applications are static files. During the startup and use of applications, the operating system will allocate memory space and run them in memory, that is, processes. One application can generate multiple processes. In actual applications, the system will first obtain the process number. For example, when an application is started, the system first obtains the process number of the process used to start the application, and then obtains the corresponding application based on the obtained process number. It is necessary to complete the association matching between the process and the application.
[0004] The matching technology between process numbers and applications in the Linux operating system is currently implemented through package management tools. First, the execution path of the application is obtained based on the process number, and then the package name of the corresponding process number is obtained through dpkg-s. It is also necessary to obtain the file information associated with the package name through dpkg-l, and finally parse the relevant information to obtain the desktop name, and match the application through the desktop. This application matching process requires executing the dpkg command twice, and information parsing is required to complete. When multiple processes are started at the same time, it is easy to cause jamming and affect the processing performance of the application. At the same time, because an application may have multiple desktop names, the corresponding desktop name cannot be accurately parsed when parsing the associated file information, resulting in application matching errors. Summary of the invention
[0005] To this end, the present invention provides an application management method, apparatus, computing device and readable storage medium, in an effort to solve or at least alleviate the above problems.
[0006] According to one aspect of the present invention, there is provided an application management method suitable for execution in an operating system, the operating system resides in a computing device, the computing device includes a startup application container, the startup application container includes a startup application, the method includes: obtaining a target process number to be processed; obtaining a first package name corresponding to the target process number based on the target process number; obtaining a second package name corresponding to the application based on the application in the startup application container; obtaining a target application corresponding to the target process number based on the first package name and the second package name.
[0007] Optionally, in the application management method according to the present invention, the computing device includes a program database, and the program database includes an association relationship between the execution path, package name, and desktop name of the application.
[0008] Optionally, in the application management method according to the present invention, obtaining the first package name corresponding to the target process number according to the target process number includes: obtaining the corresponding execution path according to the target process number; obtaining the first package name corresponding to the target process number according to the execution path and the program database.
[0009] Optionally, in the application management method according to the present invention, the launched application container also includes the desktop name of the application, and obtaining the second package name corresponding to the application based on the application in the launched application container includes: obtaining the desktop name of the application from the launched application container; obtaining the package name corresponding to the application in the program database based on the desktop name of the application, and using it as the second package name.
[0010] Optionally, in the application management method according to the present invention, obtaining the target application corresponding to the target process number based on the first package name and the second package name includes: traversing the applications in the launched application container to obtain the second package name corresponding to the application; when the second package name of the application is consistent with the first package name of the target process number, the current application is the target application; and storing the second package name in the relevant information of the target application.
[0011] Optionally, in the application management method according to the present invention, the process of building a program database includes the following steps: obtaining the package names of all application installation packages in the operating system; obtaining the files associated with the package names; parsing the desktop name and execution path of the application corresponding to the package name from the associated files; and storing the package name, desktop name, and execution path in association with each other in the program database.
[0012] Optionally, the application management method according to the present invention further includes: when querying the program database, determining whether the program database exists, and when the program database does not exist, creating the program database.
[0013] According to another aspect of the present invention, there is provided an application management apparatus, which is suitable for residing in an operating system, the operating system residing in a computing device, the computing device including a startup application container, the startup application container including a startup application, the apparatus including a first processing module and a second processing module, wherein the first processing module is suitable for obtaining a target process number to be processed so that the second processing module obtains a first package name corresponding to the target process number; it is also suitable for obtaining the application in the startup application container so that the second processing module obtains a second package name corresponding to the application; it is also suitable for obtaining a target application corresponding to the target process number based on the first package name and the second package name; the second processing module is suitable for obtaining the first package name corresponding to the target process number, and is also suitable for obtaining the second package name corresponding to the application.
[0014] According to another aspect of the present invention, there is provided a computing device, comprising: at least one processor; and a memory storing program instructions, wherein the program instructions are configured to be suitable for execution by the at least one processor, and the program instructions include instructions for executing the above application management method.
[0015] According to another aspect of the present invention, a readable storage medium storing program instructions is provided. When the program instructions are read and executed by a computing device, the computing device executes the above application management method.
[0016] According to the application management method of the present invention, the corresponding first package name is obtained according to the obtained process number, and the second package name is obtained according to the application in the started application container. When the second package name is consistent with the first package name, the application corresponding to the current second package name is the application corresponding to the current process number. Compared with matching the application and the process number according to the desktop name, the unique certainty of the package name can achieve accurate matching. Further, according to the application management method of the present invention, the mapping from the process number to the package name and the mapping from the application to the package name are completed by querying the database and the table. Compared with the dpkg command in the prior art, the query speed is faster, which can avoid the problem of freezing when there are many processes and improve the processing performance of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.
[0018] Figure 1A block diagram of a computing device 100 according to one embodiment of the present invention is shown;
[0019] Figure 2 A flowchart of an application management method 200 according to an embodiment of the present invention is shown;
[0020] Figure 3 A schematic diagram showing a process 300 of creating a program database according to an embodiment of the present invention;
[0021] Figure 4 A block diagram of an application management device 400 according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0022] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0023] The application management method of the present invention is suitable for being executed in an operating system, and the operating system is suitable for being resident in a computing device. Figure 1 FIG. 1 is a schematic diagram of a computing device 100 according to an embodiment of the present invention. It should be noted that: Figure 1 The computing device 100 shown is only an example. In practice, the computing device used to implement the application management method of the present invention can be any type of device, and its hardware configuration can be different from the above. Figure 1 The computing device 100 shown is the same as Figure 1 The computing device 100 shown is different. In practice, the computing device used to implement the application management method of the present invention can be Figure 1 The hardware components of the computing device 100 shown are increased or deleted, and the present invention does not limit the specific hardware configuration of the computing device.
[0024] like Figure 1 As shown, in a basic configuration 102, computing device 100 typically includes system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between processor 104 and system memory 106.
[0025] Depending on the desired configuration, the processor 104 can be any type of processor, including but not limited to: a microprocessor (μP), a microcontroller (μC), a digital information processor (DSP), or any combination thereof. The processor 104 can include one or more levels of cache such as a first-level cache 110 and a second-level cache 112, a processor core 114, and registers 116. An example processor core 114 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 118 can be used with the processor 104, or in some implementations, the memory controller 118 can be an internal part of the processor 104.
[0026] Depending on the desired configuration, the system memory 106 can be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.) or any combination thereof. The physical memory in the computing device generally refers to the volatile memory RAM, and the data in the disk needs to be loaded into the physical memory before it can be read by the processor 104. The system memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some embodiments, the application 122 may be arranged to execute instructions on the operating system by one or more processors 104 using program data 124. The operating system 120 may be, for example, Linux, Unix, UOS, etc., which includes program instructions for processing basic system services and performing tasks that depend on hardware. The application 122 includes program instructions for implementing various user-desired functions, and the application 122 may be, for example, a browser, instant messaging software, a software development tool (such as an integrated development environment IDE, a compiler, etc.), etc., but is not limited thereto. When the application 122 is installed in the computing device 100, a driver module may be added to the operating system 120.
[0027] When the computing device 100 starts running, the processor 104 reads and executes the program instructions of the operating system 120 from the memory 106. The application 122 runs on the operating system 120 and uses the interfaces provided by the operating system 120 and the underlying hardware to implement various functions desired by the user. When the user starts the application 122, the application 122 is loaded into the memory 106, and the processor 104 reads and executes the program instructions of the application 122 from the memory 106.
[0028] Computing device 100 also includes a storage device 132 including a removable storage 136 and a non-removable storage 138 , both of which are connected to storage interface bus 134 .
[0029] The computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. Example communication devices 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via a network communication link via one or more communication ports 164.
[0030] A network communication link can be an example of a communication medium. Communication media can generally be embodied as computer-readable instructions, data structures, program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be a signal in which one or more of its data sets or its changes can be carried out in a manner that encodes information in the signal. As non-limiting examples, communication media can include wired media such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium used herein can include both storage media and communication media.
[0031] In the computing device 100 according to the present invention, the operating system 120 includes instructions for executing the application management method 200 of the present invention to achieve matching between the process number and the application.
[0032] Figure 2 A flowchart of an application management method 200 according to an embodiment of the present invention is shown. The method 200 is suitable for use in a computing device (such as Figure 1 Executed in the operating system shown in ).
[0033] like Figure 2 As shown, the method 200 starts at step S210, obtaining the user's operation on the application, including starting the application or closing the application. Taking starting the application "Security Center" as an example, the method 200 proceeds to step S220.
[0034] In step S220, the application and its related information are written into the startup application container, including application name, desktop name (ie, desktop name), application ID, application image, application category, application installation time and other information.
[0035] In the above-mentioned embodiment of launching the application "security center", the relevant information written into the launch application container is:
[0036] {
[0037] Desktop name: " / usr / share / applications / deepin-defender.desktop",
[0038] Application Name: "Security Center",
[0039] Application ID: “deepin-defender”,
[0040] Application Image: "deepin-defender",
[0041] Application Classification: 9,
[0042] Application installation time: 1600669865
[0043] }
[0044] Then enter step S230 to obtain the process number of the startup application. When the Linux operating system kernel detects that the application is started, it will assign a corresponding process to complete the application startup. The first process to be obtained is also the process number of the process. After obtaining the process number (i.e., the target process number), enter step S240.
[0045] In step S240, the package name corresponding to the process number (i.e., the first package name) is obtained according to the process number. According to one embodiment of the present invention, the computing device includes a program database, which stores the corresponding relationship between the execution path, desktop name, and package name of the application program. In this step, the package name corresponding to the target process number can be obtained according to the process number and the program database. Since there is no information about the process number in the database, it is necessary to first correspond the process number to the execution path. For example, if the process number is 6311, the corresponding execution path can be obtained through getFilePathByLink(" / proc / 6311 / exe"), and it can also be obtained through fs.open(" / proc / 6311 / cmdline"). The obtained execution path is " / usr / bin / deepin-defender". According to the execution path, the program database is searched to obtain the corresponding package name. The program database includes data records as shown in Table 1, wherein desktop_name corresponds to the desktop name, exe_path corresponds to the execution path, and pkg_name corresponds to the package name. The corresponding package name (first package name) queried is "deepin-defender".
[0046] Table 1
[0047]
[0048] According to one embodiment of the present invention, in this step, it is first determined whether the program database exists. If not, the database is first created to avoid the inability to match the process number and the package name after the program database is accidentally deleted. The program database creation process is specifically described in the program database creation process 300 and will not be repeated here.
[0049] In the subsequent step S250, the second package name corresponding to the application is obtained according to the application in the startup application container. The application container contains relevant information of all currently started and running applications, such as desktop name, application name, application ID, application image, application category, application installation time, etc. In this step, the applications in the startup application container are traversed according to a predetermined order, for example, from back to front, the desktop name of the application is obtained, and the corresponding package name (i.e., the second package name) is queried from the program database according to the desktop name.
[0050] In both the above step S240 and step S250, the package name is obtained by querying the database. Compared with executing the dpkg command, the query speed is faster.
[0051] Then, step S260 is entered to determine whether the second package name is consistent with the first package name. According to one embodiment of the present invention, if the second package name corresponding to the application is inconsistent with the first package name corresponding to the process number, step S250 is entered to obtain the package name corresponding to the desktop name of the next application in the startup application container as the new second package name. When the package name corresponding to the desktop name in the startup application container does not match the first package name, it indicates that the process number fails to match the application.
[0052] According to another embodiment of the present invention, taking the application "Security Center" as an example, according to the desktop name " / usr / share / applications / deepin-defender.desktop", Table 1 is queried to obtain the corresponding package name deepin-defender, which is consistent with the first package name obtained according to the process number 6311. Then in step S270, the application "Security Center" corresponding to the second package name successfully matches the process with the process number 6311 corresponding to the first package name.
[0053] In this step, the second package name can be added to the application related information in the application container. Continuing with the related information of the "Security Center" as an example, the package name information is added to the related information as follows.
[0054] {
[0055] Desktop name: " / usr / share / applications / deepin-defender.desktop",
[0056] Application Name: "Security Center",
[0057] Application ID: “deepin-defender”,
[0058] Application Image: "deepin-defender",
[0059] Application Classification: 9,
[0060] Application installation time: 1600669865,
[0061] Package name: "deepin-defender"
[0062] }
[0063] Figure 3 FIG. 3 is a flow chart showing a process 300 for creating a program database according to an embodiment of the present invention. Figure 3As shown, the process starts from step S310. In this step, a database is first created. Taking MySQL database as an example, the database creation can be completed by the create database datebase1 command, where database1 is the program database name, and a table is created by create table, for example, create table T1 (desktop_name char (30), exe_path char (30), pkg_name char (30)), where desktop_name is the desktop name, exe_path is the execution path, and pkg_name is the package name. In this step, other types of databases can also be created, and the present invention does not limit this.
[0064] Then proceed to step S320 to obtain the package names of all application installation packages in the operating system.
[0065] Then, the process proceeds to step S330 to obtain the associated file information of all package names. According to one embodiment of the present invention, the associated file information of all packages can be queried through dpkg-query.
[0066] Then, in step S340, the desktop name and execution path are parsed from the associated file information, and stored in the program database table in association with the package name. For example, the data is inserted into the table through the insert command, for example: insert into T1 (" / usr / share / applications / deepin-defender.desktop", " / usr / bin / deepin-defender", "deepin-defender"). The desktop names and execution paths corresponding to all package names are stored in the database table to complete the creation of the program database.
[0067] Figure 4 A block diagram of an application management device 400 according to an embodiment of the present invention is shown. The device 400 is suitable for residing in an operating system of a computing device, and the computing device includes a startup application container and a program database, wherein the startup application container stores the correspondence between the application and the desktop name, and the program database stores the execution path of the application, and the correspondence between the desktop name and the package name.
[0068] like Figure 4As shown, the device 400 includes a first processing module 410 and a second processing module 420. The first processing module 410 is suitable for obtaining the process number to be processed and corresponding the process number to the execution path, so that the second processing module obtains the package name (i.e., the first package name) corresponding to the currently processed process number in the program database through the execution path, wherein the target process number corresponds to a target application; the first processing module 410 is connected to the startup application container, and is also suitable for obtaining the desktop name corresponding to the application in the startup application container, so that the second processing module 420 obtains the second package name corresponding to the application according to the desktop name; it is also suitable for obtaining the target application corresponding to the target process number according to the first package name and the second package name, and when the second package name is consistent with the first package name, the application corresponding to the second package name is the application corresponding to the process corresponding to the first package name.
[0069] The second processing module 420 is connected to the program database, and is suitable for obtaining the corresponding first package name when receiving the execution path sent by the first processing module 410, obtaining the corresponding second package name according to the desktop name when receiving the desktop name sent by the first processing module 410, and returning the first package name and the second package name to the first processing module 410.
[0070] According to the application management method of the present invention, the corresponding first package name is obtained according to the obtained process number, and the second package name is obtained according to the application in the started application container. When the second package name is consistent with the first package name, the application corresponding to the current second package name is the application corresponding to the current process number. Compared with matching the application and the process number according to the desktop name, the unique certainty of the package name can achieve accurate matching. Further, according to the application management method of the present invention, the mapping from the process number to the package name and the mapping from the application to the package name are completed by querying the database and the table. Compared with the dpkg command in the prior art, the query speed is faster, which can avoid the problem of freezing when there are many processes and improve the processing performance of the application.
[0071] The various techniques described herein may be implemented in combination with hardware or software, or a combination thereof. Thus, the method and apparatus of the present invention, or some aspects or parts of the method and apparatus of the present invention may be in the form of program codes (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, a USB flash drive, a floppy disk, a CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes a device for practicing the present invention.
[0072] In the case where the program code is executed on a programmable computer, the computing device generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code; the processor is configured to execute the application management method of the present invention according to the instructions in the program code stored in the memory.
[0073] By way of example and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer readable instructions, data structures, program modules or other data. Communication media generally embody computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and include any information transfer medium. Any combination of the above is also included within the scope of readable media.
[0074] In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the examples of the present invention. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to implement the content of the present invention described herein, and the above description of specific languages is for the purpose of disclosing the best mode of the present invention.
[0075] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0076] It should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0077] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.
[0078] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0079] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0080] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.
[0081] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.
[0082] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.
Claims
1. An application management method, suitable for execution in an operating system, the operating system resides in a computing device, the computing device includes a startup application container and a program database, the startup application container includes a startup application, a desktop name, an application name, an application ID, an application picture, an application category and an application installation time, the program database includes an execution path of the application, a package name and an association relationship between the desktop name, the method comprising: Get the target process number to be processed; Obtaining a first package name corresponding to the target process number according to the target process number; Acquire a second package name corresponding to the application according to the application in the started application container; Acquire a target application corresponding to the target process number according to the first package name and the second package name; Wherein, obtaining the first package name corresponding to the target process number according to the target process number includes: Obtaining a corresponding execution path according to the target process number; Acquire a first package name corresponding to the target process number according to the execution path and the program database; The obtaining a second package name corresponding to the application according to the application in the launched application container comprises: Get the desktop name of the application from the launched application container; According to the desktop name of the application, the package name corresponding to the application is obtained in the program database and used as the second package name.
2. The method of claim 1, wherein: The step of obtaining the target application corresponding to the target process number according to the first package name and the second package name includes: Traversing the applications in the startup application container, and obtaining a second package name corresponding to the application; When the second package name of the application is consistent with the first package name of the target process number, the current application is the target application; The second package name is stored in the relevant information of the target application.
3. The method of claim 2, wherein: The process of constructing the program database includes the following steps: Obtain the package names of all application installation packages in the operating system; Get the associated files of the package name; Parsing the desktop name and execution path of the application corresponding to the package name from the associated file; The package name, desktop name and execution path are stored in association in the program database.
4. The method according to any one of claims 1 to 3, further comprising: When querying the program database, it is determined whether the program database exists, and when the program database does not exist, the program database is created.
5. An application management device, adapted to reside in an operating system, the operating system resides in a computing device, the computing device comprises a startup application container and a program database, the startup application container comprises a startup application, a desktop name, an application name, an application ID, an application image, an application category and an application installation time, the program database comprises an association relationship between an application execution path, a package name and a desktop name, the device comprises a first processing module and a second processing module; in, The first processing module is adapted to obtain a target process number to be processed; Obtaining an application in the startup application container so that the second processing module obtains a second package name corresponding to the application; Acquire a target application corresponding to the target process number according to the first package name and the second package name; The second processing module is adapted to obtain a first package name corresponding to the target process number according to the target process number, and is further adapted to obtain a second package name corresponding to the application program; Wherein, obtaining the first package name corresponding to the target process number according to the target process number includes: Obtaining a corresponding execution path according to the target process number; Acquire a first package name corresponding to the target process number according to the execution path and the program database; The obtaining a second package name corresponding to the application according to the application in the launched application container comprises: Get the desktop name of the application from the launched application container; According to the desktop name of the application, the package name corresponding to the application is obtained in the program database and used as the second package name.
6. A computing device comprising: at least one processor; as well as A memory storing program instructions, wherein the program instructions are configured to be executed by the at least one processor, and the program instructions include instructions for executing the method according to any one of claims 1 to 4.
7. A readable storage medium storing program instructions, when the program instructions are read and executed by a computing device, the computing device executes the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for acquiring underlying library called by mobile terminal application program
CN104102539A
Query method and device of application file source
CN108228770A