CN111198735A - Layer information acquisition method, layer information acquisition device and terminal equipment - Google Patents

Layer information acquisition method, layer information acquisition device and terminal equipment Download PDF

Info

Publication number
CN111198735A
CN111198735A CN201811385442.7A CN201811385442A CN111198735A CN 111198735 A CN111198735 A CN 111198735A CN 201811385442 A CN201811385442 A CN 201811385442A CN 111198735 A CN111198735 A CN 111198735A
Authority
CN
China
Prior art keywords
layer
target
identification information
creating
name
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
CN201811385442.7A
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.)
Shenzhen Ubtech Technology Co ltd
Original Assignee
Shenzhen Ubtech 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 Shenzhen Ubtech Technology Co ltd filed Critical Shenzhen Ubtech Technology Co ltd
Priority to CN201811385442.7A priority Critical patent/CN111198735A/en
Publication of CN111198735A publication Critical patent/CN111198735A/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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a layer information acquisition method, a layer information acquisition device and terminal equipment, wherein the method comprises the following steps: when detecting that a target application program is started, acquiring identification information of a process and/or a thread for creating a target layer, wherein the target layer is a layer for displaying a target application program interface; embedding the identification information into the layer name of the target layer; and acquiring the layer name of the target layer embedded with the identification information. According to the technical scheme, creator information of the layer in the terminal equipment can be acquired easily, and the technical problem of how to acquire the creator information of the layer in the terminal equipment can be solved.

Description

