Screenshot method and device based on remote application, server and electronic equipment
By intercepting and forwarding screenshot commands to the client on the server side, the problem of remote applications being unable to accurately capture images of the client's screen is solved, thus achieving a consistent user experience between remote applications and the client.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SANGFOR TECH INC
- Filing Date
- 2025-12-16
- Publication Date
- 2026-05-01
AI Technical Summary
In server-based computing (SBC) environments, remote applications cannot accurately capture images of the client's local screen, leading to inconsistent user experiences.
By deploying a screenshot proxy module on the server, screenshot commands are intercepted and sent to the client. After the client takes a screenshot, it returns the screenshot data to the server, ensuring the security and integrity of the screenshot data. The data is then accurately returned to the corresponding remote application based on the command source identifier.
It enables accurate capture of local screenshot data from the client in remote applications on the server side, improving the consistency of user experience between remote applications and the client.
Smart Images

Figure CN121967515A_ABST
Abstract
Description
Screenshot methods, devices, servers, and electronic devices based on remote applications Technical Field
[0001] This application belongs to the field of electronic technology, and specifically relates to a screenshot method, device, server and electronic device based on remote application. Background Technology
[0002] With the advancement of technology, remote applications are becoming increasingly common. Due to their superior security, low-cost deployment, and convenient operation and maintenance, more and more clients are using SBC (Server-Based Computing, representing remote application resources) solutions for business processing. However, because these applications run on remote servers, they still differ from local applications in some ways. For example, current SBC applications cannot capture screenshots of the client interface, leading to inconsistencies in user experience compared to local applications. Summary of the Invention
[0003] In view of the above problems, this application proposes a screenshot method, apparatus, server, electronic device and storage medium based on remote application to improve the above problems.
[0004] In a first aspect, embodiments of this application provide a screenshot method based on a remote application. The method is applied to a screenshot proxy module, which runs on a server where the remote application resides. The method includes: intercepting a screenshot instruction from the remote application, the screenshot instruction being used to instruct the capture of a local screen image of a client corresponding to the remote application, the client accessing the remote application on the server via a remote protocol; sending the screenshot instruction to the client corresponding to the remote application; receiving screenshot data returned by the client, the screenshot data being obtained by the client taking a screenshot of the client's local screen image in response to the screenshot instruction; and sending the screenshot data to the remote application.
[0005] Furthermore, the screenshot instruction is generated by the remote application on the server in response to a specified operation performed on the client.
[0006] Furthermore, intercepting screenshot commands from the remote application includes: intercepting screenshot commands sent by the remote application to the local graphics interface via hooking or driver methods. This method ensures that screenshot commands triggered by the server are intercepted, preventing the server-side screenshot commands from being executed on the server, thus achieving the effect that the screenshot data obtained by the server based on the screenshot command is not the server-side screenshot data.
[0007] Furthermore, receiving the screenshot data returned by the client includes: receiving the screenshot data returned by the client through a pre-established network tunnel. This method ensures the security of the screenshot data returned by the client.
[0008] Furthermore, sending the screenshot command to the client corresponding to the remote application includes: parsing the screenshot command to obtain command information, the command information including a command source identifier and a target image format; and sending the command information to the client corresponding to the remote application via a protocol stack. Through this method, the screenshot command is intercepted and parsed, ensuring that the screenshot data from the client can be accurately returned to the remote application on the server.
[0009] Furthermore, sending the screenshot data to the remote application includes: sending a screenshot data packet in the target image format to the remote application based on the instruction source identifier. Using the above method, based on the instruction source identifier, the screenshot data can be accurately returned to the remote application on the server corresponding to that instruction source identifier.
[0010] Furthermore, before sending the screenshot data to the remote application, the method further includes: performing an integrity check on the screenshot data; correspondingly, sending the screenshot data to the remote application includes: if the check passes, sending the client's screenshot data to the server's remote application. By performing an integrity check on the client's screenshot data using the above method, it can be determined that the client's screenshot data has not been corrupted during transmission.
[0011] Secondly, this application provides a screenshot method based on a remote application, applied to a client corresponding to a remote application running on a server. The method includes: receiving a screenshot instruction from a screenshot proxy module on the server, the screenshot instruction indicating to capture the local screen image of the client, the client accessing the remote application on the server via a remote protocol; responding to the screenshot instruction to capture the local screen image of the client, obtaining screenshot data; and sending the screenshot data to the screenshot proxy module on the server, so that the screenshot proxy module forwards the screenshot data to the remote application. Through this method, when using a remote application, the screenshot instruction from the server is intercepted and sent to the client. After the client captures the corresponding screenshot data, it returns the screenshot data to the remote application on the server, achieving the goal of obtaining the client's local screenshot data within the remote application on the server. This achieves accurate capture of the final user interface of the remote application, ensuring a consistent user experience between the remote application on the server and the remote application on the client.
[0012] Furthermore, the step of sending the screenshot data to the screenshot proxy module on the server side includes: sending the screenshot data to the screenshot proxy module on the server side through a pre-established network tunnel. This method ensures the security of the screenshot data returned by the client.
[0013] Before receiving the screenshot instruction from the screenshot proxy module on the server, the method further includes: sending a specified operation applied to the client to the remote application, so that the remote application generates a screenshot instruction in response to the specified operation. Through this method, screenshot instructions can be securely monitored.
[0014] Thirdly, embodiments of this application provide a screenshot device based on a remote application, running on a screenshot proxy module. The screenshot proxy module runs on the server where the remote application resides. The device includes: an interception unit for intercepting screenshot instructions from the remote application, wherein the screenshot instructions are used to instruct the capture of the local screen image of the client corresponding to the remote application, and the client accesses the remote application on the server via a remote protocol; a first sending unit for sending the screenshot instructions to the client corresponding to the remote application; a receiving unit for receiving screenshot data returned by the client, wherein the screenshot data is obtained by the client taking a screenshot of the local screen image of the client in response to the screenshot instructions; and a second sending unit for sending the screenshot data to the remote application.
[0015] Fourthly, this application provides a screenshot device based on a remote application, running on a client corresponding to the remote application, the remote application running on a server. The device includes: a receiving unit, used to receive a screenshot instruction from a screenshot proxy module of the server, the screenshot instruction being used to instruct the client to capture a local screen image, the client accessing the remote application of the server via a remote protocol; a screenshot unit, used to respond to the screenshot instruction to capture a screenshot of the client's local screen image and obtain screenshot data; and a sending unit, used to send the screenshot data to the screenshot proxy module of the server, so that the screenshot proxy module of the server forwards the screenshot data to the remote application.
[0016] Fifthly, embodiments of this application provide a server, including one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the methods described above.
[0017] Sixthly, embodiments of this application provide an electronic device, including one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to perform the methods described above.
[0018] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing program code, wherein the above-described method is executed when the program code is run.
[0019] This application provides a screenshot method, apparatus, server, and electronic device based on a remote application. First, a screenshot command is intercepted from the remote application. This command instructs the capture of the local screen image of the client corresponding to the remote application. The client accesses the remote application via a remote protocol, sends the screenshot command to the client corresponding to the remote application, and then receives screenshot data returned by the client. This screenshot data is obtained by the client taking a screenshot of its local screen image in response to the screenshot command. Finally, the screenshot data is sent to the remote application. Through this method, when using a remote application, the server's screenshot command is intercepted and sent to the client. The client then captures the corresponding screenshot data and returns it to the remote application on the server. This achieves the goal of obtaining the client's local screenshot data within the remote application on the server, realizing accurate capture of the remote application's final user interface and ensuring a consistent user experience between the server-side and client-side remote applications. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 shows a schematic diagram of the screenshot process described in an embodiment of this application; Figure 2 shows a flowchart of a screenshot method based on remote applications proposed in an embodiment of this application; Figure 3 shows a flowchart of a screenshot method based on remote applications proposed in another embodiment of this application; Figure 4 shows a flowchart of a screenshot method based on remote applications proposed in yet another embodiment of this application; Figure 5 shows a flowchart of a screenshot method based on remote applications proposed in yet another embodiment of this application; Figure 6 shows a flowchart of a screenshot method based on remote applications proposed in an embodiment of this application; Figure 7 shows steps S510-S530 in an embodiment of this application. Figure 8 shows a schematic diagram of the implementation architecture of the process described above; Figure 9 shows a structural block diagram of a screenshot device based on remote application proposed in an embodiment of this application; Figure 10 shows a structural block diagram of a screenshot device based on remote application proposed in an embodiment of this application; Figure 11 shows a structural block diagram of an electronic device for executing the screenshot method based on remote application according to an embodiment of this application; Figure 12 shows a storage unit for storing or carrying program code implementing the screenshot method based on remote application according to an embodiment of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0023] With the development of technology, remote applications are becoming increasingly common. Due to their excellent security, low-cost deployment, and convenient operation and maintenance management, more and more clients are starting to use SBC (Server Based Computing, which represents remote application resources) solutions for business processing. However, since the application runs on a remote server, there are still some differences and variations compared to local applications.
[0024] When users use communication and office software in an SBC (Server Computing) application scenario, when capturing images using the software's screenshot function, due to the inherent architectural characteristics of the SBC application, the screenshot operation actually captures the content displayed in the server-side window, rather than the real-time image of the user's local PC screen. This results in the screenshot content not matching the user's expectations, causing user experience issues. For example, the aforementioned screenshot process can be illustrated in Figure 1. In Figure 1, after the client accesses the SBC via the protocol, the corresponding application (the app in user1 and user2 in Figure 1) runs on the server. The screenshot component on the server captures the app screen from the server and sends it to the client. The client then redraws the remote app screen locally, thus localizing the entire remote app. Therefore, if any keyboard or mouse operations are performed on the client's app at this time, what is actually changing is the application on the server, and the screenshot taken is also of the app screen on the server.
[0025] Therefore, the inventors have proposed a screenshot method, apparatus, server, and electronic device based on remote applications in this application. First, a screenshot command is intercepted from the remote application. This command instructs the capture of the local screen image of the client corresponding to the remote application. The client accesses the remote application via a remote protocol, sends the screenshot command to the client corresponding to the remote application, and then receives the screenshot data returned by the client. The screenshot data is obtained by the client taking a screenshot of its local screen image in response to the screenshot command. Finally, the screenshot data is sent to the remote application. Through this method, when using a remote application, the server's screenshot command is intercepted and sent to the client. The client then captures the corresponding screenshot data and returns it to the remote application on the server. This achieves the goal of obtaining the client's local screenshot data from the remote application on the server, realizing accurate capture of the remote application's final user interface and ensuring a consistent user experience between the server-side and client-side remote applications.
[0026] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0027] Please refer to Figure 2. This application provides a screenshot method based on a remote application. The method is applied to a screenshot proxy module, which runs on the server where the remote application is located. The method includes: Step S110: intercepting a screenshot instruction from the remote application. The screenshot instruction is used to instruct the capture of the local screen image of the client corresponding to the remote application. The client accesses the remote application on the server through a remote protocol.
[0028] In this embodiment, the screenshot command is an instruction to capture the local screen image of the client corresponding to the remote application. The local screen image of the client corresponding to the remote application refers to the content currently displayed on the client's screen. That is, the screenshot command can be used to instruct the acquisition of the client's current screen display content. The remote application refers to the target SBC application. This screenshot command is triggered by the server. "Triggered" can be understood as initiated by the server, or triggered by the server responding to a specified operation applied to the target application on the client. The client can access the remote application on the server via a remote protocol, where the protocol can be understood as a communication protocol. Optionally, in this embodiment, the server is used to run the remote application, mainly based on its RDS (Relational Database Service) mechanism to publish the remote application; the client is used to access SBC resources and process related data modules of the SBC, mainly providing users with access, display, and operation of the SBC, that is, the client is used to display the running screen of the remote application.
[0029] The execution entity of the remote application-based screenshot method provided in this application embodiment can be a screenshot proxy module deployed on the server (SBC server). Specifically, a system-level hook program or driver can be created on the server, that is, a screenshot proxy module (also called a remote application-based screenshot command proxy module) can be deployed on the server. This screenshot proxy module can deeply monitor the graphical interface calls at the operating system level (e.g., in Windows systems, it needs to intercept the triggering of the Print Screen key or related API calls). Its design goal is to ensure that all screenshot commands initiated by applications or business systems can be captured, rather than being executed locally on the server.
[0030] Step S120: Send the screenshot command to the client corresponding to the remote application.
[0031] In other words, in this embodiment of the application, the screenshot proxy module can identify and intercept all screenshot commands sent to the local graphical interface (which is used to point to the SBS server) in real time. When the screenshot proxy module identifies and intercepts a screenshot command, it will send the intercepted screenshot command to the client so that the client can return the screenshot data returned by the client based on the screenshot command.
[0032] Step S130: Receive screenshot data returned by the client, wherein the screenshot data is obtained by the client taking a screenshot of the client's local screen image in response to the screenshot command.
[0033] The client can run a persistent screenshot service module to listen for screenshot commands from the server. When the client's screenshot service module receives a screenshot command from the screenshot proxy module, it can call the client's local screenshot function to capture the client's local screen image and obtain screenshot data.
[0034] In one approach, screenshot data returned by the client is received through a pre-established network tunnel.
[0035] In this embodiment, after the client's screenshot service module obtains the screenshot data, it can return the screenshot data returned by the client to the screenshot proxy module through a pre-established network tunnel. When the screenshot proxy module receives the screenshot data returned by the client, it will send the screenshot data returned by the client to the remote application on the server. In this way, the remote application on the server can obtain the display data of the client to achieve the purpose of capturing the local screen.
[0036] The network tunnel can be a VPN (Virtual Private Network) or an SSL (Secure Sockets Layer) / TLS (Transport Layer Security) encrypted connection.
[0037] Step S140: Send the screenshot data to the remote application.
[0038] As one approach, the screenshot proxy module can monitor the return connection from the client in real time, and when it detects the return connection, it can obtain the screenshot data returned by the client.
[0039] This application provides a screenshot method based on remote applications. When using a remote application, the screenshot command from the server is intercepted and sent to the client. After the client captures the corresponding screenshot data, it returns the screenshot data to the remote application on the server. This achieves the purpose of obtaining the client's local screenshot data in the remote application on the server, realizing accurate capture of the final user interface of the remote application and making the user experience of the remote application on the server and the remote application on the client consistent.
[0040] Please refer to Figure 3. An embodiment of this application provides a screenshot method based on a remote application. The method is applied to a screenshot proxy module, which runs on the server where the remote application is located. The method includes: Step S210: Intercepting screenshot instructions from the remote application.
[0041] In this embodiment of the application, the screenshot instruction is generated by the remote application on the server in response to a specified operation performed on the client.
[0042] The specified operation applied to the client can be a pre-set operation that can trigger a screenshot command. For example, the specified operation can be a screenshot operation performed on the client using keyboard or mouse.
[0043] When a user interacts with a remote application on the client side (for example, when a user takes a screenshot by interacting with the remote application on the client side using the keyboard or mouse), the screenshot command is triggered by the remote application on the server side in response to the user's interaction.
[0044] Specifically, when a user takes a screenshot in the remote application window of the client (e.g., by pressing the Print Screen key on the keyboard or clicking the "Screenshot" button in the application menu), the screenshot operation is captured by the client and encapsulated as a standard input event, which is then sent to the server via a remote protocol.
[0045] When the remote application on the server receives this input event and begins executing its built-in screenshot logic, the screenshot proxy module deployed on the server starts working. This module intercepts the operation that should be performed by the operating system—capturing the current application window content into memory or the clipboard—through API hooks or injection into the system's graphics subsystem. In other words, the screenshot proxy module intercepts the screenshot command.
[0046] Step S220: Parse the screenshot command to obtain the command information of the screenshot command, the command information including the command source identifier and the target image format.
[0047] In this embodiment of the application, the instruction source identifier is used to indicate the application that initiated the screenshot instruction, and the target image format is used to indicate the image format of the screenshot data to be captured.
[0048] Once the screenshot proxy module intercepts a screenshot command, it can parse the command to obtain its instruction information. After obtaining this information, it can encapsulate it into a specific network data packet. In other words, it can encapsulate the instruction information into a network data packet of a specific format.
[0049] Step S230: Send the instruction information to the client corresponding to the remote application via the protocol stack.
[0050] In this embodiment of the application, the protocol stack can be understood as a pre-set data transmission protocol, such as one based on the TCP / IP protocol.
[0051] Once the screenshot proxy module encapsulates the instruction information into a specific network data packet, it can send the network data packet to the client through the configured network protocol stack.
[0052] Once the client's screenshot service module receives the network data packet, it can perform screenshot processing on the target application window corresponding to the instruction source identifier based on the information in the network data packet, so as to obtain the screenshot data returned by the client in the target image format.
[0053] Once the client's screenshot service module obtains the screenshot data returned by the client in the target image format, it can send the screenshot data returned by the client in the target image format to the screenshot proxy module through a pre-established network tunnel.
[0054] As one approach, the client's screenshot service module can compress the client data in the target image format before sending it to the screenshot proxy module, thereby reducing the transmission size.
[0055] Specifically, since the client's screenshot service module captures an uncompressed, highest-quality, complete image containing all rendering effects on the client side when taking a screenshot, if the screenshot service module directly returns the client's screenshot data to the screenshot proxy module, the client's screenshot data may be too large, leading to a decrease in transmission rate. Therefore, the client's screenshot service module can compress the target image format screenshot data before sending it to the screenshot proxy module to reduce the transmission size.
[0056] Step S240: Receive the screenshot data returned by the client.
[0057] Step S250: Based on the instruction source identifier, send the screenshot data packet of the target image format to the remote application.
[0058] In this embodiment, after the screenshot proxy module obtains the screenshot data returned by the client, it can return the screenshot data to the remote application on the server based on the previously parsed instruction source identifier. The remote application on the server is the remote application corresponding to the instruction source identifier.
[0059] This application provides a screenshot method based on a remote application, which can ensure that screenshot commands triggered by the server can be intercepted, so that the screenshot commands of the server are not executed on the server. This achieves the effect that the screenshot data obtained by the server based on the screenshot command is not the screenshot data of the server. Furthermore, based on the command source identifier, the screenshot data returned by the client can be accurately returned to the remote application of the server corresponding to the command source identifier.
[0060] Please refer to Figure 4. An embodiment of this application provides a screenshot method based on a remote application. The method includes: step S310: intercepting screenshot instructions from the remote application.
[0061] Step S320: Send the screenshot command to the client corresponding to the remote application.
[0062] Step S330: Receive the screenshot data returned by the client.
[0063] Step S340: Perform integrity verification on the screenshot data.
[0064] In this embodiment of the application, after the screenshot proxy module obtains the screenshot data returned by the client, it can perform integrity verification on the screenshot data returned by the client in a variety of ways.
[0065] The first verification method can be checksum-based verification. Specifically, the server-side screenshot proxy module can attach a checksum (such as CRC-32) when sending the screenshot command. When the client sends back the screenshot data, it recalculates the checksum and sends it along with the screenshot data. After receiving the screenshot data returned by the client, the server-side screenshot proxy module uses the same algorithm to calculate the checksum for the received portion of the screenshot data and compares the result with the received checksum. If they match, it can be determined that the screenshot data returned by the client is complete; if they do not match, it can be determined that the screenshot data returned by the client may be corrupted and a retransmission needs to be requested. The TCP and UDP protocols themselves also have built-in checksum mechanisms to verify the integrity of data packets during transmission.
[0066] The second verification method is hash-based verification. Specifically, for scenarios where data integrity is crucial, the server-side screenshot proxy module can require the client to include its hash value (such as MD5 or SHA-256) when sending back the screenshot data. Upon receiving the screenshot data from the client, the server-side screenshot proxy module calculates the hash value of the received data and compares it with the received hash value. If they match, the screenshot data returned by the client is considered complete; otherwise, it indicates that the screenshot data may be corrupted and a retransmission is required.
[0067] The third verification method is file size-based verification. Specifically, the server-side screenshot proxy module can inform the client of the expected screenshot data size (if it can be estimated) when sending the screenshot command. After receiving the screenshot data returned by the client, the server-side screenshot proxy module will check whether the actual received data size matches the expectation. If the size does not match, it indicates that the data transmission is incomplete.
[0068] The fourth verification method is packet sequence verification. Specifically, for large image data transmitted in multiple transmissions, the server and client typically have a negotiation process to determine the total number of data packets. The server maintains a counter during the receiving process to ensure the number of received data packets matches the expected number. If they match, it can be determined that the screenshot data returned by the client is complete; if they do not match, it can be determined that the screenshot data returned by the client may be corrupted and a retransmission request is needed.
[0069] In this embodiment of the application, the integrity of the screenshot data returned by the client can be verified by any of the above verification methods.
[0070] Step S350: If the verification passes, send the screenshot data to the remote application.
[0071] In this embodiment of the application, if the screenshot proxy module determines that the screenshot data returned by the client has passed the verification through the aforementioned verification method, the screenshot proxy module can send the screenshot data returned by the client to the remote application on the server so that the remote application on the server can display the screenshot data returned by the client.
[0072] If the verification fails, the screenshot proxy module can send a data retransmission command to the client, so that the client can resend the screenshot data returned by the client to the screenshot proxy module.
[0073] This application provides a screenshot method based on remote applications, which can determine that the screenshot data returned by the client has not been damaged during transmission by performing integrity verification on the screenshot data returned by the client.
[0074] Please refer to Figure 5. An embodiment of this application provides a screenshot method based on a remote application, which is applied to a client corresponding to a remote application. The remote application runs on a server. The method includes: step S410: receiving a screenshot instruction from a screenshot proxy module of the server. The screenshot instruction is used to instruct the client to capture the local screen image of the client. The client accesses the remote application of the server through a remote protocol.
[0075] In one approach, the screenshot service module of the client receives screenshot instructions sent by the screenshot proxy module of the server.
[0076] The screenshot service module is a resident module running on the client side. The client can use this module to listen for screenshot commands sent by the screenshot proxy module on the server side. Once the client's screenshot service module receives the command, it can invoke the client's local screenshot function to capture the screen image and obtain the screenshot data.
[0077] Alternatively, before receiving the screenshot instruction from the screenshot proxy module of the server, the method further includes: sending a specified operation applied to the client to the remote application, so that the remote application generates a screenshot instruction in response to the specified operation.
[0078] Step S420: In response to the screenshot command, take a screenshot of the local screen image on the client and obtain screenshot data.
[0079] As one method, the server receives instruction information sent by the screenshot proxy module. The instruction information is obtained after the server parses the screenshot instruction. The instruction information includes the instruction source identifier and the target image format. Based on the instruction information, screenshot data of the target image format is obtained.
[0080] Step S430: Send the screenshot data to the screenshot proxy module on the server so that the screenshot proxy module on the server can forward the screenshot data to the remote application.
[0081] In one approach, the screenshot data is sent to the screenshot proxy module on the server through a pre-established network tunnel.
[0082] This application provides a screenshot method based on remote applications. When using a remote application, the screenshot command from the server is intercepted and sent to the client. After the client captures the corresponding screenshot data, it returns the screenshot data to the remote application on the server. This achieves the purpose of obtaining the client's local screenshot data in the remote application on the server, realizing accurate capture of the final user interface of the remote application and making the user experience of the remote application on the server and the remote application on the client consistent.
[0083] Please refer to Figure 6. An embodiment of this application provides a screenshot method based on a remote application, which is applied to a server. The server is equipped with a remote application and a screenshot proxy module. The method includes: Step S510: Intercepting the screenshot instruction through the screenshot proxy module, wherein the screenshot instruction is used to instruct the capture of the local screen image of the client corresponding to the remote application.
[0084] Step S520: The screenshot instruction is sent to the client corresponding to the remote application through the screenshot proxy module, and the client accesses the remote application of the server through the remote protocol.
[0085] In one approach, the screenshot proxy module parses the screenshot command to obtain the command information, which includes the command source identifier and the target image format; and sends the command information to the client corresponding to the remote application through the protocol stack.
[0086] Step S530: Receive screenshot data returned by the client through the screenshot proxy module, and send the screenshot data returned by the client to the remote application on the server, so that the remote application on the server can display the screenshot data returned by the client.
[0087] As one approach, based on the instruction source identifier, the screenshot data packet in the target image format returned by the client is sent to the remote application on the server via the screenshot proxy module.
[0088] Alternatively, the screenshot proxy module can be used to verify the integrity of the screenshot data; if the verification passes, the screenshot data can be sent to the remote application on the server.
[0089] In this embodiment, the implementation architecture of the process described in steps S510-S530 can be as shown in Figure 7. This architecture may include a server and a client; the server deploys a remote application and a screenshot proxy module, while the client deploys a screenshot service module. When a client user is detected using the screenshot function, the server's screenshot proxy module intercepts the screenshot command and forwards it to the client's screenshot service module. Upon receiving the screenshot command, the client's screenshot service module takes a local screenshot to obtain the screenshot data returned by the client and replies to the screenshot proxy module. After receiving the screenshot data returned by the client, the screenshot proxy module can reply to the server's remote application. The interception of the screenshot command refers to the screenshot proxy module actively obtaining the screenshot command from the remote application through hooking, driving, or other methods, rather than the remote application actively sending the command to the screenshot proxy module.
[0090] The process sequence diagram described in steps S510-S530 can be shown in Figure 8. The user first logs into the client, and then the client establishes a connection with the server. After the connection is established, the SBC application is opened, and the server returns the SBC screen. The user then begins using the SBC application on the client. The user takes a screenshot by operating the application with the keyboard or mouse on the client. This sends the mouse and keyboard commands to the corresponding SBC application on the server. The server's SBC application responds to the screenshot command and takes a screenshot. At this time, the screenshot proxy module intercepts the screenshot command from the server's SBC application and forwards it to the client. The client's module receives the screenshot command and takes a screenshot to obtain the local screenshot data. Then, the local screenshot data is sent back to the server, and finally, the screenshot data returned by the client is displayed on the server's SBC application screenshot processing screen.
[0091] This application provides a screenshot method based on remote applications. When using a remote application, the screenshot command from the server is intercepted and sent to the client. After the client captures the corresponding screenshot data, it returns the screenshot data to the remote application on the server. This achieves the purpose of obtaining the client's local screenshot data in the remote application on the server, realizing accurate capture of the final user interface of the remote application and making the user experience of the remote application on the server and the remote application on the client consistent.
[0092] Please refer to Figure 9. An embodiment of this application provides a screenshot device 600 based on a remote application, which runs on a screenshot proxy module. The screenshot proxy module runs on the server where the remote application is located. The device 600 includes an interception unit 610, which is used to intercept screenshot instructions from the remote application. The screenshot instructions are used to instruct the capture of the local screen image of the client corresponding to the remote application. The client accesses the remote application on the server through a remote protocol.
[0093] The screenshot command is generated by the remote application on the server in response to a specified operation performed on the client.
[0094] In one manner, the interception unit 610 is used to intercept screenshot commands sent by the remote application to the local graphics interface via HOOK or driver.
[0095] The first sending unit 620 is used to send the screenshot command to the client corresponding to the remote application.
[0096] In one approach, the first sending unit 620 is used to parse the screenshot command to obtain the command information of the screenshot command, the command information including the command source identifier and the target image format; and send the command information to the client corresponding to the remote application through the protocol stack.
[0097] The receiving unit 630 is used to receive screenshot data returned by the client, wherein the screenshot data is obtained by the client taking a screenshot of the local screen image of the client in response to the screenshot command.
[0098] In one manner, the receiving unit 630 is used to receive screenshot data returned by the client through a pre-established network tunnel.
[0099] The second sending unit 640 is used to send the screenshot data to the remote application.
[0100] In one manner, the second sending unit 640 is used to send the screenshot data packet of the target image format to the remote application based on the instruction source identifier.
[0101] Alternatively, the second sending unit 640 is specifically used to perform integrity verification on the screenshot data; if the verification passes, the screenshot data is sent to the remote application.
[0102] Please refer to Figure 10. This application provides a screenshot device 700 based on a remote application, which runs on a client corresponding to the remote application. The remote application runs on a server. The device 700 includes a receiving unit 710, which receives a screenshot instruction from a screenshot proxy module of the server. The screenshot instruction is used to instruct the client to capture the local screen image of the client. The client accesses the remote application of the server through a remote protocol.
[0103] The screenshot unit 720 is used to take a screenshot of the local screen image of the client in response to the screenshot command and obtain screenshot data.
[0104] The sending unit 730 is used to send the screenshot data to the screenshot proxy module of the server, so that the screenshot proxy module of the server forwards the screenshot data to the remote application.
[0105] In one manner, the sending unit 730 is used to send the screenshot data to the screenshot proxy module of the server through a pre-established network tunnel.
[0106] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.
[0107] The following description, in conjunction with Figure 11, will illustrate an electronic device provided in this application.
[0108] Please refer to Figure 11. Based on the aforementioned screenshot method and apparatus based on remote applications, this application embodiment also provides another electronic device 900 capable of executing the aforementioned screenshot method based on remote applications. The electronic device 900 includes one or more (only one shown in the figure) processors 902, a memory 904, and a network module 906 coupled together. The memory 904 stores programs capable of executing the contents of the aforementioned embodiments, and the processor 902 can execute the programs stored in the memory 904.
[0109] The processor 902 may include one or more processing cores. The processor 902 connects to various parts within the electronic device 900 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 904, and by calling data stored in the memory 904. Optionally, the processor 902 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 902 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 902 and may be implemented separately using a communication chip.
[0110] The memory 904 may include random access memory (RAM) or read-only memory (ROM). The memory 904 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 904 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 900 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0111] The network module 906 is used to receive and transmit electromagnetic waves, realizing the mutual conversion between electromagnetic waves and electrical signals, thereby communicating with communication networks or other devices, such as electronic devices. The network module 906 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, SIM cards, memory, etc. The network module 906 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices via wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. For example, the network module 906 can interact with base stations.
[0112] Please refer to Figure 12, which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable storage medium 1000 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0113] The computer-readable storage medium 1000 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1000 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1000 has storage space for program code 1100 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 1100 may be compressed, for example, in a suitable form.
[0114] This application provides a screenshot method, apparatus, server, and electronic device based on a remote application. First, a screenshot command is intercepted from the remote application. This command instructs the capture of the local screen image of the client corresponding to the remote application. The client accesses the remote application via a remote protocol, then sends the screenshot command to the client corresponding to the remote application, and receives screenshot data returned by the client. The screenshot data is obtained by the client taking a screenshot of its local screen image in response to the screenshot command. Finally, the screenshot data is sent to the remote application. Through this method, when using a remote application, the server's screenshot command is intercepted and sent to the client. The client then captures the corresponding screenshot data and returns it to the remote application on the server. This achieves the goal of obtaining the client's local screenshot data within the remote application on the server, realizing accurate capture of the remote application's final user interface and ensuring a consistent user experience between the server-side and client-side remote applications.
[0115] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.
Claims
1. A screenshot method based on remote applications, characterized in that, The method is applied to a screenshot proxy module, which runs on a server where a remote application resides. The method includes: intercepting a screenshot command from the remote application, the screenshot command instructing the capture of a local screen image of the client corresponding to the remote application, the client accessing the remote application on the server via a remote protocol; sending the screenshot command to the client corresponding to the remote application; receiving screenshot data returned by the client, the screenshot data being obtained by the client taking a screenshot of the client's local screen image in response to the screenshot command; and sending the screenshot data to the remote application.
2. The method according to claim 1, characterized in that, The screenshot command is generated by the remote application on the server in response to a specified operation performed on the client.
3. The method according to claim 1, characterized in that, The interception of screenshot commands from the remote application includes: intercepting screenshot commands sent by the remote application to the local graphics interface via hooking or driver methods.
4. The method according to claim 1, characterized in that, Receiving the screenshot data returned by the client includes: receiving the screenshot data returned by the client through a pre-established network tunnel.
5. The method according to claim 1, characterized in that, Sending the screenshot command to the client corresponding to the remote application includes: parsing the screenshot command to obtain command information, the command information including a command source identifier and a target image format; and sending the command information to the client corresponding to the remote application through a protocol stack.
6. The method according to claim 5, characterized in that, Sending the screenshot data to the remote application includes: sending the screenshot data packet in the target image format to the remote application based on the instruction source identifier.
7. The method according to claim 1, characterized in that, Before sending the screenshot data to the remote application, the method further includes: performing an integrity check on the screenshot data; correspondingly, sending the screenshot data to the remote application includes: if the check passes, sending the screenshot data to the remote application.
8. A screenshot method based on remote applications, characterized in that, The method, applied to a client corresponding to a remote application running on a server, includes: receiving a screenshot instruction from a screenshot proxy module on the server, the screenshot instruction indicating to capture a local screen image of the client, the client accessing the remote application on the server via a remote protocol; responding to the screenshot instruction to capture a screenshot of the local screen image of the client, obtaining screenshot data; and sending the screenshot data to the screenshot proxy module on the server, so that the screenshot proxy module on the server forwards the screenshot data to the remote application.
9. The method according to claim 8, characterized in that, The screenshot proxy module that sends the screenshot data to the server includes: a screenshot proxy module that sends the screenshot data to the server through a pre-established network tunnel.
10. The method according to claim 8, characterized in that, Before receiving the screenshot instruction from the screenshot proxy module of the server, the method further includes: sending a specified operation applied to the client to the remote application, so that the remote application generates a screenshot instruction in response to the specified operation.
11. A screenshot device based on a remote application, characterized in that, The device, which operates on a screenshot proxy module running on the server where the remote application resides, includes: an interception unit for intercepting screenshot commands from the remote application, wherein the screenshot command instructs the capture of a local screen image of the client corresponding to the remote application, and the client accesses the remote application on the server via a remote protocol; a first sending unit for sending the screenshot command to the client corresponding to the remote application; a receiving unit for receiving screenshot data returned by the client, wherein the screenshot data is obtained by the client taking a screenshot of its local screen image in response to the screenshot command; and a second sending unit for sending the screenshot data to the remote application.
12. A screenshot device based on a remote application, characterized in that, The device, which operates on a client corresponding to a remote application running on a server, includes: a receiving unit for receiving a screenshot instruction from a screenshot proxy module on the server, the screenshot instruction instructing the client to capture a local screen image, the client accessing the remote application on the server via a remote protocol; a screenshot unit for responding to the screenshot instruction to capture a screenshot of the client's local screen image and obtain screenshot data; and a sending unit for sending the screenshot data to the screenshot proxy module on the server, so that the screenshot proxy module on the server forwards the screenshot data to the remote application.
13. A server, characterized in that, It includes one or more processors; one or more programs are stored in the memory and configured to be executed by the one or more processors according to any one of claims 1-7.
14. An electronic device, characterized in that, It includes one or more processors; one or more programs are stored in the memory and configured to be executed by the one or more processors according to any one of claims 8-10.