Data transmission method and device, computer equipment and storage medium
By encrypting and transmitting the data to be sent to the second terminal, the problems of low data security and pasting efficiency in the prior art are solved, and the functions of encrypted transmission and direct pasting are realized, and the security of data is improved. and paste efficiency.
Patent Information
- Application Number
- CN202411480432.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-22
AI Technical Summary
The existing cross-terminal content paste scheme requires the terminal to receive and display the content to be copied and pasted through an instant communication tool, which increases the exposure of data, affects data security, and requires manual copying of content to be pasted, affecting paste efficiency.
After generating the target data in the first terminal, encrypting the data according to the preset encryption rules, encrypting the encrypted data is sent to the second terminal. After the second terminal receives the encrypted data, it decrypts and saves it on the paste board according to the preset decryption rules. The user can directly paste the data from the paste board.
By encrypting the transmission of data, the security of data during transmission is improved; no copy-paste data is displayed, which reduces the exposure rate of data and improves the security of data; users can directly paste data, improving the efficiency of pasting.
Smart Images

Figure CN119416236A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a data transmission method, apparatus, computer equipment and storage medium. Background Art
[0002] With the development of computer technology, copy and paste technology has emerged. Copy and paste technology means that users can copy data through a computer and paste the copied data to a target location.
[0003] In daily life, users often need to use the above-mentioned copy and paste technology to paste content across terminals. For example, they receive content (such as web links) sent by others through instant messaging tools installed in terminals such as mobile phones, and then manually copy the content to the clipboard, and then open the corresponding software (such as a browser) to paste it.
[0004] However, the above-mentioned cross-terminal content pasting solution requires the terminal to receive and display the content to be copied and pasted through the instant messaging tool, and the user can manually copy the content displayed on the instant messaging tool to the clipboard and display the content on the instant messaging tool, which increases the exposure rate of data and affects data security. In addition, the content needs to be manually copied before the data can be pasted, which affects the pasting efficiency. Summary of the invention
[0005] The present application provides a data transmission method, apparatus, computer equipment and storage medium, which can improve the security of data to be pasted and the efficiency of data pasting.
[0006] In a first aspect, a data transmission method is provided, where the method is applied to a first terminal, and the method includes:
[0007] In response to a user's operation of generating target data in the data to be sent area in the first terminal, generating target data in the data to be sent area;
[0008] In response to a user's selection operation of a sending target for the data to be sent area, determining a target sending target identifier from a plurality of preset candidate sending target identifiers;
[0009] In response to a data sending operation of a user on the data to-be-sent area, an encryption operation is performed on the target data according to a preset encryption rule to obtain encrypted data;
[0010] The encrypted data is sent to a second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, it decrypts the encrypted data according to a preset decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal.
[0011] In a second aspect, a data transmission method is provided, the method being applied to a second terminal, the method comprising:
[0012] Acquire encrypted data sent by the first terminal, the encrypted data being data obtained by the first terminal performing an encryption operation on target data according to a preset encryption rule, the target data being data in a data to-be-sent area of the first terminal;
[0013] Decrypting the encrypted data according to a preset decryption rule to obtain the target data;
[0014] The target data is saved to the clipboard.
[0015] In a third aspect, a first data transmission device is provided, where the first data transmission device is deployed in a first terminal, and the first data transmission device includes:
[0016] A generating unit, configured to generate target data in the data to be sent area in the first terminal in response to a user's target data generating operation on the data to be sent area;
[0017] a determination unit, configured to determine a target sending object identifier from a plurality of preset candidate sending object identifiers in response to a user's sending target selection operation for the data to be sent area;
[0018] An encryption unit, configured to, in response to a user's data sending operation on the data to be sent area, perform an encryption operation on the target data according to a preset encryption rule to obtain encrypted data;
[0019] A sending unit is used to send the encrypted data to a second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, it decrypts the encrypted data according to a preset decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal.
[0020] In a fourth aspect, a second data transmission device is provided, where the second data transmission device is deployed in a second terminal, and the second data transmission device includes:
[0021] An acquisition unit, configured to acquire encrypted data sent by the first terminal, wherein the encrypted data is data obtained by the first terminal performing an encryption operation on target data according to a preset encryption rule, and the target data is data in a data to-be-sent area of the first terminal;
[0022] A decryption unit, used to perform a decryption operation on the encrypted data according to a preset decryption rule to obtain the target data;
[0023] The saving unit is used to save the target data to a clipboard.
[0024] In a fifth aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the data transmission method mentioned in the first aspect or the second aspect are implemented.
[0025] In a sixth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data transmission method mentioned in the first aspect or the second aspect are implemented.
[0026] In the scheme implemented by the above-mentioned data transmission method, device, computer equipment and storage medium, target data can be generated in the data to be sent area in the first terminal in response to the user's target data generation operation for the data to be sent area; in response to the user's sending target selection operation for the data to be sent area, the target sending object identifier can be determined from multiple preset candidate sending object identifiers; in response to the user's data sending operation for the data to be sent area, the target data is encrypted according to the preset encryption rules to obtain encrypted data; the encrypted data is sent to the second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, the encrypted data is decrypted according to the preset decryption rules to obtain the target data, and the target data is saved to the clipboard of the second terminal. In the present application, before sending data to the second terminal, the first terminal will encrypt the data to be sent, thereby improving the security of the data during transmission. In addition, when the second terminal receives the encrypted data sent by the first terminal, it decrypts the encrypted data to obtain the target data, and then saves the target data directly to the clipboard of the second terminal. There is no need to display the target data (data to be pasted) and then copy it, which reduces the exposure rate of the data to be pasted and further improves the security of the data. The second terminal directly saves the target data to the clipboard, and the user can directly paste the data on the clipboard. There is no need to copy the data before pasting the data, which improves the efficiency of data pasting. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0028] Figure 1 This is a schematic diagram of an application environment of a data transmission method in an embodiment of the present application;
[0029] Figure 2is another application environment schematic diagram of the data transmission method in one embodiment of the present application;
[0030] Figure 3 This is a flow chart of a data transmission method in one embodiment of the present application;
[0031] Figure 4 This is a schematic diagram of a sub-process of a data transmission method in an embodiment of the present application;
[0032] Figure 5 is a flow chart of a data transmission method in another embodiment of the present application;
[0033] Figure 6 is a structural schematic diagram of a first data transmission device in an embodiment of the present application;
[0034] Figure 7 is a structural schematic diagram of a second data transmission device in an embodiment of the present application;
[0035] Figure 8 It is a structural diagram of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are 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 are within the scope of protection of this application.
[0037] The data transmission method provided in the embodiment of the present application can be applied in the following aspects: Figure 1 or Figure 2 In the application environment, Figure 1 In the application environment shown, the first terminal and the second terminal can communicate directly. For example, the first terminal and the second terminal are connected to each other by Bluetooth in advance, and then communicate through Bluetooth transmission technology. Figure 2In the application environment shown, the first terminal and the second terminal are both installed with the same target application. For ease of understanding, the application can be understood as an instant communication tool such as WeChat, internal bank chat software, etc., and then the first terminal and the second terminal communicate through the target server corresponding to the target application. Specifically, the first terminal generates target data in the data to be sent area in response to the user's target data generation operation for the data to be sent area in the first terminal; in response to the user's sending target selection operation for the data to be sent area, the target sending object identifier is determined from a plurality of preset candidate sending object identifiers; in response to the user's data sending operation for the data to be sent area, the target data is encrypted according to a preset encryption rule to obtain encrypted data; the encrypted data is sent directly or through the target server to the second terminal corresponding to the target sending object identifier. When the second terminal receives the encrypted data, the encrypted data is decrypted according to a preset decryption rule to obtain the target data, and the target data is saved to the clipboard. In the present application, before sending data to the second terminal, the first terminal will encrypt the data to be sent, thereby improving the security of the data during transmission. In addition, when the second terminal receives the encrypted data sent by the first terminal, it decrypts the encrypted data to obtain the target data, and then saves the target data directly to the clipboard of the second terminal. There is no need to display the target data (data to be pasted) and then copy it, which reduces the exposure rate of the data to be pasted and further improves the security of the data. The second terminal directly saves the target data to the clipboard, and the user can directly paste the data on the clipboard. There is no need to copy the data before pasting the data, which improves the efficiency of data pasting.
[0038] The encryption rule preset in the first terminal and the decryption rule preset in the second terminal are encryption and decryption rules pre-agreed by the first terminal and the second terminal, and the encryption rule and the decryption rule are symmetric encryption algorithms or asymmetric encryption algorithms.
[0039] See also Figure 3 As shown, Figure 3 A flowchart of a data transmission method provided in an embodiment of the present application is provided. The execution subject of the embodiment is a first terminal, and the method includes the following steps:
[0040] S110: In response to a user's operation of generating target data in a data to-be-sent area in the first terminal, generating target data in the data to-be-sent area.
[0041] In this embodiment, when the user needs to send content to another terminal, first, the user needs to open the data to be sent area on the first terminal, and then fill in the data to be sent area by manually inputting or selecting target data from the local area of the first terminal.
[0042] Among them, when the target data generation operation is a target data write operation, the target data input by the user corresponding to the target data write operation is written into the data to be sent area; when the target data generation operation is a target data selection operation, local data corresponding to the target data selection operation is selected from the data selection entry of the data to be sent area as the target data, and the target data is written into the data to be sent area.
[0043] That is, after the user opens the data to be sent area, the target data can be directly written into the data to be sent area through input tools such as a keyboard or mouse, for example, by copying other content on the first terminal and pasting it into the data to be sent area, or directly writing the content into the data to be sent area; in addition, the data to be sent area provides a data selection entrance, through which the corresponding local data can be selected from a local album or a local folder as the target data to be written into the data to be sent area; wherein, the target data in the present application includes text (such as words, links, etc.), files (such as word files, pdf files, etc.) or pictures.
[0044] S120: In response to the user's operation of selecting a sending target for the data to be sent area, determining a target sending target identifier from a plurality of preset candidate sending target identifiers.
[0045] In this embodiment, after the user enters the target data in the data to be sent area, it is necessary to further select a target sending object identifier, wherein the target sending object identifier is an identifier of the target data receiving object, which can be at least one of a user name (for example, when the first terminal and the second terminal are both installed with a target application, and the data to be sent area is a pasted data sending area of the target application in the first terminal, the user name is a user name for logging into the target application in the second terminal), a device identifier (an identifier for identifying the second terminal), and an application identifier (the application identifier is an application identifier, such as WeChat, QQ, an internal bank chat software identifier, etc., at least one application is installed in the first terminal and the second terminal, and the applications in the first terminal and the second terminal are logged in with the same account, or binding relationship accounts (different accounts) are pre-established).
[0046] It should be noted that, when the first terminal and the second terminal transmit data via Bluetooth, the multiple candidate sending object identifiers are device identifiers in the Bluetooth list of the first terminal.
[0047] The preset multiple candidate sending objects are the sending objects pre-saved by the user in the application, and specifically can be the communication objects in the communication list. The user can search by keywords or directly determine the target sending object identifier from the list.
[0048] In some embodiments, the user can select multiple target sending object identifiers at the same time. When there are multiple target sending object identifiers, the first terminal can send the target sending object identifiers to multiple second terminals at the same time. When multiple second terminals need to paste the content sent by the first terminal, the first terminal transmits the target content to multiple second terminals at the same time, and the transmission efficiency is high.
[0049] S130: In response to the user's data sending operation on the data to-be-sent area, encrypt the target data according to a preset encryption rule to obtain encrypted data.
[0050] In this embodiment, in order to improve the security of data transmission, the first terminal and the second terminal pre-agree on encryption and decryption rules. When the user triggers a data sending operation, the target data is not sent immediately, but is first encrypted to obtain encrypted data.
[0051] Furthermore, in order to save sending resources and increase sending speed, the present application also performs compression operation on the encrypted data, and the encrypted data subsequently sent is the compressed encrypted data.
[0052] S140: Send the encrypted data to a second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, it decrypts the encrypted data according to a preset decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal.
[0053] In this embodiment, after the first terminal automatically pre-processes the target data (encryption processing, or encryption processing and compression processing) based on the data sending operation triggered by the user, the first terminal sends the encrypted data to the second terminal corresponding to the target object identifier.
[0054] In some embodiments, corresponding to Figure 1 In the application environment, data is directly transmitted between the first terminal and the second terminal. At this time, the sending of the encrypted data to the second terminal corresponding to the target sending object identifier includes: sending the encrypted data to the second terminal corresponding to the target sending object identifier through Bluetooth transmission technology. When the second terminal receives the encrypted data, it automatically performs an encryption operation on the encrypted data according to a pre-stored decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal system.
[0055] In other embodiments, corresponding to Figure 2In the application environment, the first terminal and the second terminal are both installed with the target application, and the data to be sent area is the paste data sending area of the target application in the first terminal; wherein the target application provides a regular data sending area (the message display interface sent to the second terminal by default) and a paste data sending area (the message is sent to the second terminal by default without display and saved to the clipboard). Please refer to Figure 4 , the sending of the encrypted data to a second terminal corresponding to the target sending object identifier includes:
[0056] S1401: Generate target sending data according to the encrypted data, the paste identifier corresponding to the paste data sending area, and the target sending object identifier.
[0057] Specifically, the encrypted data, the pasting mark and the target sending object mark are combined into the target sending data according to a preset combination rule.
[0058] S1402: Send the target sending data to a target server corresponding to the target application, so that the target server sends the target sending data to the target application in the second terminal according to the target sending object identifier in the target sending data.
[0059] Specifically, when the first terminal sends encrypted data through the target application, the first terminal sends the target data to the target server of the application through the target application, and then the target server identifies the target object identifier in the target data and determines the target operating system of the second terminal corresponding to the target object identifier, and then the server sends the target data to the second terminal according to the transmission protocol and transmission technology corresponding to the target operating system.
[0060] In order to facilitate understanding of the data transmission method provided by the present application, a specific embodiment is used as an example below. In a data transmission scenario of different terminals of the same user, the first terminal is a mobile phone, and the second terminal is a computer. The target application is installed in both the mobile phone and the computer, and the same account is logged in to the two target applications. At this time, the user enters the target data (such as the target link) in the paste data sending area of the target application of the mobile phone, and then uses the current login account as the target sending object identifier (target account), and triggers the sending operation. The first terminal automatically encrypts the target link, and then the encrypted target link, target account and paste identifier form the target sending data, and the target sending data is sent to the corresponding target server. When the target server receives the target sent data, it obtains the target account in the target sent data, and determines whether there is a target application logged in by other terminals with the target account logged in. When it is determined that the target application on the second terminal has the target account logged in, the target sent data is sent to the target application of the second terminal. When the second terminal obtains the target sent data through the target application, the encrypted target link is decrypted according to a preset decryption rule, and the decrypted target link is saved to the clipboard of the second terminal. At this time, the user can directly open the browser on the second terminal and paste the target link on the clipboard to the browser without having to copy the target link through the second terminal, thereby improving the data pasting efficiency.
[0061] In addition to the above examples, the data transmission method provided in the present application can also be applied to data transmission scenarios of different users and different terminals. The present application does not limit the specific application scenarios.
[0062] To summarize, in the present application, before sending data to the second terminal, the first terminal will encrypt the data to be sent, thereby improving the security of the data during transmission. In addition, when the second terminal receives the encrypted data sent by the first terminal, it decrypts the encrypted data to obtain the target data, and then saves the target data directly to the clipboard of the second terminal. There is no need to display the target data (data to be pasted) and then copy it, which reduces the exposure rate of the data to be pasted and further improves the security of the data. The second terminal directly saves the target data to the clipboard, and the user can directly paste the data on the clipboard. There is no need to copy the data before pasting the data, which improves the efficiency of data pasting.
[0063] See also Figure 5 As shown, Figure 5 A flowchart of a data transmission method provided in an embodiment of the present application is provided. The execution subject of the embodiment is a second terminal, and the method includes the following steps:
[0064] S210. Acquire encrypted data sent by the first terminal, where the encrypted data is data obtained by the first terminal performing an encryption operation on target data according to a preset encryption rule, and the target data is data in a data to-be-sent area of the first terminal.
[0065] In this embodiment, when the first terminal sends encrypted data to the second terminal, the second terminal receives the encrypted data. The specific steps of obtaining the encrypted data by the first terminal are as follows: Figure 3 The corresponding steps in the corresponding embodiments are not described in detail here.
[0066] In some embodiments, the target application is installed in both the first terminal and the second terminal, the data to be sent area is the pasted data sending area of the target application in the first terminal, and the first terminal sends the target sending data to the second terminal, and the target sending data is composed of encrypted data, a pasting identifier corresponding to the pasted data sending area, and a target sending object identifier. At this time, obtaining the encrypted data sent by the first terminal includes:
[0067] The target sending data sent by the target server according to the target sending object identifier is received through the application interface of the target application, the target sending data is data generated by the first terminal according to the encrypted data, the paste identifier corresponding to the paste data sending area and the target sending object identifier and sent to the target server, the target sending object identifier is the object identifier corresponding to the target application in the second terminal, and the paste identifier is used to instruct the second terminal to save the target data to the clipboard; then the second terminal obtains the encrypted data from the target sending data.
[0068] S220. Decrypt the encrypted data according to a preset decryption rule to obtain the target data.
[0069] Specifically, in this embodiment, the decryption rule and the encryption rule in the first terminal and the second terminal are rules pre-agreed by the first terminal and the second terminal, or rules pre-agreed by the target application in the first terminal and the target application in the second terminal.
[0070] When the second terminal obtains the encrypted data, it will decrypt the encrypted data to obtain the target data. Specifically, in some embodiments, the above-mentioned decryption rules are preset in the application interface of the target application. When the encrypted data is obtained from the target sent data through the application interface, the second terminal will directly decrypt the encrypted data through the decryption rules in the application interface to obtain the target data, and store the target data in the interface cache corresponding to the application interface.
[0071] It can be seen that this embodiment stores the decrypted target data in the interface cache of the application interface, and does not need to be stored in the memory corresponding to the target application in the second terminal, which can save system storage resources of the second terminal.
[0072] In some embodiments, when the data received by the second terminal is compressed data, the second terminal will automatically decompress the data after receiving the data, and then extract the data to obtain encrypted data, and then further decrypt it.
[0073] S230, saving the target data to a clipboard.
[0074] In this embodiment, after obtaining the target data, the second terminal automatically saves the target data to the clipboard.
[0075] Specifically, in some embodiments, saving the target data to the clipboard includes: when it is detected that the target sent data carries the paste identifier, saving the target data in the interface cache to the clipboard through a hook component.
[0076] Among them, the hook component is used to monitor whether the data received in the application interface of the target application carries a paste mark. If it carries a paste mark, the target data obtained after decryption will be displayed and intercepted, and the target data will be copied from the interface cache and transferred to the system's clipboard.
[0077] If the hook component detects that the data received in the application interface does not carry the paste mark, the received data is not intercepted, and the data is displayed in the message receiving box of the target application in the second terminal.
[0078] It should be noted that the target data in this application is saved in the pasteboard of the system, so other applications in the second terminal can use the target data on the pasteboard. At this time, when the user opens the paste area (such as a data input box) of the current display interface of other applications in the second terminal, a paste instruction triggered by the user can be received; then, in response to the paste instruction, the target data on the pasteboard is pasted into the paste area of the current display interface of the second terminal.
[0079] To sum up, the second terminal in this embodiment saves the received target data directly to the clipboard of the second terminal. There is no need to display the target data (data to be pasted) and then copy it, which reduces the exposure rate of the data to be pasted and improves the security of the data. The second terminal directly saves the target data to the clipboard, and the user can directly paste the data on the clipboard. There is no need to copy the data before pasting the data, which improves the efficiency of data pasting.
[0080] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0081] In one embodiment, a first data transmission device is provided. The first data transmission device is connected to the above Figure 3 The data transmission methods in the corresponding embodiments correspond one to one. Figure 6 As shown, the first data transmission device includes a generating unit 101 , a determining unit 102 , an encrypting unit 103 and a sending unit 104 .
[0082] A generating unit 101, configured to generate target data in the data to be sent area in the first terminal in response to a user's target data generating operation for the data to be sent area;
[0083] The determining unit 102 is configured to determine a target sending object identifier from a plurality of preset candidate sending object identifiers in response to a sending object selection operation of the user for the data to be sent area;
[0084] The encryption unit 103 is used to perform an encryption operation on the target data according to a preset encryption rule in response to a data sending operation of the user on the data to be sent area to obtain encrypted data;
[0085] The sending unit 104 is used to send the encrypted data to the second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, it decrypts the encrypted data according to a preset decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal.
[0086] In some embodiments, the generating unit 101 is specifically configured to:
[0087] When the target data generating operation is a target data writing operation, writing the target data corresponding to the target data writing operation input by the user into the data to-be-sent area;
[0088] When the target data generation operation is a target data selection operation, local data corresponding to the target data selection operation is selected from the data selection entry of the data to be sent area as the target data, and the target data is written into the data to be sent area.
[0089] In some embodiments, the first terminal and the second terminal are both installed with a target application, and the data to be sent area is a pasted data sending area of the target application in the first terminal; the sending unit 104 is specifically used to:
[0090] Generate target sending data according to the encrypted data, the paste identifier corresponding to the paste data sending area and the target sending object identifier;
[0091] The target sending data is sent to a target server corresponding to the target application, so that the target server sends the target sending data to the target application in the second terminal according to the target sending object identifier in the target sending data.
[0092] In one embodiment, a second data transmission device is provided. The second data transmission device is Figure 5 The data transmission methods in the corresponding embodiments correspond one to one. Figure 7 As shown, the second data transmission device includes an acquisition unit 201 , a decryption unit 202 and a storage unit 203 .
[0093] An acquisition unit 201 is used to acquire encrypted data sent by a first terminal, wherein the encrypted data is data obtained by the first terminal performing an encryption operation on target data according to a preset encryption rule, and the target data is data in a data to-be-sent area of the first terminal;
[0094] A decryption unit 202, configured to perform a decryption operation on the encrypted data according to a preset decryption rule to obtain the target data;
[0095] The saving unit 203 is used to save the target data to a clipboard.
[0096] In some embodiments, the second data transmission device further includes:
[0097] A receiving unit, used for receiving a paste instruction triggered by a user;
[0098] A pasting unit is used to paste the target data on the paste board into a paste area of the current display interface of the second terminal in response to the paste instruction.
[0099] In some embodiments, the first terminal and the second terminal are both installed with a target application, and the data to be sent area is a pasted data sending area of the target application in the first terminal; the acquisition unit 201 is specifically used to:
[0100] receiving, through the application interface of the target application, target sending data sent by the target server according to the target sending object identifier, the target sending data being data generated by the first terminal and sent to the target server according to the encrypted data, the paste identifier corresponding to the paste data sending area, and the target sending object identifier, the target sending object identifier being the object identifier corresponding to the target application in the second terminal, and the paste identifier being used to instruct the second terminal to save the target data to the clipboard; obtaining the encrypted data from the target sending data;
[0101] The decryption unit 202 is specifically used for:
[0102] Perform a decryption operation on the encrypted data according to the decryption rule preset in the application interface to obtain the target data, and store the target data in the interface cache corresponding to the application interface;
[0103] The storage unit 203 is specifically used for:
[0104] When it is detected that the target sent data carries the paste identifier, the target data in the interface cache is saved to the pasteboard through the hook component.
[0105] The first data transmission device and the second data transmission device provided in the present application can improve data security and data pasting efficiency.
[0106] For the specific definition of the data transmission device, please refer to the definition of the data transmission method above, which will not be repeated here. Each module in the above-mentioned data transmission device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0107] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it implements the functions or steps of the client side of a data transmission method.
[0108] In one embodiment, a computer device is provided. The computer device is the first terminal or the second terminal in the above embodiment, and includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer device is the first terminal, the processor implements the following steps when executing the computer program:
[0109] In response to a user's operation of generating target data in the data to be sent area in the first terminal, generating target data in the data to be sent area;
[0110] In response to a user's selection operation of a sending target for the data to be sent area, determining a target sending target identifier from a plurality of preset candidate sending target identifiers;
[0111] In response to a data sending operation of a user on the data to-be-sent area, an encryption operation is performed on the target data according to a preset encryption rule to obtain encrypted data;
[0112] The encrypted data is sent to a second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, it decrypts the encrypted data according to a preset decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal.
[0113] When the computer device is a second terminal, the processor implements the following steps when executing the computer program:
[0114] Acquire encrypted data sent by the first terminal, the encrypted data being data obtained by the first terminal performing an encryption operation on target data according to a preset encryption rule, the target data being data in a data to-be-sent area of the first terminal;
[0115] Decrypting the encrypted data according to a preset decryption rule to obtain the target data;
[0116] The target data is saved to the clipboard.
[0117] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0118] In response to a user's operation of generating target data in the data to be sent area in the first terminal, generating target data in the data to be sent area;
[0119] In response to a user's selection operation of a sending target for the data to be sent area, determining a target sending target identifier from a plurality of preset candidate sending target identifiers;
[0120] In response to a data sending operation of a user on the data to-be-sent area, an encryption operation is performed on the target data according to a preset encryption rule to obtain encrypted data;
[0121] The encrypted data is sent to a second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, it decrypts the encrypted data according to a preset decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal.
[0122] or,
[0123] Acquire encrypted data sent by the first terminal, the encrypted data being data obtained by the first terminal performing an encryption operation on target data according to a preset encryption rule, the target data being data in a data to-be-sent area of the first terminal;
[0124] Decrypting the encrypted data according to a preset decryption rule to obtain the target data;
[0125] The target data is saved to the clipboard.
[0126] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0128] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0129] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data transmission method, characterized in that: The method is applied to a first terminal, and the method includes: In response to a user's operation of generating target data in the data to be sent area in the first terminal, generating target data in the data to be sent area; In response to a user's selection operation of a sending target for the data to be sent area, determining a target sending target identifier from a plurality of preset candidate sending target identifiers; In response to a data sending operation of a user on the data to-be-sent area, an encryption operation is performed on the target data according to a preset encryption rule to obtain encrypted data; The encrypted data is sent to a second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, it decrypts the encrypted data according to a preset decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal.
2. The method according to claim 1, characterized in that The step of generating target data in the data to be sent area in response to a user's target data generation operation on the data to be sent area in the first terminal comprises: When the target data generating operation is a target data writing operation, writing the target data input by the user and corresponding to the target data writing operation into the data to-be-sent area; When the target data generation operation is a target data selection operation, local data corresponding to the target data selection operation is selected from the data selection entry of the data to be sent area as the target data, and the target data is written into the data to be sent area.
3. The method according to claim 1 or 2, characterized in that: The first terminal and the second terminal are both installed with a target application, and the data waiting to be sent area is a pasted data sending area of the target application in the first terminal; The sending the encrypted data to the second terminal corresponding to the target sending object identifier includes: Generate target sending data according to the encrypted data, the pasting identifier corresponding to the pasting data sending area and the target sending object identifier; The target sending data is sent to a target server corresponding to the target application, so that the target server sends the target sending data to the target application in the second terminal according to the target sending object identifier in the target sending data.
4. A data transmission method, characterized in that: The method is applied to a second terminal, and the method includes: Acquire encrypted data sent by the first terminal, the encrypted data being data obtained by the first terminal performing an encryption operation on target data according to a preset encryption rule, the target data being data in a data to-be-sent area of the first terminal; Decrypting the encrypted data according to a preset decryption rule to obtain the target data; The target data is saved to the clipboard.
5. The method according to claim 4, characterized in that After the target data is saved on the clipboard, the method further includes: Receive the paste command triggered by the user; In response to the paste instruction, the target data on the pasteboard is pasted into a paste area of a current display interface of the second terminal.
6. The method according to claim 4 or 5, characterized in that: The first terminal and the second terminal are both installed with a target application, and the data waiting to be sent area is a pasted data sending area of the target application in the first terminal; The obtaining of encrypted data sent by the first terminal includes: receiving, through the application interface of the target application, target sending data sent by the target server according to the target sending object identifier, the target sending data being data generated by the first terminal according to the encrypted data, the paste identifier corresponding to the paste data sending area, and the target sending object identifier and sent to the target server, the target sending object identifier being the object identifier corresponding to the target application in the second terminal, and the paste identifier being used to instruct the second terminal to save the target data to the clipboard; Acquire the encrypted data from the target sent data; The decrypting operation is performed on the encrypted data according to a preset decryption rule to obtain the target data, including: Perform a decryption operation on the encrypted data according to the decryption rule preset in the application interface to obtain the target data, and store the target data in the interface cache corresponding to the application interface; The step of saving the target data to a clipboard includes: When it is detected that the target sent data carries the paste identifier, the target data in the interface cache is saved to the pasteboard through the hook component.
7. A first data transmission device, characterized in that: The first data transmission device is deployed in the first terminal, and the first data transmission device includes: A generating unit, configured to generate target data in the data to be sent area in the first terminal in response to a user's target data generating operation on the data to be sent area; a determination unit, configured to determine a target sending object identifier from a plurality of preset candidate sending object identifiers in response to a user's sending target selection operation for the data to be sent area; An encryption unit, configured to, in response to a user's data sending operation on the data to be sent area, perform an encryption operation on the target data according to a preset encryption rule to obtain encrypted data; A sending unit is used to send the encrypted data to a second terminal corresponding to the target sending object identifier, so that when the second terminal receives the encrypted data, it decrypts the encrypted data according to a preset decryption rule to obtain the target data, and saves the target data to the clipboard of the second terminal.
8. A second data transmission device, characterized in that: The second data transmission device is deployed in the second terminal, and the second data transmission device includes: An acquisition unit, configured to acquire encrypted data sent by the first terminal, wherein the encrypted data is data obtained by the first terminal performing an encryption operation on target data according to a preset encryption rule, and the target data is data in a data to-be-sent area of the first terminal; A decryption unit, used to perform a decryption operation on the encrypted data according to a preset decryption rule to obtain the target data; The saving unit is used to save the target data to a clipboard.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the data transmission method according to any one of claims 1 to 3 or 4 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 3 or 4 to 6 are implemented.
Citation Information
Patent Citations
Method for processing data of multiple terminals
CN106325771A
Copy and paste between devices
CN109644201A
Data interaction method, first terminal, second terminal and computer storage medium
CN110177169A
Data replication method, data pasting method, data processing method and data processing system
CN110209504A
Privacy protection method for clipboard data and electronic equipment
CN116414575A