Layer information acquisition method, layer information acquisition device and terminal equipment
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a layer information obtaining method, a layer information obtaining apparatus, a terminal device, and a computer-readable storage medium.
Background
At present, various display problems can occur to a plurality of terminal devices, for example, an operation interface or a black screen of an application program cannot be normally displayed, and therefore, debugging personnel need to analyze the reasons why the terminal devices cannot normally display, and then the problem that the terminal devices cannot normally display is solved.
In order to analyze the reason why the terminal device cannot normally display, it is necessary to obtain creator information of the layer in the terminal device.
Disclosure of Invention
In view of this, the present application provides a layer information obtaining method, a layer information obtaining apparatus, a terminal device, and a computer-readable storage medium, which can obtain creator information of a layer in the terminal device.
A first aspect of the present application provides a method for obtaining layer information, including:
when detecting that a target application program is started, acquiring identification information of a process and/or a thread for creating a target layer, wherein the target layer is a layer for displaying an interface of the target application program;
embedding the identification information into the layer name of the target layer;
and acquiring the layer name of the target layer embedded with the identification information.
This application second aspect provides a picture layer information acquisition device, includes:
the identification acquisition module is used for acquiring identification information of a process and/or a thread for creating a target layer when the starting of a target application program is detected, wherein the target layer is a layer for displaying an interface of the target application program;
the identification embedding module is used for embedding the identification information into the layer name of the target layer;
and the name acquisition module is used for acquiring the layer name of the target layer, in which the identification information is embedded.
A third aspect of the present application provides a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to the first aspect when executing the computer program.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of the first aspect as described above.
A fifth aspect of the present application provides a computer program product comprising a computer program which, when executed by one or more processors, performs the steps of the method of the first aspect as described above.
In summary, the present application provides a layer information obtaining method, first, when it is detected that a target application program is started, obtaining identification information of a process and/or a thread for creating a target layer, where the target layer is a layer for displaying an interface of the target application program, that is, assuming that the target application program is a wechat, when it is detected that the wechat is started, a terminal device obtains creator information for creating a layer X for displaying an interface of the wechat, where the creator information is identification information of the process and/or the thread for creating the layer X; secondly, embedding the identification information into the layer name of the target layer; and finally, acquiring the layer name of the target layer, in which the identification information is embedded. In general, layer names of layers in terminal equipment are often information which is easy to obtain, and creator information of a target layer (i.e., identification information of a process and/or a thread for creating the target layer) is embedded into the layer name of the target layer, so that the creator information of the target layer can be obtained while the layer name of the target layer is obtained. Therefore, the technical scheme provided by the application can easily acquire the creator information of the layer in the terminal equipment, and can solve the technical problem of how to acquire the creator information of the layer in the terminal equipment.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart illustrating an implementation process of a layer information obtaining method according to an embodiment of the present application;
FIG. 2 is a schematic diagram illustrating creation and composition of layers in a terminal device of a current android operating system;
fig. 3 is a schematic diagram illustrating creation and synthesis of an image layer in a terminal device of an android operating system according to an embodiment of the present application;
fig. 4 is a schematic flowchart illustrating an implementation flow of another layer information obtaining method according to a second embodiment of the present application;
fig. 5 is a schematic structural diagram of a layer information acquiring apparatus according to a third embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The image layer information obtaining method provided by the embodiment of the application is applied to terminal equipment, and exemplarily, the terminal equipment includes but is not limited to a smart phone, a tablet computer, a learning machine, an intelligent wearable device, a notebook or a desktop computer, and the like.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
In addition, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Example one
Referring to fig. 1, a method for obtaining layer information provided in a first embodiment of the present application is described below, where the method for obtaining layer information provided in the first embodiment of the present application includes:
in step S101, when it is detected that a target application program is started, acquiring identification information of a process and/or a thread used for creating a target layer, where the target layer is a layer used for displaying an interface of the target application program;
generally, when an application program in a terminal device is started, one or more layers for displaying an interface of the application program are created in the terminal device. Taking a terminal device of an android operating system as an example, the creation and display processes of layers are described below, as shown in fig. 2, for a terminal device of an android operating system, when an Application (as shown in fig. 2, it is assumed that the Application is Application a) is started, Application a calls one or more Application Programming Interfaces (APIs) in a windows management service WindowManagerService to create at least one layer for displaying an interface of the Application a, as shown in fig. 2, the Application a calls a replay window function in a windowmanagerservervice and an attachStack function to create a layer 1 and a layer 2 (for an android operating system, a replay window function is generally used to create an opaque layer, an attachStack function is generally used to create a transparent layer, a semi-transparent layer, or a fuzzy layer, etc.), and a facer service creates layers for each currently started Application (as shown in fig. 2, layer 1 and layer 2 including application a, and layer 3 of other applications) are sequenced to generate a visible layer list, and then the terminal device synthesizes and renders each layer to the display according to the visible layer list by using an Open Graphics Library for Embedded System (OpenGL ES) based on an Embedded System or HWComposer.
In this embodiment of the application, the target application described in step S101 may be any application installed in the terminal device. The target application may be a social-type application, such as WeChat, etc.; alternatively, the target application may also be a payment-type application, such as a payment treasure or the like; alternatively, the target application may be a game application, such as royal glory, and the type of the target application is not limited in the embodiment of the present application. In addition, the target layer described in step S101 may be any layer used for displaying the target application interface (in some cases, after an application is started, a plurality of layers may be created to display the interface of the application, and therefore, the target layer described in step S101 may be any layer used for displaying the target application interface).
Typically, the creation of an application layer is created by the application. For example, as shown in fig. 2, for a terminal device of an Andriod operating system, when the application a installed in the terminal device is started, at least one layer is created by calling one or more APIs in a windowmanager service, and therefore, the identification information of the process in step S101 may be the identification information of the process for creating the target layer corresponding to the target application described in step S101, and thus, it can be seen that the "acquiring the identification information of the process and/or thread for creating the target layer" described in step S101 may include: and acquiring identification information of the process used for creating the target layer, wherein the identification information of the process comprises a process identification ID and/or a process name of the process used for creating the target layer and corresponding to the target application program. That is, the step S101 may be: when the starting of the target application program is detected, acquiring identification information (including a process ID and/or a process name) of a process, corresponding to the target application program, for creating the target layer, where the identification information of the process, corresponding to the target application program, for creating the target layer is creator information for creating the target layer.
In addition, the creation of the layer of a certain application program is specifically created by a certain thread under the process corresponding to the application program, and therefore, in this embodiment of the application, "acquiring the identification information of the process and/or the thread used for creating the target layer" in step S101 may also include: and acquiring identification information of the thread used for creating the target layer, wherein the identification information of the thread comprises a thread identification ID and/or a thread name of the thread used for creating the target layer and corresponding to the target application program. That is, the step S101 may be: when the starting of a target application program is detected, acquiring identification information (including a thread ID and/or a thread name) of a thread, corresponding to the target application program, for creating the target layer, wherein the identification information of the thread, corresponding to the target application program, for creating the target layer is creator information for creating the target layer.
In step S102, the identification information is embedded into the layer name of the target layer;
in this embodiment of the application, the creator information of the target layer (i.e., identification information of a process and/or a thread used for creating the target layer) acquired in step S101 is embedded in the layer name of the target layer.
In general, when creating an image layer, an application program may assign an image layer name to the image layer (in general, the image layer name is a string of character strings), for example, in a terminal device of an Andriod operating system, the application program may call the following command to create an image layer: createSurface (name, w, h, format, flags, & handle, & gbp), where the name is the name of the layer to be created. Therefore, in this embodiment of the application, when a certain layer is created, the identification information obtained in step S101 may be embedded into the layer name of the layer, that is, as shown in fig. 3, for a terminal device of the Andriod operating system, when creating layer 1 and layer 2, the application a may obtain creator information of layer 1 and creator information of layer 2, embed the creator information of layer 1 into the layer name of layer 1, and embed the creator information of layer 2 into the layer name of layer 2. That is, the step S102 may be executed when the target layer is created in the step S101, however, please note that the step S102 may also be executed in other cases, for example, when a debugger wants to acquire creator information of the layer, the step S102 is executed, and the execution time of the step S102 is not limited in the present application.
In step S103, a layer name of the target layer in which the identification information is embedded is obtained;
generally, in the field, creator information of an image layer is difficult to obtain, and an image layer name of the image layer is easy to obtain (for example, for a terminal device of an Andriod operating system, the terminal device may first enter a shell environment of the terminal device, and then in the shell environment of the terminal device, the image layer names of all image layers in the terminal device are obtained through a dumpsys surface flag command).
This step S103 may be executed when the terminal device detects a layer information obtaining command, for example, for a terminal device of an Andriod operating system, the layer information obtaining command is usually a dumpsys surface flag, and when the terminal device detects that a dumpsys surface flag command is input by a user (usually, the user needs to first enter a shell environment of the terminal device and then input the dumpsys surface flag command), this step S103 is executed to obtain a layer name in which creator information is embedded, and may display the layer name in which the creator information is embedded. Please note that, the step S103 may also be executed in other cases, which is not limited in the present application.
In addition, in this embodiment of the application, the terminal device may traverse all layers of the target application, not limited to only a certain layer of the target application, and the terminal device may execute steps S101 to S102 described in this application when any application is started, not limited to only a certain application, so that the terminal device may obtain creator information of all layers.
In the first embodiment of the application, creator information of a target layer (i.e., identification information of a process and/or a thread for creating the target layer) is embedded in a layer name of the target layer, so that the creator information of the target layer can be obtained while the layer name of the target layer is obtained. Therefore, the technical scheme provided by the application can easily acquire the creator information of the layer in the terminal equipment, and can solve the technical problem of how to acquire the creator information of the layer in the terminal equipment.
Example two
In the second embodiment of the present application, the "identification information of the process and/or the thread that creates the target layer" described in step S101 in the first embodiment is specifically defined as "identification information of the process that creates the target layer", and in the second embodiment of the present application, the "identification information of the process that creates the target layer" includes a process ID and a process name of the process that creates the target layer.
Referring to fig. 4, a method for obtaining layer information according to a second embodiment of the present application includes:
in step S201, when it is detected that a target application program is started, a preset application programming interface API is called, and a process ID of a process for creating a target layer corresponding to the target application program is obtained, where the target layer is a layer for displaying an interface of the target application program;
in the technical solution provided in the second embodiment of the present application, a process ID of a process for creating the target layer corresponding to the target application is obtained by calling a preset API.
In a terminal device of the android operating system, for different types of layers, when obtaining a process ID of a creator of the Layer, the called APIs are not completely the same, for example, for an uncommon Layer of the android operating system (in general, a Normal Layer is an opaque Layer, and an uncommon Layer is a transparent Layer, a semi-transparent Layer, or a blurred Layer, etc.), a binder. Therefore, in the second embodiment of the present application, the step S201 may include:
when detecting that a target application program is started, judging whether a target layer is a common layer or not, wherein the target layer is a layer for displaying an interface of the target application program;
if the target layer is a common layer, calling an API corresponding to the common layer to obtain a process ID of a process for creating the target layer corresponding to the target application program;
and if the target layer is an abnormal layer, calling an API (application program interface) corresponding to the abnormal layer to acquire a process ID (identity) of a process for creating the target layer corresponding to the target application program.
In step S202, according to the process ID of the process for creating the target layer corresponding to the target application program, obtaining a process name of the process for creating the target layer corresponding to the target application program in a Linux proc file system;
in this embodiment of the application, since the identification information of the process for creating the target layer includes the process ID and the process name of the process for creating the target layer, the process name of the process for creating the target layer needs to be acquired in step S202, and then in subsequent step S203, the process ID acquired in step S201 and the process name acquired in step S202 are embedded in the layer name of the target layer. If in the embodiment of the present application, the identification information of the process for creating the target layer only includes the process ID of the process for creating the target layer, after step S201, the process ID obtained in step S201 may be directly embedded into the layer name of the target layer.
For most operating systems, the operating systems are developed based on Linux, and therefore, the process name corresponding to the process ID acquired in step S201 can be searched in the Linux proc file system.
Taking the terminal device of the Andriod operating system as an example, each process in the terminal device of the Andriod operating system has a directory corresponding to the Linux proc file system, for example, if the process ID of a certain process is 722, there exists a directory of/proc/722, a file with a file name comm exists in the directory of/proc/722, and the process name corresponding to the process ID 722 can be found in the/proc/722/comm.
In step S203, embedding the process ID and the process name into the layer name of the target layer;
in step S204, a layer name of the target layer in which the identification information is embedded is obtained;
in the second embodiment of the present application, the execution manners of the steps S203 to S204 are completely the same as the execution manners of the steps S102 to S103 in the first embodiment, and reference may be specifically made to the description of the first embodiment, and details are not described herein again.
In the technical solution provided in the second embodiment of the present application, creator information of a target layer is specifically limited to a process ID and a process name of a process that creates the target layer, and a specific manner for acquiring the process ID and the process name is provided, but please note by those skilled in the art that creator information of the target layer includes not only the process ID and the process name of the process that is used to create the target layer, but also other information such as a thread ID and/or a thread name of a thread that is used to create the target layer, and the acquisition of the thread ID and the thread name may be obtained by means known in the art, which is not described herein again. The second embodiment of the application is the same as the first embodiment, and can easily acquire creator information of a layer in the terminal device, and can solve the technical problem of how to acquire the creator information of the layer in the terminal device.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
EXAMPLE III
An embodiment of the present application provides a layer information obtaining apparatus, as shown in fig. 5, where the layer information obtaining apparatus 300 includes:
an identifier obtaining module 301, configured to obtain, when it is detected that a target application program is started, identifier information of a process and/or a thread used for creating a target layer, where the target layer is a layer used for displaying an interface of the target application program;
an identifier embedding module 302, configured to embed the identifier information into the layer name of the target layer;
a name obtaining module 303, configured to obtain the layer name of the target layer, where the identifier information is embedded.
Optionally, the identifier obtaining module 301 is specifically configured to: when detecting that a target application program is started, acquiring identification information of a process used for creating the target layer, wherein the identification information of the process comprises a process identification ID and/or a process name of the process used for creating the target layer and corresponding to the target application program.
Optionally, the identifier obtaining module 301 is specifically configured to: when detecting that a target application program is started, acquiring identification information of a thread used for creating the target layer, wherein the identification information of the thread comprises a thread identification ID and/or a thread name of the thread used for creating the target layer and corresponding to the target application program.
Optionally, the identifier obtaining module 301 includes:
and the process identifier obtaining unit is used for calling a preset Application Programming Interface (API) and obtaining a process ID, corresponding to the target application program, of the process for creating the target layer.
Optionally, the identifier obtaining module 301 further includes:
and the process name acquisition unit is used for acquiring the process name of the process which is used for creating the target layer and corresponds to the target application program in a Linux proc file system according to the process ID of the process which is used for creating the target layer and corresponds to the target application program.
Optionally, the name obtaining module 303 is specifically configured to: and when the layer information acquisition command is detected, acquiring the layer name of the target layer, in which the identification information is embedded.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Example four
Fig. 6 is a schematic diagram of a terminal device according to a fourth embodiment of the present application. As shown in fig. 6, the terminal device 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in said memory 41 and executable on said processor 40. The processor 40 implements the steps of the various method embodiments described above, such as steps 101 to 103 shown in fig. 1, when executing the computer program 42. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the device embodiments, such as the functions of the modules 301 to 303 shown in fig. 5.
Illustratively, the computer program 42 may be divided into one or more modules/units, which are stored in the memory 41 and executed by the processor 40 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 42 in the terminal device 4. For example, the computer program 42 may be divided into an identifier obtaining module, an identifier embedding module and a name obtaining module, and each module has the following specific functions:
when detecting that a target application program is started, acquiring identification information of a process and/or a thread for creating a target layer, wherein the target layer is a layer for displaying an interface of the target application program;
embedding the identification information into the layer name of the target layer;
and acquiring the layer name of the target layer embedded with the identification information.
The terminal device may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will appreciate that fig. 6 is merely an example of terminal device 4 and does not constitute a limitation of terminal device 4 and may include more or fewer components than shown, or some components may be combined, or different components, for example, the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 41 may be an internal storage unit of the terminal device 4, such as a hard disk or a memory of the terminal device 4. The memory 41 may be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided in the terminal device 4. Further, the memory 41 may include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used for storing the computer program and other programs and data required by the terminal device. The above-mentioned memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other division manners in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units described above, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the embodiments of the methods described above. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may include content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method for obtaining layer information is characterized by comprising the following steps:
when detecting that a target application program is started, acquiring identification information of a process and/or a thread for creating a target layer, wherein the target layer is a layer for displaying a target application program interface;
embedding the identification information into the layer name of the target layer;
and acquiring the layer name of the target layer embedded with the identification information.
2. The layer information obtaining method according to claim 1, wherein the obtaining identification information of a process and/or a thread used for creating a target layer includes:
and acquiring identification information of a process used for creating the target layer, wherein the identification information of the process comprises a process identification ID and/or a process name of the process corresponding to the target application program and used for creating the target layer.
3. The layer information obtaining method according to claim 1, wherein the obtaining identification information of a process and/or a thread used for creating a target layer includes:
and acquiring identification information of a thread used for creating the target layer, wherein the identification information of the thread comprises a thread identification ID and/or a thread name of the thread used for creating the target layer and corresponding to the target application program.
4. The method according to claim 2, wherein the obtaining identification information of a process used for creating the target layer, where the identification information of the process includes a process identification ID and/or a process name of the process used for creating the target layer corresponding to the target application program, includes:
and calling a preset Application Programming Interface (API) to acquire a process ID of a process for creating the target layer corresponding to the target application program.
5. The layer information obtaining method according to claim 4, wherein the obtaining of the identification information of the process used for creating the target layer, the identification information of the process including a process identification ID and/or a process name of the process used for creating the target layer corresponding to the target application program, further includes:
and acquiring a process name of the process for creating the target layer corresponding to the target application program in a Linux proc file system according to the process ID of the process for creating the target layer corresponding to the target application program.
6. The layer information obtaining method according to any one of claims 1 to 5, wherein the obtaining of the layer name of the target layer in which the identification information has been embedded includes:
and when the layer information acquisition command is detected, acquiring the layer name of the target layer, in which the identification information is embedded.
7. An image layer information acquisition apparatus, comprising:
the identification acquisition module is used for acquiring identification information of a process and/or a thread for creating a target layer when the starting of a target application program is detected, wherein the target layer is a layer for displaying a target application program interface;
the identification embedding module is used for embedding the identification information into the layer name of the target layer;
and the name acquisition module is used for acquiring the layer name of the target layer, in which the identification information is embedded.
8. The layer information acquiring apparatus according to claim 7, wherein the identifier acquiring module is specifically configured to: when the starting of a target application program is detected, acquiring identification information of a process used for creating the target layer, wherein the identification information of the process comprises a process identification ID and/or a process name of the process corresponding to the target application program and used for creating the target layer.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
CN201811385442.7A 2018-11-20 2018-11-20 Layer information acquisition method, layer information acquisition device and terminal equipment Pending CN111198735A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811385442.7A CN111198735A (en) 2018-11-20 2018-11-20 Layer information acquisition method, layer information acquisition device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811385442.7A CN111198735A (en) 2018-11-20 2018-11-20 Layer information acquisition method, layer information acquisition device and terminal equipment

