Data copy and paste system, method and device
By establishing an independent clipboard proxy module in the server, parallel transmission of client and server system clipboard data in the remote desktop system is realized, solving the problem of sequential data acquisition, and ensuring that the main client has access to the system clipboard control, improving the efficiency and reliability of data copy and paste operations.
Patent Information
- Application Number
- CN202111155856.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-09-29
AI Technical Summary
In the remote desktop system, the client and server system have unique clipboard channels. As a result, the master and slave clients can only obtain data sequentially and cannot obtain data in parallel. In addition, the master client loses control of the system clipboard, affecting data replication and Paste operation.
Establish an independent clipboard proxy module corresponding to each client in the server, establish a connection with the client through the service module, realize parallel transmission of system clipboard data, and establish a connection between the main clipboard proxy module and the system clipboard. And forward the data to the slave clipboard proxy module through a one-way data connection channel to achieve independent control of the system clipboard by the master client.
It realizes the parallel transmission of client and server system clipboard data, solves the problem of sequential data acquisition, ensures that the main client has independent control over the system clipboard, and avoids the loss of data pasted from the client.
Smart Images

Figure CN113918359B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data copy and paste system, method and device. Background Art
[0002] In a remote desktop system, it usually includes a server and multiple clients. The server runs a service module (server) for monitoring the connections of multiple clients and is responsible for image acquisition and data transmission; multiple clients all run a client module (client) for obtaining images from the server and displaying them. Clients are usually divided into two categories: master clients and slave clients. The master client has reverse control over the server desktop, which can be compared to a teacher, while the slave client can only display the server screen and has no reverse control, which can be compared to a student.
[0003] In the remote desktop teaching system, data copying and pasting based on clipboard redirection is one of its indispensable functions. The client relies on the system clipboard in the server to complete the copying and pasting of data files. Among them, the main client has read and write control rights to the system clipboard, while the slave client only has read control rights to the system clipboard. When the main client sends a copy request, the main client and the slave client will receive the copy completion information from the server, and then the main client and the slave client request the clipboard data from the system clipboard, so as to complete the pasting of data locally.
[0004] In the above scheme, when the client performs a paste operation, the Client requests the clipboard data from the Server. Due to the single connectivity between the Server and the system clipboard, it only supports the client to establish a unique connection channel with the system clipboard. The client can only obtain data from the system clipboard sequentially, but cannot obtain clipboard data in parallel. At the same time, when pasting data from the client, it establishes an independent connection channel with the system clipboard. At this time, if the main client wants to perform a copy action, it cannot be performed because it cannot establish a connection with the system clipboard. That is, the main client loses absolute control over the system clipboard. If the main client forcibly obtains control of the system clipboard, the pasted data from the client will be destroyed and lost.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present application provide a data copy and paste system, method and device to at least solve the technical problem in the related art that the client and server system clipboard channels are unique, and the master and slave clients can only obtain data from the system clipboard sequentially but not in parallel.
[0007] According to one aspect of an embodiment of the present application, a data copy and paste system is provided, comprising: a client, including a master client and at least one slave client, wherein the master client is used to initiate a data copy request or a data paste request to a server, and complete a paste operation on target data; the at least one slave client is used to initiate a data paste request to the server, and complete a paste operation on the target data; the server comprises a system clipboard, a master clipboard proxy module corresponding to the master client, and at least one slave clipboard proxy module corresponding to the at least one slave client, wherein the system clipboard is used to determine the target data according to the data copy request, and send the target data to the master clipboard proxy module; the master clipboard proxy module is used to send the target data to the master client and the at least one slave clipboard proxy module; the at least one slave clipboard proxy module is used to send the target data to the at least one slave client.
[0008] Optionally, the master client and the at least one slave client both include a client module, and the client module is used to initiate the data copy request or the data paste request to the server and complete the paste operation on the target data.
[0009] Optionally, the server also includes: a service module, which is used to monitor the connection between the main client and the server and between the at least one slave client and the server; wherein, when the main client is connected to the server, the service module is used to start the main clipboard proxy module, establish a connection with the main clipboard proxy module, and establish a connection between the system clipboard and the main clipboard proxy module; when the at least one slave client is connected to the server, the service module is used to start the at least one slave clipboard proxy module, establish a connection with the at least one slave clipboard proxy module, and establish a connection between the main clipboard proxy module and the at least one slave clipboard proxy module.
[0010] Optionally, a bidirectional data connection is established between the system clipboard and the master clipboard proxy module; a unidirectional data connection is established between the master clipboard proxy module and the at least one slave clipboard proxy module, and from the master clipboard proxy module to the at least one slave clipboard proxy module; a bidirectional data connection is established between the master clipboard proxy module and the service module, and between the at least one slave clipboard proxy module and the service module.
[0011] Optionally, inter-process communication is adopted between the service module and the master clipboard proxy module, between the service module and the at least one slave clipboard proxy module, and between the master clipboard proxy module and the at least one slave clipboard proxy module.
[0012] Optionally, the at least one slave clipboard proxy module is further configured to notify the at least one slave client of data copy completion information, and in response to a data paste request sent by the at least one slave client, send the target data to the at least one slave client.
[0013] Optionally, the master client is also used to set a redirection blacklist for the at least one slave client; the master clipboard proxy module is also used to maintain the redirection blacklist and detect whether the target slave client is in the redirection blacklist; when the target slave client is not in the redirection blacklist, the master clipboard proxy module sends the target data to the target slave clipboard proxy module corresponding to the target slave client; when the target slave client is in the redirection blacklist, the master clipboard proxy module no longer sends the target data to the target slave clipboard proxy module; wherein, the target slave client is any slave client among the at least one slave client.
[0014] Optionally, the at least one slave clipboard proxy module is also used to transmit multiple groups of target data corresponding to the multiple data copy requests to the cloud for storage to obtain historical copy data; the at least one slave client is also used to select the data to be pasted from the historical copy data and complete the pasting operation of the data to be pasted.
[0015] According to another aspect of an embodiment of the present application, a data copy and paste method is also provided, including: a server determines target data in response to a data copy request from a master client, wherein a system clipboard, a master clipboard proxy module corresponding to the master client, and a slave clipboard proxy module corresponding to the slave client are running on the server; the server sends the target data to the master clipboard proxy module through the system clipboard, and sends the target data to the slave clipboard proxy module through the master clipboard proxy module; the server sends the target data to the master client through the master clipboard proxy module in response to the data paste request from the master client, and the master client pastes the target data; the server sends the target data to the slave client through the slave clipboard proxy module in response to the data paste request from the slave client, and the slave client pastes the target data.
[0016] According to another aspect of an embodiment of the present application, a data copy and paste device is also provided, including: a copy module, used to respond to a data copy request from a master client and determine target data; a sending module, used to send the target data to a master clipboard proxy module corresponding to the master client through a system clipboard, and send the target data to a slave clipboard proxy module corresponding to a slave client through the master clipboard proxy module; a first paste module, used to respond to a data paste request from the master client, send the target data to the master client through the master clipboard proxy module, and the master client pastes the target data; a second paste module, used to respond to a data paste request from the slave client, send the target data to the slave client through the slave clipboard proxy module, and the slave client pastes the target data.
[0017] According to another aspect of an embodiment of the present application, a non-volatile storage medium is further provided, wherein the non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above-mentioned data copy and paste method.
[0018] According to another aspect of an embodiment of the present application, a processor is further provided, the processor being used to run a program, wherein the above-mentioned data copy and paste method is executed when the program is running.
[0019] In an embodiment of the present application, an independent clipboard proxy module corresponding to each client is established in the server, and each clipboard proxy module establishes a connection with the client through a service module, so that parallel transmission of system clipboard data can be achieved, thereby solving the technical problem in the related technology that the client and server system clipboard channels are unique, and the master and slave clients can only obtain data from the system clipboard sequentially but cannot obtain data in parallel; wherein, only the master clipboard proxy module corresponding to the master client establishes a connection with the system clipboard, and then a one-way data connection channel is established from the master clipboard proxy module to each slave clipboard proxy module corresponding to each slave client, and the system clipboard data is forwarded by the master clipboard proxy module to each slave clipboard proxy module, thereby realizing the master client's independent control over the system clipboard. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 It is a structural diagram of a data copy and paste system according to the related art;
[0022] Figure 2is a structural schematic diagram of a data copy and paste system according to an embodiment of the present application;
[0023] Figure 3 is a schematic diagram of a two-way data connection communication according to an embodiment of the present application;
[0024] Figure 4 is a schematic diagram of a data format of a shared data area according to an embodiment of the present application;
[0025] Figure 5 is a schematic diagram of a unidirectional data connection communication according to an embodiment of the present application;
[0026] Figure 6 is a flow chart of a data copy and paste method according to an embodiment of the present application;
[0027] Figure 7 It is a structural schematic diagram of a data copy and paste device according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Example 1
[0031] In the related art, the structure of a common data copy and paste system is as follows: Figure 1As shown, it includes a server, a master client and multiple slave clients. The server runs a system clipboard and a service module, and the clients all run client modules. Among them, the client relies on the system clipboard to complete the copy and paste of data files. The master client has read and write control rights to the system clipboard, while the slave client only has read control rights to the system clipboard. When the master client performs the copy operation, the master client and the slave client will receive the copy action message from the server, and then the master client and the slave client request the clipboard data from the system clipboard, so as to complete the pasting of data locally.
[0032] Among them, when the client performs a paste operation, the client module requests the clipboard data from the service module. Due to the single connectivity between the service module and the system clipboard, it only supports the client to establish a unique connection channel with the system clipboard, resulting in the client being able to only obtain data from the system clipboard sequentially, but not in parallel. At the same time, when pasting data from the client, it establishes an independent connection channel with the system clipboard. At this time, if the main client wants to perform a copy action, it cannot be performed because it cannot establish a connection with the system clipboard. That is, the main client loses absolute control over the system clipboard. If the main client forcibly obtains control of the system clipboard, the pasted data from the client will be destroyed and lost.
[0033] To solve the above problem, the embodiment of the present application proposes a new data copy and paste solution, which can realize parallel transmission of system clipboard data by establishing independent clipboard proxy modules corresponding to each client in the server, and each clipboard proxy module establishes a connection with the client through a service module; wherein, only the master clipboard proxy module corresponding to the master client is connected to the system clipboard, and then a one-way data connection channel is established from the master clipboard proxy module to each slave clipboard proxy module corresponding to each slave client, and the system clipboard data is forwarded from the master clipboard proxy module to each slave clipboard proxy module, thereby realizing independent control of the system clipboard by the master client.
[0034] Specifically, a structural diagram of an optional data copy and paste system in an embodiment of the present application is as follows: Figure 2 As shown, the system comprises at least a client and a server, wherein:
[0035] The client includes a master client and at least one slave client, wherein the master client is used to initiate a data copy request or a data paste request to the server and complete the paste operation on the target data; and the at least one slave client is used to initiate a data paste request to the server and complete the paste operation on the target data.
[0036] Among them, the client can be a user's personal computer, tablet, mobile phone or other mobile terminal, or it can be a zero terminal, whether it is a main client or at least one slave client, which includes a client module, which is connected to the service module in the server and is used to obtain the server screen from the service module for display; the client module is also used to respond to user operations in the main client or the slave client, initiate a data copy request or a data paste request to the server, and complete the paste operation of the target data.
[0037] The server includes a system clipboard, a main clipboard proxy module corresponding to a main client, and at least one slave clipboard proxy module corresponding to at least one slave client, wherein the system clipboard is used to determine target data based on a data copy request and send the target data to the main clipboard proxy module; the main clipboard proxy module is used to send the target data to the main client and at least one slave clipboard proxy module; and the at least one slave clipboard proxy module is used to send the target data to at least one slave client.
[0038] The server can be a physical machine or a high-performance virtual machine, which can connect to multiple clients and meet the needs of running large software such as teaching software. The server also includes a service module, which is used to monitor the connections of multiple clients, collect server images and send them back to multiple clients, and is responsible for data transmission between multiple clients.
[0039] In some optional embodiments of the present application, although the clipboard proxy module is resident in the server, it is not always running in consideration of the occupation of system resources. Therefore, the connection between the main client and the server and between at least one slave client and the server can be monitored by the service module; wherein, when the main client is connected to the server, the service module starts the main clipboard proxy module, establishes a connection with the main clipboard proxy module, and establishes a connection between the system clipboard and the main clipboard proxy module; when at least one slave client is connected to the server, the service module starts at least one slave clipboard proxy module, establishes a connection with at least one slave clipboard proxy module, and establishes a connection between the main clipboard proxy module and at least one slave clipboard proxy module. Optionally, when the main client or at least one slave client is disconnected from the server, the service module stops running the corresponding clipboard proxy module.
[0040] Specifically, the present application provides an optional clipboard proxy module startup and connection solution, the steps are as follows:
[0041] 1. The service module monitors the connection between the client and the server;
[0042] 2. The main client connects to the server;
[0043] 3. The service module starts the main clipboard proxy module corresponding to the main client;
[0044] 4. The main clipboard proxy module establishes a connection with the service module;
[0045] 5. The main clipboard proxy module establishes a connection with the system clipboard;
[0046] 6. Connect to the server from client 1;
[0047] 7. The service module starts the slave clipboard proxy module 1 corresponding to the slave client 1;
[0048] 8. Establish a connection from the clipboard proxy module 1 to the main clipboard proxy module.
[0049] In some optional embodiments of the present application, in the above-mentioned process of establishing a connection, a bidirectional data connection is established between the system clipboard and the master clipboard proxy module; a unidirectional data connection is established between the master clipboard proxy module and at least one slave clipboard proxy module, and from the master clipboard proxy module to at least one slave clipboard proxy module; a bidirectional data connection is established between the master clipboard proxy module and the service module, and between at least one slave clipboard proxy module and the service module.
[0050] Among them, IPC (Inter-Process Communication) is used for information and data transmission between the service module and the main clipboard proxy module, between the service module and at least one slave clipboard proxy module, and between the main clipboard proxy module and at least one slave clipboard proxy module.
[0051] Specifically, taking the data interaction between the clipboard proxy module (the main clipboard proxy module or the slave clipboard proxy module) and the service module as an example, the process of two-way data connection communication is as follows: Figure 3 As shown, there are two IPC channels between the clipboard proxy module and the service module, and data is exchanged through two shared data areas respectively. Among them, IPC channel 1 is responsible for sending signals from the service module to the clipboard proxy module, and there are two types of signals: (1) the service module has written data into shared data area 1, and the clipboard proxy module is requested to read data from shared data area 1 at a certain time; (2) the service module has read data from shared data area 2, and the clipboard proxy module is requested to continue writing data to shared data area 2 at a certain time. Similarly, IPC channel 2 is responsible for sending signals from the clipboard proxy module to the service module, and there are two types of signals: (1) the clipboard proxy module has written data into shared data area 2, and the service module is requested to read data from shared data area 2 at a certain time; (2) the clipboard proxy module has read data from shared data area 1, and the service module is requested to continue writing data to shared data area 1 at a certain time.
[0052] Optionally, the data format of the shared data area is as follows Figure 4 As shown, it includes: data block type, data block length, user ID, checksum and data block content, specifically:
[0053] Data block type: usually a 16-bit unsigned integer, used to indicate the information type of the content field in the data block. The value range of this parameter is 0-254. The encoding of the data block type field is usually allocated as follows:
[0054] Data block type encoding meaning 0 Payload data (DATA) 1 INIT 2 INIT ACK 3 SHUTDOWN 4 Shutdown Acknowledgement (SHUTDOWN ACK) 5 STATUS ECHO 6 STATUS ACK
[0055] Data block length: usually a 16-bit unsigned integer, used to represent the number of bytes including the data block type field, data block length field, user ID field, checksum field and data block content field;
[0056] User ID: used to indicate which connected user the data belongs to;
[0057] Checksum: usually a 16-bit unsigned integer, used to check the sum of a set of data items at the destination;
[0058] Data block content: This field is of variable length and includes the actual information transmitted in the data block. Its use and format depend on the data block type.
[0059] Taking the data interaction between the master clipboard proxy module and the slave clipboard proxy module as an example, the process of one-way data connection communication is as follows: Figure 5 As shown, there is an IPC channel between the main clipboard proxy module and each slave clipboard proxy module, and one-way data transmission is performed between the two through a shared data area. For example, IPC channel 1 is responsible for sending a signal from the main clipboard proxy module to the slave clipboard proxy module 1, and the signal is: the main clipboard proxy module has written data into the shared data area 1, and the slave clipboard proxy module 1 is requested to read data from the shared data area 1 at a certain time. IPC channel 2 is responsible for sending a signal from the main clipboard proxy module to the slave clipboard proxy module 2, and the signal is: the main clipboard proxy module has written data into the shared data area 2, and the slave clipboard proxy module 2 is requested to read data from the shared data area 2 at a certain time.
[0060] In some optional embodiments of the present application, at least one slave clipboard proxy module is also used to notify at least one slave client of data copy completion information, and send target data to at least one slave client in response to a data paste request sent by at least one slave client.
[0061] Specifically, when the main client sends a data copy request to the server, the system clipboard will determine the corresponding clipboard data and send it to the main clipboard proxy module, which will then be sent to each slave clipboard proxy module. At the same time, all clipboard proxy modules will send data copy completion information to the corresponding client, and in response to the data paste request sent by the client, send the clipboard data to the corresponding client.
[0062] Specifically, this application provides an optional data copy and paste solution, the steps are as follows:
[0063] 1. The primary client sends a data replication request to the server;
[0064] 2. The system clipboard prepares clipboard data and sends it to the main clipboard proxy module;
[0065] 3. The master clipboard proxy module distributes the clipboard data to the slave clipboard proxy module;
[0066] 4. The data copying completion information is sent from the clipboard proxy module through the service module;
[0067] 5. The service module forwards the data replication completion information to the corresponding client module from the client;
[0068] 6. Send a data paste request from the client to the service module through the client module;
[0069] 7. The service module forwards the data paste request to the corresponding slave clipboard proxy module;
[0070] 8. The slave clipboard proxy module sends the clipboard data to the corresponding slave client through the service module;
[0071] 9. Paste and save the clipboard data from the client through the client module.
[0072] In some optional embodiments of the present application, considering that the main client has independent control over the system clipboard, UI operations can be added to the main client, and a clipboard redirection blacklist can be maintained inside the main clipboard proxy module to filter and control the clipboard redirection function of specified slave clients. By controlling the main clipboard proxy module to selectively forward clipboard data to a specific slave clipboard proxy module, selective clipboard data redirection and control can be achieved.
[0073] Optionally, the master client can set a redirection blacklist for at least one slave client; the master clipboard proxy module maintains the redirection blacklist and detects whether the target slave client is in the redirection blacklist; when the target slave client is not in the redirection blacklist, the master clipboard proxy module sends the target data to the target slave clipboard proxy module corresponding to the target slave client; when the target slave client is in the redirection blacklist, the master clipboard proxy module no longer sends the target data to the target slave clipboard proxy module; wherein, the target slave client is any slave client of at least one slave client.
[0074] Each slave client is not added to the blacklist initially, and the user can selectively add the slave client to the blacklist through the UI interface provided by the master client.
[0075] Specifically, the present application provides an optional solution for clipboard redirection selection and control, the steps are as follows:
[0076] 1. The main client provides UI interface operation through the client module;
[0077] 2. The master client responds to the user's operation by adding client A to the redirection blacklist;
[0078] 3. The main client notifies the main clipboard proxy module through the client module to add the slave clipboard proxy module A corresponding to the slave client A to the blacklist;
[0079] 4. The primary client will remove client B from the redirection blacklist in response to the user's operation;
[0080] 5. The main client notifies the main clipboard proxy module through the client module to remove the slave clipboard proxy module B corresponding to the client B from the blacklist;
[0081] 6. The main client sends a data copy request to the server, and the system clipboard prepares the clipboard data and sends it to the main clipboard proxy module;
[0082] 7. The main clipboard proxy module filters the slave clipboard proxy module corresponding to the client through the blacklist. Among them, the slave clipboard proxy module A cannot receive the clipboard data because it is in the blacklist; the slave clipboard proxy module B can receive the clipboard data because it is not in the blacklist;
[0083] 8. Data paste cannot be performed from client A; data paste can be performed from client B.
[0084] In some optional embodiments of the present application, in order to further improve the user experience and allow the user to selectively paste historical cut data from the client at a chosen time, a cloud process is added in which the clipboard data is transferred from the clipboard proxy module to the cloud storage.
[0085] Optionally, at least one slave clipboard proxy module transmits multiple sets of target data corresponding to multiple data copy requests to the cloud for storage to obtain historical copy data; at least one slave client can select the data to be pasted from the historical copy data and complete the pasting operation of the data to be pasted.
[0086] Specifically, the present application provides an optional solution for uploading data from the clipboard proxy module to the cloud, the steps are as follows:
[0087] 1. The primary client sends a data replication request to the server;
[0088] 2. The system clipboard prepares clipboard data and sends it to the main clipboard proxy module;
[0089] 3. The master clipboard proxy module distributes the clipboard data to the slave clipboard proxy module;
[0090] 4. Transfer the clipboard data from the clipboard proxy module to the cloud to save the records;
[0091] 5. The data copy completion information is sent from the clipboard proxy module to the corresponding slave client;
[0092] 6. Repeat steps 1 to 6. At this time, the cloud data corresponding to the client will form historical replication data;
[0093] 7. Provide UI interface operation from the client through the customer module;
[0094] 8. Connect to the cloud from the client through the client module;
[0095] 9. The client obtains the historical copied data from the cloud through the client module, selects the data to be pasted, and pastes and saves it locally on the client.
[0096] In an embodiment of the present application, an independent clipboard proxy module corresponding to each client is established in the server, and each clipboard proxy module establishes a connection with the client through a service module, so that parallel transmission of system clipboard data can be achieved, thereby solving the technical problem in the related technology that the client and server system clipboard channels are unique, and the master and slave clients can only obtain data from the system clipboard sequentially but cannot obtain data in parallel; wherein, only the master clipboard proxy module corresponding to the master client establishes a connection with the system clipboard, and then a one-way data connection channel is established from the master clipboard proxy module to each slave clipboard proxy module corresponding to each slave client, and the system clipboard data is forwarded by the master clipboard proxy module to each slave clipboard proxy module, thereby realizing the master client's independent control over the system clipboard.
[0097] Example 2
[0098] In the operating environment of the data copy and paste system in Example 1, the embodiment of the present application provides an embodiment of a data copy and paste method. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0099] Figure 6 is a flow chart of an optional data copy and paste method according to an embodiment of the present application, such as Figure 6 As shown, the method at least includes steps S602-S608, wherein:
[0100] Step S602, the server determines target data in response to a data copy request from the master client, wherein a system clipboard, a master clipboard proxy module corresponding to the master client, and a slave clipboard proxy module corresponding to the slave client are running on the server.
[0101] Step S604: the server sends the target data to the primary clipboard proxy module through the system clipboard, and sends the target data to the secondary clipboard proxy module through the primary clipboard proxy module.
[0102] Step S606: In response to the data paste request of the primary client, the server sends the target data to the primary client through the primary clipboard proxy module, and the primary client pastes the target data.
[0103] Step S608 , the server responds to the data paste request from the slave client by sending the target data to the slave client through the clipboard proxy module, and the slave client pastes the target data.
[0104] In some optional embodiments of the present application, when the main client sends a data copy request to the server, the system clipboard will determine the corresponding clipboard data and send it to the main clipboard proxy module, which will then be sent to each slave clipboard proxy module. At the same time, all clipboard proxy modules will send data copy completion information to the corresponding client, and in response to the data paste request sent by the client, send the clipboard data to the corresponding client, and the client will paste the clipboard data.
[0105] Among them, although the clipboard proxy module is resident in the server, it is not running all the time in consideration of the occupation of system resources. Therefore, the server will monitor the connection between the main client and the server and between the slave client and the server through the service module; wherein, when the main client connects to the server, the service module starts the main clipboard proxy module, establishes a connection with the main clipboard proxy module, and establishes a connection between the system clipboard and the main clipboard proxy module; when the slave client connects to the server, the service module starts the corresponding slave clipboard proxy module, establishes a connection with the slave clipboard proxy module, and establishes a connection between the main clipboard proxy module and the slave clipboard proxy module; when the main client or at least one slave client is disconnected from the server, the service module stops running the corresponding clipboard proxy module.
[0106] In the above connection establishment process, a bidirectional data connection is established between the system clipboard and the main clipboard proxy module; a unidirectional data connection is established between the main clipboard proxy module and the slave clipboard proxy module; a bidirectional data connection is established between the main clipboard proxy module and the service module, and between the slave clipboard proxy module and the service module. Among them, IPC communication is adopted between the service module and the main clipboard proxy module, between the service module and the slave clipboard proxy module, and between the main clipboard proxy module and the slave clipboard proxy module.
[0107] Specifically, when the main client sends a data copy request to the server, the system clipboard will determine the corresponding clipboard data and send it to the main clipboard proxy module, which will then be sent to each slave clipboard proxy module. At the same time, all clipboard proxy modules will send data copy completion information to the corresponding client, and in response to the data paste request sent by the client, send the clipboard data to the corresponding client.
[0108] Specifically, an optional complete data copy and paste process steps are as follows:
[0109] 1. The primary client sends a data replication request to the server;
[0110] 2. The system clipboard prepares clipboard data and sends it to the main clipboard proxy module;
[0111] 3. The master clipboard proxy module distributes the clipboard data to the slave clipboard proxy module;
[0112] 4. The master clipboard proxy module sends the data copy completion information to the master client, and the slave clipboard proxy module sends the data copy completion information to the corresponding slave client;
[0113] 5. The main client sends a data paste request to the main clipboard proxy module;
[0114] 6. The main clipboard proxy module sends the clipboard data to the main client;
[0115] 7. The main client pastes and saves the clipboard data through the client module;
[0116] 8. Send a data paste request from the client to the corresponding clipboard proxy module;
[0117] 9. The slave clipboard proxy module sends the clipboard data to the corresponding slave client;
[0118] 10. Paste and save the clipboard data from the client through the client module.
[0119] In an embodiment of the present application, the server responds to a data copy request from the master client, determines the target data, and sends the target data to the master clipboard proxy module through the system clipboard, and sends the target data to the slave clipboard proxy module through the master clipboard proxy module; thereafter, in response to a data paste request from the master client, the master clipboard proxy module sends the target data to the master client, and the master client pastes the target data; in response to a data paste request from the slave client, the slave clipboard proxy module sends the target data to the slave client, and the slave client pastes the target data. Among them, by establishing an independent clipboard proxy module corresponding to each client in the server, each clipboard proxy module establishes a connection with the client through the service module, so that parallel transmission of system clipboard data can be achieved, thereby solving the technical problem in the related technology that the client and server system clipboard channels are unique, and the master and slave clients can only obtain data from the system clipboard sequentially but cannot obtain data in parallel; because only the master clipboard proxy module establishes a connection with the system clipboard, and then a one-way data connection channel is established from the master clipboard proxy module to each slave clipboard proxy module, the system clipboard data is forwarded by the master clipboard proxy module to each slave clipboard proxy module, thereby realizing the independent control of the system clipboard by the master client.
[0120] Example 3
[0121] According to an embodiment of the present application, a data copy and paste device for implementing the data copy and paste method in embodiment 2 is also provided. Figure 7 As shown, the device includes a copy module 70, a sending module 72, a first pasting module 74 and a second pasting module 76, wherein:
[0122] A replication module 70, for responding to a data replication request from a primary client and determining target data;
[0123] The sending module 72 is used to send the target data to the master clipboard proxy module corresponding to the master client through the system clipboard, and send the target data to the slave clipboard proxy module corresponding to the slave client through the master clipboard proxy module;
[0124] The first pasting module 74 is used to respond to the data pasting request of the master client, send the target data to the master client through the master clipboard proxy module, and the master client pastes the target data;
[0125] The second pasting module 76 is used to respond to the data pasting request from the slave client, send the target data to the slave client through the clipboard proxy module, and the slave client pastes the target data.
[0126] It should be noted that each module in the data copy and paste device in the embodiment of the present application corresponds one by one to the implementation steps of the data copy and paste method in Example 2. Since a detailed description has been given in Example 2, some details not reflected in this embodiment can be referred to Example 2 and will not be repeated here.
[0127] Example 4
[0128] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the above-mentioned data copy and paste method.
[0129] According to an embodiment of the present application, a processor is also provided, which is used to run a program, wherein the processor executes the above-mentioned data copy and paste method when the program is running.
[0130] Specifically, the processor executes the following steps when the program is running: the server determines the target data in response to the data copy request of the main client, wherein a system clipboard, a main clipboard proxy module corresponding to the main client, and a slave clipboard proxy module corresponding to the slave client are running on the server; the server sends the target data to the main clipboard proxy module through the system clipboard, and sends the target data to the slave clipboard proxy module through the main clipboard proxy module; the server responds to the data paste request of the main client, sends the target data to the main client through the main clipboard proxy module, and the main client pastes the target data; the server responds to the data paste request of the slave client, sends the target data to the slave client through the slave clipboard proxy module, and the slave client pastes the target data.
[0131] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0132] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0133] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0135] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0136] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0137] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A data copy and paste system, It is characterized in that include: A client, comprising a master client and at least one slave client, wherein the master client is used to initiate a data copy request or a data paste request to a server and complete a paste operation on target data; the at least one slave client is used to initiate a data paste request to the server and complete a paste operation on the target data; The server includes a system clipboard, a main clipboard proxy module corresponding to the main client, and at least one slave clipboard proxy module corresponding to the at least one slave client, wherein the system clipboard is used to determine the target data based on the data copy request and send the target data to the main clipboard proxy module; the main clipboard proxy module is used to send the target data to the main client and the at least one slave clipboard proxy module; the at least one slave clipboard proxy module is used to send the target data to the at least one slave client.
2. The system according to claim 1, It is characterized in that The master client and the at least one slave client both include a client module, and the client module is used to initiate the data copy request or the data paste request to the server and complete the paste operation on the target data.
3. The system according to claim 1, It is characterized in that The server further includes: a service module, the service module is used to monitor the connection between the master client and the server and between the at least one slave client and the server; wherein, When the main client is connected to the server, the service module is used to start the main clipboard proxy module, establish a connection with the main clipboard proxy module, and establish a connection between the system clipboard and the main clipboard proxy module; When the at least one slave client connects to the server, the service module is used to start the at least one slave clipboard proxy module, establish a connection with the at least one slave clipboard proxy module, and establish a connection between the master clipboard proxy module and the at least one slave clipboard proxy module.
4. The system according to claim 3, It is characterized in that include: A two-way data connection is established between the system clipboard and the main clipboard proxy module; A one-way data connection is established between the master clipboard proxy module and the at least one slave clipboard proxy module, from the master clipboard proxy module to the at least one slave clipboard proxy module; A bidirectional data connection is established between the master clipboard proxy module and the service module, and between the at least one slave clipboard proxy module and the service module.
5. The system according to claim 3, It is characterized in that Inter-process communication is adopted between the service module and the master clipboard proxy module, between the service module and the at least one slave clipboard proxy module, and between the master clipboard proxy module and the at least one slave clipboard proxy module.
6. The system according to claim 1, It is characterized in that The at least one slave clipboard proxy module is further configured to notify the at least one slave client of data copy completion information, and in response to a data paste request sent by the at least one slave client, send the target data to the at least one slave client.
7. The system according to claim 1, It is characterized in that The master client is further used to set a redirection blacklist for the at least one slave client; The main clipboard proxy module is also used to maintain the redirection blacklist and detect whether the target slave client is in the redirection blacklist; When the target slave client is not in the redirection blacklist, the master clipboard proxy module sends the target data to the target slave clipboard proxy module corresponding to the target slave client; when the target slave client is in the redirection blacklist, the master clipboard proxy module no longer sends the target data to the target slave clipboard proxy module; wherein the target slave client is any slave client among the at least one slave client.
8. The system according to claim 1, It is characterized in that The at least one slave clipboard proxy module is further used to transmit multiple sets of target data corresponding to the multiple data copy requests to the cloud for storage, to obtain historical copy data; The at least one slave client is further used to select data to be pasted from the historical copied data and complete a pasting operation on the data to be pasted.
9. A data copy and paste method, It is characterized in that include: The server determines the target data in response to the data copy request of the master client, wherein the server runs a system clipboard, a master clipboard proxy module corresponding to the master client, and a slave clipboard proxy module corresponding to the slave client; The server sends the target data to the master clipboard proxy module through the system clipboard, and sends the target data to the slave clipboard proxy module through the master clipboard proxy module; The server responds to the data pasting request of the master client, and sends the target data to the master client through the master clipboard proxy module, and the master client pastes the target data; In response to the data pasting request from the slave client, the server sends the target data to the slave client through the slave clipboard proxy module, and the slave client pastes the target data.
10. A data copy and paste device, It is characterized in that include: A replication module, used to respond to a data replication request from a primary client and determine target data; a sending module, used for sending the target data to a master clipboard proxy module corresponding to the master client via a system clipboard, and sending the target data to a slave clipboard proxy module corresponding to the slave client via the master clipboard proxy module, wherein the system clipboard, the master clipboard proxy module and the slave clipboard proxy module are all run on a server; A first pasting module, configured to respond to a data pasting request from the master client, send the target data to the master client through the master clipboard proxy module, and the master client pastes the target data; The second pasting module is used to respond to the data pasting request from the slave client, send the target data to the slave client through the slave clipboard proxy module, and the slave client pastes the target data.
11. A non-volatile storage medium, It is characterized in that The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the data copy and paste method described in claim 9.
12. A processor, It is characterized in that The processor is used to run a program, wherein the data copy and paste method described in claim 9 is executed when the program is run.
