Screen display content acquisition method and device, equipment and medium
By judging the display status of the user interface and combining packet capture or socket methods to associate with the target process, the Internet Protocol address binding is obtained, which solves the problem of insufficient accuracy of screen display content and achieves higher accuracy and optimized storage space.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies lack accuracy in capturing screen content, resulting in incomplete screenshots or videos.
By judging the display status of the user interface, it is determined whether to obtain the screen display content. If the status can display the interaction record, it is obtained; otherwise, it is not obtained. Packet capture or socket methods are used to associate with the target process, obtain the Internet Protocol address for binding, and inject messages into the process to switch processes to improve accuracy.
It improves the accuracy of obtaining screen display content and avoids wasting storage space.
Smart Images

Figure CN114610568B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of computer, and particularly relates to a method and device for acquiring screen display content, equipment and medium. BACKGROUND
[0002] With the continuous development of computer technology, the contact interaction of users is more and more convenient.
[0003] Generally, people will use packet capture analysis or socket method to record the user interaction, and then take screenshots or record videos. However, this way will result in insufficient accuracy of screenshots or videos. SUMMARY
[0004] In order to solve the above technical problems, the present disclosure provides a method and device for acquiring screen display content, equipment and medium, so as to improve the accuracy of acquiring screen display content and facilitate evidence collection.
[0005] In a first aspect, the present disclosure provides a method for acquiring screen display content, comprising:
[0006] acquiring a display state of a user interface corresponding to a program executed by a target process;
[0007] judging the display state of the user interface;
[0008] if the display state of the user interface is a first state, acquiring the display content of the screen, the first state being a state capable of displaying interaction records;
[0009] if the display state of the user interface is a second state, not acquiring the display content of the screen, the second state being a state of completely not displaying interaction records.
[0010] In some embodiments, the display state of the user interface corresponding to the program executed by the target process is acquired by:
[0011] using a preset method to acquire the display state of the user interface corresponding to the program executed by the target process, the preset method including a packet capture or socket method.
[0012] In some embodiments, before the display state of the user interface corresponding to the program executed by the target process is acquired by using the preset method, the method further comprises:
[0013] associating the preset method with the target process;
[0014] associating the preset method with the display state of the user interface.
[0015] In some embodiments, the preset method is associated with the target process by:
[0016] obtaining an internet protocol address of the preset method, and binding the internet protocol address of the preset method with the target process.
[0017] In some embodiments, the display state of the user interface corresponding to the program executed by the target process is obtained by:
[0018] injecting a message into the process, switching the process, obtaining the target process, and obtaining the display state of the user interface corresponding to the program executed by the target process.
[0019] In some embodiments, the display content of the screen is obtained by:
[0020] capturing a screenshot or a video of the screen to obtain the display content of the screen.
[0021] In a second aspect, the embodiments of the present disclosure provide an apparatus for obtaining display content of a screen, comprising:
[0022] a first obtaining module configured to obtain a display state of a user interface corresponding to a program executed by a target process;
[0023] a judging module configured to judge the display state of the user interface;
[0024] a second obtaining module configured to, if the display state of the user interface is a first state, obtain the display content of the screen, the first state being a state in which the interaction record can be displayed; and if the display state of the user interface is a second state, not to obtain the display content of the screen, the second state being a state in which the interaction record is not displayed at all.
[0025] In a third aspect, the embodiments of the present disclosure provide an electronic device, comprising:
[0026] a memory;
[0027] a processor; and
[0028] a computer program;
[0029] wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.
[0030] In a fourth aspect, the embodiments of the present disclosure provide a computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method of the first aspect.
[0031] In a fifth aspect, the embodiments of the present disclosure further provide a computer program product comprising a computer program or instructions, the computer program or instructions being executed by a processor to implement the method of the first aspect.
[0032] The method, device, equipment and medium for acquiring screen display content provided by the embodiments of the present disclosure determine whether to acquire the display content of the screen by judging the display state of the user interface, acquire the display content of the screen if the display state of the user interface is a first state, the first state is a state capable of displaying the interaction record completely, and do not acquire the display content of the screen if the display state of the user interface is a second state, the second state is a state incapable of displaying the interaction record completely, thereby avoiding wasting storage space and improving the accuracy of acquiring the screen display content. BRIEF DESCRIPTION OF DRAWINGS
[0033] The drawings incorporated in the specification and constituting a part of the specification illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification.
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0035] Figure 1 A flowchart of a method for acquiring screen display content provided by an embodiment of the present disclosure;
[0036] Figure 2 A schematic diagram of an application scenario provided by an embodiment of the present disclosure;
[0037] Figure 3 A display schematic diagram of user interface interaction content provided by an embodiment of the present disclosure;
[0038] Figure 4 A flowchart of a method for acquiring screen display content provided by another embodiment of the present disclosure;
[0039] Figure 5 A structural schematic diagram of a device for acquiring screen display content provided by an embodiment of the present disclosure;
[0040] Figure 6 A structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained from these drawings without creative labor.
[0042] In the following description, a lot of specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure can be practiced without some or all of the details that are described herein; obviously, the description in the specification only illustrates some of the embodiments of the present disclosure, not all of the embodiments.
[0043] The terminal can perform online behavior through a browser or application software, and the display content of the screen is usually obtained through a packet capture or socket method, but this method can cause insufficient accuracy of obtaining the display content of the screen. To solve this problem, the present embodiment provides a method for obtaining the display content of the screen, which will be described below in combination with specific embodiments.
[0044] Figure 1 A flowchart of the method for obtaining the display content of the screen provided by the present embodiment is shown in FIG. 1. The method can be applied to the application scenario shown in FIG. 2, which includes a first terminal 20, a server 21 and a second terminal 22. The first terminal and the second terminal can be a smart phone, a palm computer, a tablet computer, a wearable device with a display screen, a desktop computer, a notebook computer, an all-in-one machine, a smart home device, etc. It can be understood that the method for obtaining the display content of the screen provided by the present embodiment can also be applied to other scenarios. Figure 2 The application scenario shown in FIG. 2 includes a first terminal 20, a server 21 and a second terminal 22. The first terminal and the second terminal can be a smart phone, a palm computer, a tablet computer, a wearable device with a display screen, a desktop computer, a notebook computer, an all-in-one machine, a smart home device, etc. It can be understood that the method for obtaining the display content of the screen provided by the present embodiment can also be applied to other scenarios.
[0045] The method for obtaining the display content of the screen will be described below in combination with the application scenario shown in FIG. 2. The method includes the following specific steps: Figure 2 The method for obtaining the display content of the screen will be described below in combination with the application scenario shown in FIG. 2. The method includes the following specific steps: Figure 1 The method for obtaining the display content of the screen will be described below in combination with the application scenario shown in FIG. 2. The method includes the following specific steps:
[0046] S101, obtaining the display state of the user interface corresponding to the program executed by the target process.
[0047] A process is a running activity of a program on a certain data set in a computer, is a basic unit of resource allocation and scheduling of a system, and is the basis of the structure of an operating system. In the early process-oriented computer structure, a process is a basic execution entity of a program; in the contemporary thread-oriented computer structure, a process is a container of a thread. A program is a description of instructions, data and their organization form, and a process is an entity of a program.
[0048] The display state of the user interface corresponding to the program executed by the target process is obtained, such as the display state of the user interface corresponding to the program executed by the target process. Figure 2As shown, the first terminal 20 and the second terminal 22 are respectively installed with a plurality of application programs, the plurality of application programs can be one application program independently running and other application programs in a non-running state, or a plurality of application programs running in parallel, the plurality of application programs include interactive software, browsers and the like, the interactive software can be WeChat, Xinyuan Doudou, QQ or other social software, the program executed by the target process is the currently running application program, and the following is an example of the program executed by the target process being Xinyuan Doudou. The first terminal 20 and the second terminal 22 can interact through the server 21 corresponding to the Xinyuan Doudou application program, that is, the first terminal 20 sends a message to the server 21 corresponding to the Xinyuan Doudou application program, the server 21 corresponding to the Xinyuan Doudou application program sends the message sent by the first terminal 20 to the second terminal 22, the second terminal 22 receives the message sent by the first terminal 20, and replies to the first terminal 20 through the application program corresponding server 21. It can be understood that the interactive content of the user interface corresponding to the Xinyuan Doudou program of the first terminal 20 and the second terminal 22 is the same, and the sent and received messages are opposite. For example, Figure 3 The interactive content of the user interface displayed by the first terminal 20 and the second terminal 22 as shown is only a schematic illustration and is not specifically limited.
[0049] Optionally, the program executed by the target process can also be an application program such as a browser that can access the Internet. The display state of the user interface corresponding to the browser can be the display state of the user interface after accessing a website, or the display state of the user interface after other Internet access behaviors.
[0050] S102, judge the display state of the user interface.
[0051] Generally, when A user interacts with B user, taking Xinyuan Doudou as an example, A user inputs a message in the Xinyuan Doudou program of the first terminal 20, B user's Xinyuan Doudou program in the second terminal 22 will display "the other party is inputting…", when A user sends the input information, B user in the second terminal 22 will receive the above information sent by A user, and the first terminal 20 and the second terminal 22 will display the interactive content of the current interface. In this embodiment, it is judged whether the display state of the user interface can display the interactive record.
[0052] S103, if the display state of the user interface is the first state, the display content of the screen is acquired, and the first state is a state capable of displaying interactive records.
[0053] If the display state of the user interface is a first state, the display content of the screen is acquired, the first state being a state capable of displaying the interaction record, the state capable of displaying the interaction record referring to a state in which the application executed by the target process is displayed in the current interface, including a complete display state, for example, a window maximized state, a window normal state, a window reduced state, an input focus state, etc., and including an incomplete display state, for example, a state in which other applications shield part of the application executed by the target process or the application executed by the target process is displayed at the edge of the display interface so that the application cannot be completely displayed.
[0054] If the display state of the user interface is a second state, the display content of the screen is not acquired, the second state being a state of completely not displaying the interaction record.
[0055] If the display state of the user interface is a second state, the display content of the screen is not acquired, the second state being a state of completely not displaying the interaction record. The state of completely not displaying the interaction record specifically refers to a window minimized state, a state in which other applications completely shield the application executed by the target process, etc.
[0056] The embodiments of the present disclosure determine whether to acquire the display content of the screen by judging the display state of the user interface, acquire the display content of the screen if the display state of the user interface is a first state, the first state being a state capable of displaying the interaction record, and do not acquire the display content of the screen if the display state of the user interface is a second state, the second state being a state of completely not displaying the interaction record, thereby avoiding wasting storage space and improving the accuracy of acquiring the display content of the screen.
[0057] In some embodiments, before the display state of the user interface corresponding to the program executed by the target process is acquired by using a preset method, the method further includes: associating the preset method with the target process; and associating the preset method with the display state of the user interface. The preset method includes a packet capture method or a socket method.
[0058] Packet capture is an operation of intercepting, retransmitting, editing, storing, etc. of data packets sent and received in network transmission, and is also used to check network security. Packet capture is also often used for data interception, etc.
[0059] Socket is the abstraction of the end point of the two-way communication between the application processes on different hosts in the network. A socket is one end of the process communication on the network, which provides the mechanism for the application layer process to exchange data by using the network protocol. From the position, the socket is connected to the application process, and connected to the network protocol stack, which is the interface for the application program to communicate through the network protocol, and is the interface for the application program to interact with the network protocol stack.
[0060] The packet capturing method is associated with the target process, and the packet capturing method is associated with the display state of the user interface. The display state of the user interface corresponding to the program executed by the target process is obtained by using the packet capturing method.
[0061] Optionally, the packet capturing method can also be a socket method.
[0062] The preset method is associated with the target process, and the preset method is associated with the display state of the user interface. The display state of the user interface corresponding to the program executed by the target process is obtained, so that the interaction content in a time period is accurately obtained, and the accuracy of the screen display content obtaining method is improved.
[0063] On the basis of the above embodiment, the preset method is associated with the target process, including: obtaining an Internet protocol address of the preset method, and binding the Internet protocol address of the preset method with the target process.
[0064] The Internet protocol address (IP address) is obtained by using the packet capturing method. The IP address is a local IP, including a source IP address and a destination IP address. The IP address obtained by the packet capturing method is bound with the target process respectively. Taking the target process as an example, the target process is associated with the IP address obtained by the packet capturing method respectively. Specifically, a set of application programming interface (API) functions provided by the windows system, such as GetTcpTable, GetTcpTable2, GetTcp6Table, GetTcp6Table2, GetUdpTable, GetUdp6Table, is used to obtain the binding information of the port and the process information. The port includes a source port and a destination port. Correspondingly, the IP addresses of the source port and the destination port are the source IP address and the destination IP address respectively.
[0065] Optionally, the packet capturing method can also be a socket method.
[0066] The embodiment of the present disclosure further improves the accuracy of the screen display content acquisition method by binding the preset method of acquiring an Internet protocol address with a target process.
[0067] On the basis of the above embodiment, the display state of the user interface corresponding to the program executed by the target process is acquired, including:
[0068] The message is injected into the process, the process is switched, the target process is obtained, and the display state of the user interface corresponding to the program executed by the target process is acquired.
[0069] The WH_CBT message is injected into the process using the SetWindowsHook or SetWndowsHookex function of the windows system, the process is switched, the target process is obtained, and the display state of the user interface corresponding to the program executed by the target process is acquired.
[0070] The embodiment of the present disclosure further improves the accuracy of the screen display content acquisition method by switching the process, obtaining the target process, and further improving the accuracy of the screen display content acquisition method.
[0071] Correspondingly, the display content of the screen is acquired, including: taking a screenshot or recording a video of the screen, if the screenshot or the video is in the form of text content, the display content of the screen is acquired by extracting the text information; if the screenshot or the video is in the form of voice content, the display content of the screen is acquired by first performing voice recognition and then extracting voice information to convert the text form content, and the voice information is also stored synchronously; if the screenshot or the video is in the form of multiple content such as text, voice, and picture, the original screenshot or video is stored.
[0072] Figure 4 The flowchart of the screen display content acquisition method provided by another embodiment of the present disclosure is shown in FIG. 4, and the method includes the following steps: Figure 4
[0073] S401, a preset method is associated with a target process.
[0074] The preset method is associated with the target process; the preset method is associated with the display state of the user interface, and the preset method can be a packet capture method or a socket method.
[0075] S402, accessing the Internet to obtain an interaction record.
[0076] The Internet is accessed to obtain an interaction record on a browser or an interactive type of application software, which can also be referred to as an interaction content.
[0077] S403, determining whether the display state of the user interface can display the interaction record, if yes, performing step S404; if no, performing step S405.
[0078] S404, acquire the display content of the screen.
[0079] Specifically, the implementation process and principle of S404 and S103 are consistent, and details are not repeated here.
[0080] S405, do not acquire the display content of the screen.
[0081] Specifically, the implementation process and principle of S405 and S104 are consistent, and details are not repeated here.
[0082] The embodiments of the present disclosure determine the display state of the user interface, determine whether the interaction record can be displayed completely, and thus determine whether to acquire the display content of the screen, thereby avoiding wasting storage space and improving the accuracy of acquiring the display content of the screen.
[0083] Figure 5 A structural diagram of a screen display content acquisition device provided by the embodiments of the present disclosure is provided. The screen display content acquisition device can be an electronic device as described in the above embodiments, or the screen display content acquisition device can be a component or assembly in the electronic device. The screen display content acquisition device provided by the embodiments of the present disclosure can perform the processing flow provided by the screen display content acquisition method embodiments, as shown in Figure 5 The screen display content acquisition device 50 includes a first acquisition module 51, a judgment module 52, and a second acquisition module 53. The first acquisition module 51 is configured to acquire the display state of the user interface corresponding to the program executed by the target process. The judgment module 52 is configured to judge the display state of the user interface. The second acquisition module 53 is configured to acquire the display content of the screen if the display state of the user interface is a first state, and the first state is a state in which the interaction record can be displayed. The second acquisition module 53 is configured to not acquire the display content of the screen if the display state of the user interface is a second state, and the second state is a state in which the interaction record is not displayed completely.
[0084] Optionally, the first acquisition module 51 is further configured to acquire the display state of the user interface corresponding to the program executed by the target process, including: using a preset method to acquire the display state of the user interface corresponding to the program executed by the target process, and the preset method includes a packet capturing method or a socket method.
[0085] Optionally, the screen display content acquisition device 50 further includes an association module 54, configured to, before using the preset method to acquire the display state of the user interface corresponding to the program executed by the target process, the method further includes: associating the preset method with the target process; and associating the preset method with the display state of the user interface.
[0086] Optionally, the associating module 54 is further configured to associate the preset method with the target process, including: obtaining an Internet protocol address of the preset method, and binding the Internet protocol address of the preset method with the target process.
[0087] Optionally, the first obtaining module 51 is further configured to obtain a display state of a user interface corresponding to a program executed by the target process, including: injecting a message into the process, switching the process, obtaining the target process, and obtaining the display state of the user interface corresponding to the program executed by the target process.
[0088] Optionally, the second obtaining module 53 is further configured to obtain the display content of the screen, including: taking a screenshot or recording a video of the screen, and obtaining the display content of the screen.
[0089] Figure 5 The screen display content obtaining apparatus of the embodiment can be used to execute the technical solutions of the above-mentioned method embodiments, and has similar principles and technical effects, which will not be repeated here.
[0090] Figure 6 A structural schematic diagram of an electronic device is provided for the embodiments of the present disclosure. The electronic device provided by the embodiments of the present disclosure can execute the processing flow provided by the screen display content obtaining method embodiments, as shown in Figure 6 As shown, the electronic device 60 includes a memory 61, a processor 62, a computer program, and a communication interface 63; wherein the computer program is stored in the memory 61 and is configured to be executed by the processor 62 to execute the screen display content obtaining method as described above.
[0091] In addition, the embodiments of the present disclosure further provide a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the screen display content obtaining method described in the above embodiments.
[0092] In addition, the embodiments of the present disclosure further provide a computer program product, which includes a computer program or instructions, and the computer program or instructions are executed by a processor to implement the screen display content obtaining method as described above.
[0093] It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer readable storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present disclosure, the computer readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer readable program code. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium other than the computer readable storage medium, which can send, propagate or transmit a program for use by or in conjunction with an instruction execution system, device or apparatus. The program code contained in the computer readable medium can be transmitted by any suitable medium, including but not limited to a wire, a cable, an RF (radio frequency) or the like, or any suitable combination thereof.
[0094] In some embodiments, the client, server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
[0095] The computer readable medium described above can be included in the electronic device described above; or can exist separately, without being assembled into the electronic device.
[0096] The computer readable medium described above carries one or more programs, when the one or more programs are executed by the electronic device, the electronic device:
[0097] Obtain the display state of the user interface corresponding to the program executed by the target process;
[0098] determining a display state of the user interface;
[0099] if the display state of the user interface is a first state, obtaining the display content of the screen, the first state being a state in which the interaction record can be displayed;
[0100] if the display state of the user interface is a second state, not obtaining the display content of the screen, the second state being a state in which the interaction record is not displayed at all.
[0101] In addition, the electronic device can further perform other steps in the method of obtaining the display content of the screen as described above.
[0102] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0103] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0104] The units described in the embodiments of the present disclosure can be implemented by means of software, or by hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself.
[0105] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0106] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0107] It should be noted that, in this document, the terms such as "first" and "second" are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Also, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a list of elements does not only include those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or device. Without more limitations, an element defined by the phrase "including a" does not exclude the presence of additional identical elements in the process, method, article or device that includes the element.
[0108] The foregoing is merely illustrative of the various implementations of the present disclosure and the general principles thereof. Numerous modifications can be made to these illustrations, and equivalents can be substituted therefor, without departing from the scope of the present disclosure. The specific embodiments commensurate with the specific application are intended to be illustrative only and not limiting of the scope of the application as set forth in the following claims.
Claims
1. A method for acquiring screen display content, characterized in that, The method includes: Get the display state of the user interface corresponding to the program executed by the target process; Determine the display status of the user interface; If the display state of the user interface is the first state, then the display content of the screen is obtained. The first state is the state in which the interaction record can be displayed. The first state includes an incomplete display state. The incomplete display state includes: the state in which other applications do not completely obscure the program executed by the target process, and the state in which the program executed by the target process is at the edge of the display interface, causing the program to not be fully displayed. If the display state of the user interface is the second state, the display content of the screen is not acquired. The second state is a state in which the interaction record is not displayed at all. The second state includes a minimized window state and a state in which other applications completely obscure the program executed by the target process. The step of obtaining the display state of the user interface corresponding to the program executed by the target process includes: injecting a WH_CBT message into the process using the Windows system's SetWindowsHook or SetWindowsHookex function, switching processes, obtaining the target process, and obtaining the display state of the user interface corresponding to the program executed by the target process.
2. The method according to claim 1, characterized in that, Obtain the display state of the user interface corresponding to the program executed by the target process, including: The display state of the user interface corresponding to the program executed by the target process is obtained using a preset method, which includes packet capture or socket methods.
3. The method according to claim 2, characterized in that, Before obtaining the display state of the user interface corresponding to the program executed by the target process using a preset method, the method further includes: Associate the preset method with the target process; The preset method is associated with the display state of the user interface.
4. The method according to claim 3, characterized in that, Associating the preset method with the target process includes: Obtain the Internet Protocol address of the preset method and bind the Internet Protocol address of the preset method to the target process.
5. The method according to claim 1, characterized in that, Get the content displayed on the screen, including: Capture or record a screenshot of the screen to obtain the content displayed on the screen.
6. A device for acquiring screen display content, characterized in that, The device includes: The first acquisition module is used to acquire the display status of the user interface corresponding to the program executed by the target process; A judgment module is used to determine the display status of the user interface; The second acquisition module is configured to acquire the screen display content if the display state of the user interface is a first state, wherein the first state is a state in which interaction records can be displayed, and the first state includes an incomplete display state, wherein the incomplete display state includes: a state in which other applications do not completely obscure the program executed by the target process, and a state in which the program executed by the target process is at the edge of the display interface so that the program cannot be fully displayed; if the display state of the user interface is a second state, the second state is a state in which interaction records are not displayed at all, wherein the second state includes a minimized window state and a state in which other applications completely obscure the program executed by the target process; The first acquisition module is specifically used to inject a WH_CBT message into the process using the Windows system's SetWindowsHook or SetWindowsHookex function, switch processes, obtain the target process, and obtain the display state of the user interface corresponding to the program executed by the target process.
7. The apparatus according to claim 6, characterized in that, Obtain the display state of the user interface corresponding to the program executed by the target process, including: The display state of the user interface corresponding to the program executed by the target process is obtained using a preset method, which includes packet capture or socket methods.
8. An electronic device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 1-5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Screen recording method, device and equipment and storage medium
CN112153436A