Publications (1)

Publication Number Publication Date
CN111198735A true CN111198735A (en) 2020-05-26

Family

ID=70745964

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811385442.7A Pending CN111198735A (en) 2018-11-20 2018-11-20 Layer information acquisition method, layer information acquisition device and terminal equipment

Country Status (1)

Country Link
CN (1) CN111198735A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111537791A (en) * 2020-07-01 2020-08-14 杭州雷甸科技有限公司 Intelligent electric meter based on embedded operating system
WO2021253141A1 (en) * 2020-06-15 2021-12-23 华为技术有限公司 Image data processing apparatus and method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101132413A (en) * 2007-09-18 2008-02-27 中兴通讯股份有限公司 ActiveX component multiplexing method based on Web application
CN104133641A (en) * 2014-07-24 2014-11-05 深圳市同洲电子股份有限公司 External storage equipment file deleting method and device
CN106126217A (en) * 2016-06-17 2016-11-16 武汉深之度科技有限公司 A kind of apply the information getting method of window, device and calculating equipment
CN111367741A (en) * 2020-02-28 2020-07-03 Oppo广东移动通信有限公司 User interface card pause detection method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101132413A (en) * 2007-09-18 2008-02-27 中兴通讯股份有限公司 ActiveX component multiplexing method based on Web application
CN104133641A (en) * 2014-07-24 2014-11-05 深圳市同洲电子股份有限公司 External storage equipment file deleting method and device
CN106126217A (en) * 2016-06-17 2016-11-16 武汉深之度科技有限公司 A kind of apply the information getting method of window, device and calculating equipment
CN111367741A (en) * 2020-02-28 2020-07-03 Oppo广东移动通信有限公司 User interface card pause detection method and device and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021253141A1 (en) * 2020-06-15 2021-12-23 华为技术有限公司 Image data processing apparatus and method
CN111537791A (en) * 2020-07-01 2020-08-14 杭州雷甸科技有限公司 Intelligent electric meter based on embedded operating system

Similar Documents

Publication Publication Date Title
CN109471626B (en) Page logic structure, page generation method, page data processing method and device
CN106547580B (en) Method and device for hooking function, mobile terminal and storage medium
US20220230271A1 (en) Full screen processing in multi-application environments
US20190325562A1 (en) Window rendering method and terminal
CN111580730B (en) Background display method of application program, electronic device and storage medium
CN111026392A (en) Method and device for generating guide page and electronic equipment
CN110362371B (en) View level control method, device and system, computer equipment and medium
CN112230923A (en) User interface rendering method, user interface rendering device and server
CN111198735A (en) Layer information acquisition method, layer information acquisition device and terminal equipment
CN114138363A (en) Program data calling method, device, equipment and storage medium
CN114115664A (en) Screenshot processing method, device, equipment and medium
CN110674050B (en) Memory out-of-range detection method and device, electronic equipment and computer storage medium
CN108520063A (en) Processing method, device and the terminal device of event log
CN110119429B (en) Data processing method, data processing device, computer equipment and storage medium
CN111338831A (en) Processing method, device, medium and electronic equipment for multi-thread running performance
CN110673827A (en) Resource calling method and device based on android system and electronic equipment
CN113902841A (en) Image drawing method and device, electronic equipment and readable storage medium
CN115510508A (en) Page information protection method and device and electronic equipment
CN107808134B (en) Image processing method, image processing device and electronic terminal
CN113296910B (en) File system calling method and device, terminal equipment and readable storage medium
CN112261072A (en) Service calling method, device, equipment and storage medium
CN111488192B (en) Method, device, terminal and non-transitory computer readable storage medium for implementing graphic user interface
CN111427550A (en) Object creating method, terminal device and storage medium
CN108958746B (en) Configuration file processing method, mobile terminal and computer readable storage medium
CN109918122B (en) White list maintenance method and device and terminal equipment

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