WO2023212943A1 - Data interaction method and apparatus, electronic device, and storage medium - Google Patents

Data interaction method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2023212943A1
WO2023212943A1 PCT/CN2022/091265 CN2022091265W WO2023212943A1 WO 2023212943 A1 WO2023212943 A1 WO 2023212943A1 CN 2022091265 W CN2022091265 W CN 2022091265W WO 2023212943 A1 WO2023212943 A1 WO 2023212943A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
interaction
terminal device
encrypted
data packets
Prior art date
Application number
PCT/CN2022/091265
Other languages
French (fr)
Chinese (zh)
Inventor
赵增浩
郑凯文
Original Assignee
北京小米移动软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Priority to PCT/CN2022/091265 priority Critical patent/WO2023212943A1/en
Priority to CN202280004232.7A priority patent/CN116097621A/en
Publication of WO2023212943A1 publication Critical patent/WO2023212943A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Definitions

  • the present disclosure relates to the field of data interaction technology, and specifically relates to a data interaction method, device, electronic device and storage medium.
  • embodiments of the present disclosure provide a data interaction method, device, electronic device and storage medium to solve the defects in the related technology.
  • a data interaction method is provided, applied to a first terminal device, and the first terminal and a second terminal perform screen projection interaction.
  • the method includes:
  • it also includes:
  • the key data obtained in the interactive data include:
  • the key data in the interaction data is obtained.
  • determining interaction data according to interaction control instructions and obtaining the interaction data includes:
  • determining whether key data exists in the interaction data includes:
  • encrypting N first data packets among the M first data packets includes:
  • the first N first data packets among the M first data packets are encrypted.
  • it also includes:
  • the encryption ratio is determined based on the computing power of the first terminal device and the quality parameters of the data transmission link.
  • encrypting N first data packets among the M first data packets includes:
  • the encrypted identification, the encrypted information and the first data packet are encrypted to obtain an encrypted first data packet, wherein the encrypted identification is used by the second terminal device to determine the process from the plurality of first data packets. Encryption of the first packet processed.
  • it also includes:
  • non-critical data in the interaction data encapsulate the critical data into a plurality of second data packets, and send the plurality of second data packets to the second terminal device, so that the second terminal
  • the device parses and displays the non-critical data.
  • the interaction data includes video and/or audio.
  • a data interaction method is provided, applied to a second terminal device, including:
  • the encrypted information is sent to the first terminal device, so that the first terminal device continues to send the interaction data.
  • the method before decrypting the encrypted N first data packets to obtain encrypted information, the method further includes:
  • At least one first data packet with an encryption identifier among the M first data packets is determined as an encrypted first data packet.
  • the method further includes:
  • it also includes:
  • it also includes:
  • a data interaction device applied to a first terminal device, and the first terminal and a second terminal perform screen projection interaction.
  • the device includes:
  • the first acquisition module is used to acquire key data in the interactive data, and encapsulate the key data into M first data packets, where M is a natural number greater than 1;
  • An encryption module configured to encrypt N first data packets among the M first data packets, and send the M first data packets to the second terminal device in sequence, where N is greater than or equal to 1 , and less than M;
  • a verification module configured to receive encrypted information returned by the second terminal device within a preset time period, and determine whether to continue sending the interactive data according to the encrypted information, wherein the encrypted information is sent by the second terminal device Obtained by decrypting the encrypted first data packet.
  • a determining module is also included for:
  • the first acquisition module is specifically used for:
  • the key data in the interaction data is obtained.
  • the determination module is used to determine interaction data according to interaction control instructions, and when acquiring the interaction data, it is specifically used to:
  • the determination module is used to determine whether key data exists in the interaction data, specifically for:
  • the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
  • the first N first data packets among the M first data packets are encrypted.
  • a proportional module is also included for:
  • the encryption ratio is determined based on the computing power of the first terminal device and the quality parameters of the data transmission link.
  • the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
  • the encrypted identification, the encrypted information and the first data packet are encrypted to obtain an encrypted first data packet, wherein the encrypted identification is used by the second terminal device to determine the process from the plurality of first data packets. Encryption of the first packet processed.
  • a second acquisition module is also included, used for:
  • non-critical data in the interaction data encapsulate the critical data into a plurality of second data packets, and send the plurality of second data packets to the second terminal device, so that the second terminal
  • the device parses and displays the non-critical data.
  • the interaction data includes video and/or audio.
  • a data interaction device is provided, applied to a second terminal device, including:
  • a receiving module configured to receive M first data packets sent by the first terminal device, wherein the M first data packets are obtained by the first terminal device encapsulating key data in the interaction data, and the M first data packets are obtained by encapsulating key data in the interactive data.
  • N first data packets among the first data packets have been encrypted by the first terminal device, M is a natural number greater than 1, N is greater than or equal to 1, and less than M;
  • a decryption module used to decrypt the encrypted N first data packets to obtain encrypted information
  • a sending module configured to send the encrypted information to the first terminal device, so that the first terminal device continues to send the interactive data.
  • an identification module is also included for:
  • the first data packet with an encryption identifier among the M first data packets is determined to be the encrypted first data packet.
  • a first display module is also included for:
  • a first display module is also included for:
  • a control module is also included for:
  • an electronic device includes a memory and a processor.
  • the memory is used to store computer instructions executable on the processor.
  • the processor is used to execute the The computer instructions are based on the data interaction method described in the first aspect.
  • a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.
  • This disclosure obtains the key data in the interaction data and encapsulates the key data into M first data packets. Then, the N first data packets among the M first data packets can be encrypted and sent in sequence. The M first data packets are sent to the second terminal device, and finally the encrypted information returned by the second terminal device is received, and whether to continue sending the interactive data is determined according to the encrypted information, wherein the encrypted information is provided by the third terminal device. The second terminal device decrypts the encrypted first data packet to obtain the encrypted data packet.
  • the second terminal device can be encrypted according to whether the second terminal device Encrypted information that can pass verification is returned to determine whether the second terminal device has successfully decrypted the encrypted first data packet, and then can determine whether the data sent to the second terminal device is safe, and stop sending interactions if it is unsafe. data, thereby avoiding data leakage and ensuring data security.
  • Figure 1 is a flow chart of a data interaction method applied to a first terminal device according to an exemplary embodiment of the present disclosure
  • Figure 2 is a schematic diagram of the interaction process between a first terminal device and a second terminal device according to an exemplary embodiment of the present disclosure
  • Figure 3 is a schematic diagram of the encapsulation process of key data according to an exemplary embodiment of the present disclosure
  • Figure 4 is a schematic diagram of the encryption process of key data according to an exemplary embodiment of the present disclosure
  • Figure 5 is a schematic diagram of an encryption method of key data according to an exemplary embodiment of the present disclosure
  • Figure 6 is a flow chart of a data interaction method applied to a second terminal device according to an exemplary embodiment of the present disclosure
  • Figure 7 is a processing flow of the second terminal device after receiving interactive data according to an exemplary embodiment of the present disclosure
  • Figure 8 is a schematic structural diagram of a data interaction device applied to a first terminal device according to an exemplary embodiment of the present disclosure
  • Figure 9 is a schematic structural diagram of a data interaction device applied to a second terminal device according to an exemplary embodiment of the present disclosure.
  • FIG. 10 is a structural block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
  • first, second, third, etc. may be used in this disclosure to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other.
  • first information may also be called second information, and similarly, the second information may also be called first information.
  • word “if” as used herein may be interpreted as "when” or “when” or “in response to determining.”
  • one terminal device saves its video, audio and other data into multi-frame data through screen recording, audio recording, etc., and then transmits it to another terminal device through wired connection or wireless connection, and the other terminal device Then you can parse the multi-frame data to obtain the original video, audio and other data, and then perform display operations such as display or playback.
  • the data may be intercepted by malicious applications, that is, the security of data interaction is poor. If the data contains the user's call data, contacts, account passwords, etc., It may lead to the leakage of this information and seriously affect the security of users' personal information.
  • one terminal device encrypts the data before transmitting the data, and the other terminal device decrypts the data after receiving the data.
  • the above-mentioned encryption and decryption process will not only reduce the efficiency of data interaction, but also increase the computing load of the terminal device. Taking the screen-casting connection scenario as an example, the above-mentioned encryption and encryption processes will greatly reduce the efficiency of video and audio transmission, causing problems such as stuck or blurred video images, and audio stuck or distortion.
  • the malicious application that intercepts the interactive data has the decryption capability, it will continue to obtain and decrypt the interactive data, causing the continuous leakage of important information and having a greater impact on data security.
  • At least one embodiment of the present disclosure provides a data interaction method. Please refer to FIG. 1 , which shows the flow of the method, including step S101 and step S103.
  • the first terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA) handheld device, a computing device, a wearable device, etc.
  • the first terminal device can be the data source in a data interaction scenario, that is, the side that sends data outward. For example, in a scenario where a smartphone projects a screen to a TV, the smartphone is the data source and the TV is the data destination.
  • terminal A as the first terminal device has application C for data interaction.
  • Application C can communicate and connect with other application programs such as application 1, application 2, application 3, etc., thereby obtaining information from other application programs.
  • Interactive data such as audio data, video data, etc. are encapsulated and sent to Terminal B as the second terminal device.
  • Terminal B is the data end point of data interaction. It can receive the data sent by Application C and process the received data.
  • the data is decapsulated, and at the same time, the application of terminal A can be counter-controlled, that is, control instructions are sent to application C, and then application C sends these control instructions to the corresponding application.
  • These other applications may be music applications, video applications, navigation applications, social applications, etc.
  • step S101 key data in the interaction data is obtained, and the key data is encapsulated into M first data packets, where M is a natural number greater than 1.
  • the interaction data is data targeted by data interaction, that is, data sent by the first terminal device to the second terminal device.
  • the interactive data is video, audio and other data.
  • Key data can be data related to user privacy or account security.
  • the first terminal device can determine the interaction data and the application program to which the interaction data belongs according to the interaction control instruction, and obtain the interaction data from the application program to which the interaction data belongs, wherein the interaction control instruction is based on Generated by a user's operation on the first terminal device or the second terminal device.
  • the interaction control instruction is based on Generated by a user's operation on the first terminal device or the second terminal device.
  • the default screen can be the current screen of the first terminal device, the desktop, or the dedicated initial screen of the screen projection program; next, the user can operate the first terminal device, and the first terminal device generates an interactive control instruction based on the operation, or The second terminal device operates on the above-mentioned default screen displayed on the second terminal device.
  • the second terminal device generates an interactive control instruction based on the operation and sends the interactive control instruction to the first terminal device.
  • the first terminal device sends a request to the corresponding application according to the interactive control instruction.
  • the program obtains picture, audio and other data. For example, if the interactive control instruction is to start an application on the desktop, then the first terminal device starts the application and obtains the initial interface after the application is started as the interaction data.
  • the first terminal device can determine whether there is key data in the interaction data in the following manner: first, determine whether there is data belonging to the preset key data list in the interaction data. For example, first A preset key data list is preset in the terminal device; next, if there is data belonging to the preset key data list in the interaction data, it is determined that key data exists in the interaction data, and the interaction data is determined , the data belonging to the preset key data list is key data; when there is no data in the preset key data list in the interaction data, it is determined that there is no key data in the interaction data.
  • this step can be performed, that is, obtaining the key data in the interaction data. Due to the influence of the bandwidth of the transmission channel, the key data cannot be directly transmitted to the second terminal device. Therefore, the key data can be encapsulated into M first data packets with reference to Figure 3.
  • non-critical data in the interactive data can also be obtained, the critical data can be encapsulated into a plurality of second data packets, and the plurality of second data packets can be sent to the second terminal device, so that all The second terminal device parses and displays the non-critical data.
  • the interaction data may be encapsulated into a plurality of third data packets, and the plurality of third data packets may be sent to the second terminal device, so that the The second terminal device parses and displays the interaction data.
  • step S102 N first data packets among the M first data packets are encrypted, and the M first data packets are sent to the second terminal device in sequence, where N is greater than or equal to 1, and Less than M.
  • the first data packet to be encrypted may be part of the M first data packets.
  • the encryption ratio K can be determined first based on the computing power p of the first terminal device and the quality parameter q of the data transmission link.
  • the computing power p of the first terminal device can be used to characterize the first terminal device.
  • the encryption speed, the quality parameter q of the data transmission link can be used to characterize the packet loss rate. If the packet loss rate is too high, the first encrypted data packet may be lost, which will make the encryption meaningless. Take the screen projection scenario as an example. , the packet loss rate is extremely low, and the value of q is between 0.98-1.
  • N M*K
  • the first N first data packets among the plurality of first data packets are encrypted.
  • the first three first data packets are encrypted. It can be understood that Figure 4 is only an example, and the general encryption ratio K is between 20% and 30%.
  • the first data packet can be encrypted as shown in Figure 5: the encryption identifier F, the encryption information I and the first data packet are encrypted to obtain the encrypted first data. package, wherein the encryption identifier F is used by the second terminal device to determine the encrypted first data packet from the plurality of first data packets.
  • the first terminal device will continuously obtain the interaction data according to the interaction control instructions, and determine whether there is key data in the interaction data. If there is key data, the key data will be encapsulated into multiple Part or all of the first data packet is encrypted and sent to the second terminal device, and the multiple second data packets obtained by encapsulating non-critical data are directly sent to the second terminal device. If there is no critical data, the interaction is directly The plurality of third data packets obtained after data encapsulation are sent to the second terminal device. The order of processing and sending the above interactive data can be determined according to the order in which the interactive data is obtained.
  • step S103 the encrypted information returned by the second terminal device is received, and whether to continue sending the interactive data is determined according to the encrypted information, wherein the encrypted information is used by the second terminal device to encrypt the encrypted information.
  • the first data packet is decrypted and obtained.
  • the second terminal device continues to receive the interaction data sent by the first terminal device in the form of data packets during the data interaction process, and then processes the received interaction data in sequence, that is, processes the received data packets in sequence.
  • the plurality of second data packets After receiving a plurality of second data packets sent by the first terminal device, the plurality of second data packets can be parsed in sequence according to the order of reception, to obtain the non-critical data, and display the non-critical data according to the method to display the non-critical data. For example, if the non-key data is a picture, the image can be displayed; if the non-key data is a video, the video can be played.
  • the plurality of third data packets may be parsed and processed in sequence according to the reception order to obtain the interactive data, and according to the display method of the interactive data, Display the interactive data. For example, if the interactive data is a picture, the image can be displayed; if the interactive data is a video, the video can be played.
  • the first data packet with an encryption identifier among the plurality of first data packets may first be determined as the encrypted first data packet, and then the first data packet may be The N first data packets that have been encrypted are decrypted to obtain the encrypted information and the decrypted first data packets, and then the multiple first data packets are parsed in sequence according to the order of reception to obtain the key data, and display the key data according to the display method of the key data. For example, if the key data is a picture, the image can be displayed; if the key data is a video, the video can be played; at the same time, Send the encrypted information to the first terminal device.
  • the first terminal device receives the encrypted information returned by the second terminal device within the preset time period, and the encrypted information passes the verification, it will continue to send the interactive data, that is, continue to send the existence key in the form of data packets.
  • Key data and non-key data in the interactive data of the data as well as interactive data without critical data; otherwise (that is, the first terminal device does not receive the encrypted information returned by the second terminal device within the preset time period, or the first terminal device does not receive the encrypted information returned by the second terminal device within the preset time period, or the When a terminal device receives the encrypted information returned by the second terminal device within a preset time period, but the encrypted information fails to pass verification), it stops sending interactive data, that is, it stops sending key interactive data in which critical data exists. Data and non-critical data, as well as interactive data without critical data. For example, in a screencasting scenario, you can stop screencasting and disconnect the screencasting connection with the second terminal device.
  • the first terminal device does not receive the encrypted information returned by the second terminal device within the preset time period, or the first terminal device receives the encrypted information returned by the second terminal device within the preset time period. If the device returns encrypted information, but the encrypted information fails to pass verification, it can also generate prompt information, such as text prompt information displayed on the display, or audio prompt information played by the speaker.
  • This disclosure obtains the key data in the interactive data and encapsulates the key data into M first data packets. Then, the N first data packets among the M first data packets can be encrypted and sent in sequence. The M first data packets are sent to the second terminal device, and finally the encrypted information returned by the second terminal device is received, and whether to continue sending the interactive data is determined according to the encrypted information, wherein the encrypted information is provided by the third terminal device. The second terminal device decrypts the encrypted first data packet to obtain the encrypted data packet.
  • the second terminal device can be encrypted according to whether the second terminal device Encrypted information that can pass verification is returned to determine whether the second terminal device has successfully decrypted the encrypted first data packet, and then can determine whether the data sent to the second terminal device is safe, and stop sending interactions if it is unsafe. data, thereby avoiding data leakage and ensuring data security.
  • some of the encapsulated first data packets are encrypted, thereby reducing the computational load of the encryption process of the first terminal device and the computational load of the decryption process of the second terminal device, thereby avoiding the occurrence of Problems with lags and interruptions.
  • the present disclosure further controls the subsequent data interaction of the first terminal device based on the decryption of the encrypted first data packet by the second terminal device, that is, when the second terminal device successfully decrypts the encrypted first data packet. Continue data interaction, and stop data interaction if the second terminal device fails to decrypt the encrypted first data packet, thereby avoiding the possibility that a malicious application in the second terminal device cannot decrypt the encrypted first data.
  • the present disclosure encrypts the first N first data packets among multiple first data packets, which can prevent subsequent unencrypted data packets from being intercepted when there is a malicious application intercepting data, thus ensuring data security to the greatest extent. .
  • At least one embodiment of the present disclosure provides a data interaction method. Please refer to FIG. 6 , which shows the flow of the method, including step S601 and step S503.
  • the method can be applied to the second terminal device.
  • the second terminal device may be a television, a vehicle-mounted terminal, etc.
  • the second terminal device can be the data destination in a data interaction scenario, that is, the side that receives data. For example, in a scenario where a smartphone projects a screen to a TV, the smartphone is the data source and the TV is the data destination.
  • step S601 M first data packets sent by the first terminal device are received, wherein the plurality of first data packets are obtained by the first terminal device encapsulating key data in the interactive data, and the M N first data packets among the first data packets have been encrypted by the first terminal device.
  • M is a natural number greater than 1, and N is greater than or equal to 1 and less than M.
  • step S602 the N first data packets that have been encrypted are decrypted to obtain encrypted information.
  • the first data packet with the encryption identifier among the M first data packets may be determined as the encrypted first data packet.
  • the encrypted first data packet may be decrypted. After decryption, not only the decrypted first data packet is obtained, but also the encrypted information added by the first terminal device during the decryption process is obtained.
  • the M first data packets can be parsed in sequence according to the receiving order to obtain the key data, and according to the key data Display method to display the key data. For example, if the non-key data is a picture, the image can be displayed; if the non-key data is a video, the video can be played.
  • step S603 the encrypted information is sent to the first terminal device, so that the first terminal device continues to send the interaction data.
  • the second terminal device may also receive a plurality of second data packets sent by the first terminal device, wherein the plurality of second data packets are obtained by the first terminal device encapsulating non-critical data in the interactive data. ; and sequentially parse and process the plurality of second data packets according to the order of reception to obtain the non-critical data; and display the non-critical data according to the display method of the non-critical data. For example, if the non-key data is a picture, the image can be displayed; if the non-key data is a video, the video can be played.
  • the second terminal device may also receive a plurality of third data packets sent by the first terminal device, wherein the plurality of third data packets are obtained by the first terminal device encapsulating interactive data without critical data. ; and sequentially parse and process the plurality of third data packets according to the order of reception to obtain the interactive data; and display the interactive data according to the display method of the interactive data. For example, if the non-key data is a picture, the image can be displayed; if the non-key data is a video, the video can be played.
  • FIG. 7 shows the processing flow of terminal B as the second terminal device after receiving interactive data.
  • terminal B After receiving the data, terminal B first determines whether decryption is required; if decryption is not required, that is, the data is non-critical data in the interactive data where critical data exists, or interactive data where critical data does not exist, the data will be parsed and displayed; if necessary To decrypt, the data is encrypted, and the decrypted data is parsed and displayed. At the same time, the encrypted information I is obtained during the decryption process, and then the encrypted information I is sent to terminal A as the first terminal device. Terminal A determines whether the information I is correct. , if it is correct (that is, it passes the verification), it will continue to send the data, if it is incorrect (that is, it does not pass the verification), it will stop sending the data.
  • the user can operate on the display result of the interactive data, such as operating the screen projection interface displayed by the second terminal device; the second terminal device can then operate on the display result of the interactive data based on the user's display of the interactive data.
  • the operation of displaying the results generates an interaction control instruction, and sends the interaction control instruction to the first terminal device, so that the terminal device continues to return the interaction data.
  • the first terminal device continuously obtains interaction data according to the interaction control instructions (the interaction control instructions are generated based on the user's operation of the first terminal device or the second terminal device), and
  • the interactive data is encapsulated and sent to the second terminal device.
  • the second terminal device decapsulates the data and then displays it, such as displaying pictures and playing audio and video.
  • key data in the above interactive data.
  • the key data involves user privacy or account information, so it needs to be encrypted for protection. Therefore, after the key data is encapsulated, parts of the multiple first data packets obtained are encrypted and then sent.
  • the second terminal device receives the encrypted first data packet and needs to first decrypt it, then decapsulate it, and then display it.
  • the encrypted first data packet in the key data also serves as a security verification method during the data interaction process. That is, the first data packet adds encrypted information during the encryption process, and the second terminal device will obtain the encrypted information after decryption. information and returns the encrypted information to the first terminal device. Therefore, if the first terminal device receives the correct encrypted information, it means that the current interaction process is safe and data interaction can continue. If the first terminal device does not receive the correct encrypted information, then Indicates that the current interaction process is unsafe and data interaction can be stopped.
  • a data interaction device which is applied to a first terminal device.
  • the first terminal and the second terminal perform screen projection interaction.
  • the device includes:
  • the first acquisition module 801 is used to acquire key data in the interaction data, and encapsulate the key data into M first data packets, where M is a natural number greater than 1;
  • the encryption module 802 is used to encrypt N first data packets among the M first data packets, and send the M first data packets to the second terminal device in sequence, where N is greater than or equal to 1, And less than M;
  • Verification module 803 configured to receive the encrypted information returned by the second terminal device, and determine whether to continue sending the interactive data according to the encrypted information, wherein the encrypted information is encrypted by the second terminal device.
  • the first data packet is decrypted and obtained.
  • a determining module is further included for:
  • the first acquisition module is specifically used for:
  • the key data in the interaction data is obtained.
  • the determination module is used to determine interaction data according to interaction control instructions, and when acquiring the interaction data, it is specifically used to:
  • the determination module is used to determine whether key data exists in the interaction data, specifically for:
  • the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
  • the first N first data packets among the plurality of first data packets are encrypted.
  • a proportional module is also included for:
  • the encryption ratio is determined based on the computing power of the first terminal device and the quality parameters of the data transmission link.
  • the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
  • the encrypted identification, the encrypted information and the first data packet are encrypted to obtain an encrypted first data packet, wherein the encrypted identification is used by the second terminal device to determine the process from the plurality of first data packets. Encryption of the first packet processed.
  • a second acquisition module is also included, used for:
  • non-critical data in the interaction data encapsulate the critical data into a plurality of second data packets, and send the plurality of second data packets to the second terminal device, so that the second terminal
  • the device parses and displays the non-critical data.
  • the interaction data includes video and/or audio.
  • a data interaction device is provided, which is applied to a second terminal device. Please refer to FIG. 9.
  • the device includes:
  • the receiving module 901 is configured to receive M first data packets sent by the first terminal device, wherein the M first data packets are obtained by the first terminal device encapsulating key data in the interaction data, and the N first data packets among the M first data packets have been encrypted by the first terminal device, M is a natural number greater than 1, N is greater than or equal to 1, and less than M;
  • the decryption module 902 is used to decrypt the encrypted N first data packets to obtain encrypted information
  • the sending module 903 is configured to send the encrypted information to the first terminal device, so that the first terminal device continues to send the interactive data.
  • an identification module is also included for:
  • the first data packet with an encryption identifier among the M first data packets is determined to be the encrypted first data packet.
  • a first display module is also included, used for:
  • a first display module is also included, used for:
  • control module is also included for:
  • the device 1000 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.
  • the device 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power supply component 1006, a multimedia component 1008, an audio component 1010, an input/output (I/O) interface 1012, a sensor component 1014, and communications component 1016.
  • Processing component 1002 generally controls the overall operations of device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations.
  • the processing element 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above method.
  • processing component 1002 may include one or more modules that facilitate interaction between processing component 1002 and other components.
  • processing component 1002 may include a multimedia module to facilitate interaction between multimedia component 1008 and processing component 1002.
  • Memory 1004 is configured to store various types of data to support operations at device 1000 . Examples of such data include instructions for any application or method operating on device 1000, contact data, phonebook data, messages, pictures, videos, etc.
  • Memory 1004 may be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EEPROM), Programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EEPROM erasable programmable read-only memory
  • EPROM Programmable read-only memory
  • PROM programmable read-only memory
  • ROM read-only memory
  • magnetic memory flash memory, magnetic or optical disk.
  • Power component 1006 provides power to various components of device 1000.
  • Power components 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 1000 .
  • Multimedia component 1008 includes a screen that provides an output interface between the device 1000 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may not only sense the boundary of the touch or sliding operation, but also detect the duration and pressure associated with the touch or sliding operation.
  • multimedia component 1008 includes a front-facing camera and/or a rear-facing camera. When the device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data.
  • Each front-facing camera and rear-facing camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
  • Audio component 1010 is configured to output and/or input audio signals.
  • audio component 1010 includes a microphone (MIC) configured to receive external audio signals when device 1000 is in operating modes, such as call mode, recording mode, and speech recognition mode. The received audio signals may be further stored in memory 1004 or sent via communications component 1016 .
  • audio component 1010 also includes a speaker for outputting audio signals.
  • the I/O interface 1012 provides an interface between the processing component 1002 and a peripheral interface module.
  • the peripheral interface module may be a keyboard, a click wheel, a button, etc. These buttons may include, but are not limited to: Home button, Volume buttons, Start button, and Lock button.
  • Sensor component 1014 includes one or more sensors for providing various aspects of status assessment for device 1000 .
  • the sensor component 1014 can detect the open/closed state of the device 1000, the relative positioning of components, such as the display and keypad of the device 1000, and the sensor component 1014 can also detect a change in position of the device 1000 or a component of the device 1000. , the presence or absence of user contact with the device 1000 , device 1000 orientation or acceleration/deceleration and temperature changes of the device 1000 .
  • Sensor assembly 1014 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • Sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • Communication component 1016 is configured to facilitate wired or wireless communication between apparatus 1000 and other devices.
  • the device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G, or a combination thereof.
  • the communication component 1016 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communications.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • apparatus 1000 may be configured by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable Gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are implemented for executing the power supply method of the above electronic device.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable Gate array
  • controller microcontroller, microprocessor or other electronic components are implemented for executing the power supply method of the above electronic device.
  • the present disclosure also provides a non-transitory computer-readable storage medium including instructions, such as a memory 1004 including instructions, which can be executed by the processor 1020 of the device 1000 to complete the above.
  • a non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present disclosure relates to a data interaction method and apparatus, an electronic device, and a storage medium. The method is applied to a first terminal device, and the first terminal performs screen mirroring interaction with a second terminal. The method comprises: acquiring key data in interaction data, and packaging the key data into M first data packets, wherein M is a natural number greater than 1; encrypting N first data packets in the M first data packets, and sequentially sending the M first data packets to the second terminal device, wherein N is greater than or equal to 1 and less than M; and receiving encryption information returned by the second terminal device, and determining, according to the encryption information, whether to continue to send the interaction data, wherein the encryption information is obtained by decrypting the encrypted first data packets by the second terminal device.

Description

数据交互方法、装置、电子设备和存储介质Data interaction methods, devices, electronic devices and storage media 技术领域Technical field
本公开涉及数据交互技术领域,具体涉及一种数据交互方法、装置、电子设备和存储介质。The present disclosure relates to the field of data interaction technology, and specifically relates to a data interaction method, device, electronic device and storage medium.
背景技术Background technique
近年来,不同终端设备之间的数据交互形式越来越多,例如投屏连接等。投屏连接的场景下,一个终端设备将其视频、音频等数据通过录屏、录音等方式保存成多帧数据,再通过有线连接或无线连接的方式传输到另一个终端设备,另一个终端设备则可以对多帧数据进行解析后得到原视频、音频等数据,进而对其进行显示或播放等展示操作。在两个终端设备之间持续传输大量数据的过程中,数据存在被恶意应用截取的可能,即数据交互的安全性较差。In recent years, there have been more and more forms of data interaction between different terminal devices, such as screen projection connections. In the scenario of screen casting connection, one terminal device saves its video, audio and other data into multi-frame data through screen recording, audio recording, etc., and then transmits it to another terminal device through wired connection or wireless connection, and the other terminal device Then you can parse the multi-frame data to obtain the original video, audio and other data, and then perform display operations such as display or playback. During the continuous transmission of large amounts of data between two terminal devices, there is a possibility that the data may be intercepted by malicious applications, which means that the security of data interaction is poor.
发明内容Contents of the invention
为克服相关技术中存在的问题,本公开实施例提供一种数据交互方法、装置、电子设备和存储介质,用以解决相关技术中的缺陷。In order to overcome the problems existing in the related technology, embodiments of the present disclosure provide a data interaction method, device, electronic device and storage medium to solve the defects in the related technology.
根据本公开实施例的第一方面,提供一种数据交互方法,应用于第一终端设备,所述第一终端与第二终端进行投屏交互,所述方法包括:According to a first aspect of an embodiment of the present disclosure, a data interaction method is provided, applied to a first terminal device, and the first terminal and a second terminal perform screen projection interaction. The method includes:
获取交互数据中的关键数据,并将所述关键数据封装为M个第一数据包,其中,M为大于1的自然数;Obtain key data in the interactive data, and encapsulate the key data into M first data packets, where M is a natural number greater than 1;
将所述M个第一数据包中N个第一数据包进行加密处理,并依次发送所述M个第一数据包至第二终端设备,其中,N大于等于1,且小于M;Encrypt N first data packets among the M first data packets, and send the M first data packets to the second terminal device in sequence, where N is greater than or equal to 1 and less than M;
接收到所述第二终端设备返回的加密信息,根据所述加密信息确定是否继续发送所述交互数据,其中,所述加密信息由所述第二终端设备对经过加 密处理的第一数据包进行解密得到。Receive the encrypted information returned by the second terminal device, and determine whether to continue sending the interactive data according to the encrypted information, wherein the encrypted information is performed by the second terminal device on the encrypted first data packet. Decrypted.
在一个实施例中,还包括:In one embodiment, it also includes:
根据交互控制指令确定交互数据,并获取所述交互数据,以及确定所述交互数据中是否存在关键数据,其中,所述交互控制指令基于用户对所述第一终端设备或所述第二终端设备的操作生成;Determine interaction data according to the interaction control instructions, obtain the interaction data, and determine whether key data exists in the interaction data, wherein the interaction control instructions are based on the user's control of the first terminal device or the second terminal device. The operation generates;
所述获取交互数据中的关键数据,包括:The key data obtained in the interactive data include:
响应于所述交互数据中存在关键数据,获取所述交互数据中的关键数据。In response to the existence of key data in the interaction data, the key data in the interaction data is obtained.
在一个实施例中,所述根据交互控制指令确定交互数据,并获取所述交互数据,包括:In one embodiment, determining interaction data according to interaction control instructions and obtaining the interaction data includes:
根据交互控制指令确定交互数据,以及所述交互数据所属的应用程序;Determine the interaction data according to the interaction control instructions, and the application program to which the interaction data belongs;
向所述交互数据所属的应用程序获取所述交互数据。Obtain the interaction data from the application program to which the interaction data belongs.
在一个实施例中,所述确定所述交互数据中是否存在关键数据,包括:In one embodiment, determining whether key data exists in the interaction data includes:
确定所述交互数据中是否存在属于预设关键数据列表的数据;Determine whether there is data belonging to a preset key data list in the interactive data;
响应于所述交互数据中存在属于预设关键数据列表的数据,确定所述交互数据中存在关键数据,并确定所述交互数据中,属于所述预设关键数据列表的数据为关键数据;In response to the presence of data belonging to the preset key data list in the interaction data, determining that key data exists in the interaction data, and determining that the data belonging to the preset key data list in the interaction data is the key data;
响应于所述交互数据中不存在预设关键数据列表中的数据,确定所述交互数据中不存在关键数据。In response to the fact that the data in the preset key data list does not exist in the interaction data, it is determined that the key data does not exist in the interaction data.
在一个实施例中,所述将所述M个第一数据包中N个第一数据包进行加密处理,包括:In one embodiment, encrypting N first data packets among the M first data packets includes:
根据所述M和加密比例,确定N;According to the M and encryption ratio, determine N;
将所述M个第一数据包中的前N个第一数据包进行加密处理。The first N first data packets among the M first data packets are encrypted.
在一个实施例中,还包括:In one embodiment, it also includes:
根据所述第一终端设备的计算力和数据传输链路的质量参数,确定所述加密比例。The encryption ratio is determined based on the computing power of the first terminal device and the quality parameters of the data transmission link.
在一个实施例中,所述将所述M个第一数据包中N个第一数据包进行加密处理,包括:In one embodiment, encrypting N first data packets among the M first data packets includes:
将加密标识、所述加密信息和第一数据包进行加密处理,得到加密后的第一数据包,其中,所述加密标识用于第二终端设备从所述多个第一数据包中确定经过加密处理的第一数据包。The encrypted identification, the encrypted information and the first data packet are encrypted to obtain an encrypted first data packet, wherein the encrypted identification is used by the second terminal device to determine the process from the plurality of first data packets. Encryption of the first packet processed.
在一个实施例中,还包括:In one embodiment, it also includes:
获取所述交互数据中的非关键数据,并将关键数据封装为多个第二数据包,以及将所述多个第二数据包发送至所述第二终端设备,以使所述第二终端设备解析并展示所述非关键数据。Obtain non-critical data in the interaction data, encapsulate the critical data into a plurality of second data packets, and send the plurality of second data packets to the second terminal device, so that the second terminal The device parses and displays the non-critical data.
在一个实施例中,所述交互数据包括视频和/或音频。In one embodiment, the interaction data includes video and/or audio.
根据本公开实施例的第二方面,提供一种数据交互方法,应用于第二终端设备,包括:According to a second aspect of the embodiment of the present disclosure, a data interaction method is provided, applied to a second terminal device, including:
接收第一终端设备发送的M个第一数据包,其中,所述M个第一数据包由所述第一终端设备对交互数据中的关键数据进行封装得到,所述M个第一数据包中的N个第一数据包经过所述第一终端设备的加密处理,M为大于1的自然数,N大于等于1,且小于M;Receive M first data packets sent by the first terminal device, wherein the M first data packets are obtained by the first terminal device encapsulating key data in the interaction data, and the M first data packets The N first data packets in have been encrypted by the first terminal device, M is a natural number greater than 1, N is greater than or equal to 1, and less than M;
对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息;Decrypt the encrypted N first data packets to obtain encrypted information;
将所述加密信息发送至所述第一终端设备,以使所述第一终端设备继续发送所述交互数据。The encrypted information is sent to the first terminal device, so that the first terminal device continues to send the interaction data.
在一个实施例中,在所述对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息之前,还包括:In one embodiment, before decrypting the encrypted N first data packets to obtain encrypted information, the method further includes:
将所述M个第一数据包中具有加密标识的至少一个第一数据包,确定为经过加密处理的第一数据包。At least one first data packet with an encryption identifier among the M first data packets is determined as an encrypted first data packet.
在一个实施例中,对经过加密处理的所述N个第一数据包进行解密处理之后,还包括:In one embodiment, after decrypting the encrypted N first data packets, the method further includes:
按照接收顺序依次对所述M个第一数据包进行解析处理,得到所述关键数据;Analyze and process the M first data packets in sequence according to the order of reception to obtain the key data;
按照所述关键数据的展示方式,对所述关键数据进行展示。Display the key data according to the display method of the key data.
在一个实施例中,还包括:In one embodiment, it also includes:
接收第一终端设备发送的多个第二数据包,其中,所述多个第二数据包由所述第一终端设备对交互数据中的非关键数据进行封装得到;Receive a plurality of second data packets sent by the first terminal device, wherein the plurality of second data packets are obtained by the first terminal device encapsulating non-critical data in the interactive data;
按照接收顺序依次对所述多个第二数据包进行解析处理,得到所述非关键数据;Sequentially parse the plurality of second data packets according to the order of reception to obtain the non-critical data;
按照所述非关键数据的展示方式,对所述非关键数据进行展示。Display the non-key data according to the display method of the non-key data.
在一个实施例中,还包括:In one embodiment, it also includes:
基于用户对所述交互数据的展示结果的操作,生成交互控制指令;Generate interactive control instructions based on the user's operation on the display result of the interactive data;
将所述交互控制指令发送至所述第一终端设备,以使所述终端设备继续返回所述交互数据。Send the interaction control instruction to the first terminal device, so that the terminal device continues to return the interaction data.
根据本公开实施例的第三方面,提供一种数据交互装置,应用于第一终端设备,所述第一终端与第二终端进行投屏交互,所述装置包括:According to a third aspect of the embodiment of the present disclosure, a data interaction device is provided, applied to a first terminal device, and the first terminal and a second terminal perform screen projection interaction. The device includes:
第一获取模块,用于获取交互数据中的关键数据,并将所述关键数据封装为M个第一数据包,其中,M为大于1的自然数;The first acquisition module is used to acquire key data in the interactive data, and encapsulate the key data into M first data packets, where M is a natural number greater than 1;
加密模块,用于将所述M个第一数据包中N个第一数据包进行加密处理,并依次发送所述M个第一数据包至所述第二终端设备,其中,N大于等于1,且小于M;An encryption module, configured to encrypt N first data packets among the M first data packets, and send the M first data packets to the second terminal device in sequence, where N is greater than or equal to 1 , and less than M;
验证模块,用于在预设时长内接收到所述第二终端设备返回的加密信息,根据所述加密信息确定是否继续发送所述交互数据,其中,所述加密信息由所述第二终端设备对经过加密处理的第一数据包进行解密得到。A verification module, configured to receive encrypted information returned by the second terminal device within a preset time period, and determine whether to continue sending the interactive data according to the encrypted information, wherein the encrypted information is sent by the second terminal device Obtained by decrypting the encrypted first data packet.
在一个实施例中,还包括确定模块,用于:In one embodiment, a determining module is also included for:
根据交互控制指令确定交互数据,并获取所述交互数据,以及确定所述交互数据中是否存在关键数据,其中,所述交互控制指令基于用户对所述第一终端设备或所述第二终端设备的操作生成;Determine interaction data according to the interaction control instructions, obtain the interaction data, and determine whether key data exists in the interaction data, wherein the interaction control instructions are based on the user's control of the first terminal device or the second terminal device. The operation generates;
所述第一获取模块具体用于:The first acquisition module is specifically used for:
响应于所述交互数据中存在关键数据,获取所述交互数据中的关键数据。In response to the existence of key data in the interaction data, the key data in the interaction data is obtained.
在一个实施例中,所述确定模块用于根据交互控制指令确定交互数据,并获取所述交互数据时,具体用于:In one embodiment, the determination module is used to determine interaction data according to interaction control instructions, and when acquiring the interaction data, it is specifically used to:
根据交互控制指令确定交互数据,以及所述交互数据所属的应用程序;Determine the interaction data according to the interaction control instructions, and the application program to which the interaction data belongs;
向所述交互数据所属的应用程序获取所述交互数据。Obtain the interaction data from the application program to which the interaction data belongs.
在一个实施例中,所述确定模块用于确定所述交互数据中是否存在关键数据时,具体用于:In one embodiment, the determination module is used to determine whether key data exists in the interaction data, specifically for:
确定所述交互数据中是否存在属于预设关键数据列表的数据;Determine whether there is data belonging to a preset key data list in the interactive data;
响应于所述交互数据中存在属于预设关键数据列表的数据,确定所述交互数据中存在关键数据,并确定所述交互数据中,属于所述预设关键数据列表的数据为关键数据;In response to the presence of data belonging to the preset key data list in the interaction data, determining that key data exists in the interaction data, and determining that the data belonging to the preset key data list in the interaction data is the key data;
响应于所述交互数据中不存在预设关键数据列表中的数据,确定所述交互数据中不存在关键数据。In response to the fact that the data in the preset key data list does not exist in the interaction data, it is determined that the key data does not exist in the interaction data.
在一个实施例中,所述加密模块用于将所述M个第一数据包中的N个第一数据包进行加密处理时,具体用于:In one embodiment, the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
根据所述M和加密比例,确定N;According to the M and encryption ratio, determine N;
将所述M个第一数据包中的前N个第一数据包进行加密处理。The first N first data packets among the M first data packets are encrypted.
在一个实施例中,还包括比例模块,用于:In one embodiment, a proportional module is also included for:
根据所述第一终端设备的计算力和数据传输链路的质量参数,确定所述加密比例。The encryption ratio is determined based on the computing power of the first terminal device and the quality parameters of the data transmission link.
在一个实施例中,所述加密模块用于将所述M个第一数据包中N个第一数据包进行加密处理时,具体用于:In one embodiment, the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
将加密标识、所述加密信息和第一数据包进行加密处理,得到加密后的第一数据包,其中,所述加密标识用于第二终端设备从所述多个第一数据包中确定经过加密处理的第一数据包。The encrypted identification, the encrypted information and the first data packet are encrypted to obtain an encrypted first data packet, wherein the encrypted identification is used by the second terminal device to determine the process from the plurality of first data packets. Encryption of the first packet processed.
在一个实施例中,还包括第二获取模块,用于:In one embodiment, a second acquisition module is also included, used for:
获取所述交互数据中的非关键数据,并将关键数据封装为多个第二数据包,以及将所述多个第二数据包发送至所述第二终端设备,以使所述第二终端设备解析并展示所述非关键数据。Obtain non-critical data in the interaction data, encapsulate the critical data into a plurality of second data packets, and send the plurality of second data packets to the second terminal device, so that the second terminal The device parses and displays the non-critical data.
在一个实施例中,所述交互数据包括视频和/或音频。In one embodiment, the interaction data includes video and/or audio.
根据本公开实施例的第四方面,提供一种数据交互装置,应用于第二终端设备,包括:According to a fourth aspect of an embodiment of the present disclosure, a data interaction device is provided, applied to a second terminal device, including:
接收模块,用于接收第一终端设备发送的M个第一数据包,其中,所述M个第一数据包由所述第一终端设备对交互数据中的关键数据进行封装得到,所述M个第一数据包中的N个第一数据包经过所述第一终端设备的加密处理,M为大于1的自然数,N大于等于1,且小于M;A receiving module, configured to receive M first data packets sent by the first terminal device, wherein the M first data packets are obtained by the first terminal device encapsulating key data in the interaction data, and the M first data packets are obtained by encapsulating key data in the interactive data. N first data packets among the first data packets have been encrypted by the first terminal device, M is a natural number greater than 1, N is greater than or equal to 1, and less than M;
解密模块,用于对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息;A decryption module, used to decrypt the encrypted N first data packets to obtain encrypted information;
发送模块,用于将所述加密信息发送至所述第一终端设备,以使所述第一终端设备继续发送所述交互数据。A sending module, configured to send the encrypted information to the first terminal device, so that the first terminal device continues to send the interactive data.
在一个实施例中,还包括识别模块,用于:In one embodiment, an identification module is also included for:
在所述对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息之前,将所述M个第一数据包中具有加密标识的第一数据包,确定为经过加密处理的第一数据包。Before decrypting the encrypted N first data packets to obtain encrypted information, the first data packet with an encryption identifier among the M first data packets is determined to be the encrypted first data packet. First packet.
在一个实施例中,还包括第一展示模块,用于:In one embodiment, a first display module is also included for:
在所述对经过加密处理的所述N个第一数据包进行解密处理之后,按照接收顺序依次对所述M个第一数据包进行解析处理,得到所述关键数据;After decrypting the encrypted N first data packets, parsing the M first data packets in sequence according to the order of reception to obtain the key data;
按照所述关键数据的展示方式,对所述关键数据进行展示。Display the key data according to the display method of the key data.
在一个实施例中,还包括第一展示模块,用于:In one embodiment, a first display module is also included for:
接收第一终端设备发送的多个第二数据包,其中,所述多个第二数据包由所述第一终端设备对交互数据中的非关键数据进行封装得到;Receive a plurality of second data packets sent by the first terminal device, wherein the plurality of second data packets are obtained by the first terminal device encapsulating non-critical data in the interactive data;
按照接收顺序依次对所述多个第二数据包进行解析处理,得到所述非关键数据;Sequentially parse the plurality of second data packets according to the order of reception to obtain the non-critical data;
按照所述非关键数据的展示方式,对所述非关键数据进行展示。Display the non-key data according to the display method of the non-key data.
在一个实施例中,还包括控制模块,用于:In one embodiment, a control module is also included for:
基于用户对所述交互数据的展示结果的操作,生成交互控制指令;Generate interactive control instructions based on the user's operation on the display result of the interactive data;
将所述交互控制指令发送至所述第一终端设备,以使所述终端设备继续 返回所述交互数据。Send the interaction control instruction to the first terminal device so that the terminal device continues to return the interaction data.
根据本公开实施例的第五方面,提供一种电子设备,所述电子设备包括存储器、处理器,所述存储器用于存储可在处理器上运行的计算机指令,所述处理器用于在执行所述计算机指令时基于第一方面所述的数据交互方法。According to a fifth aspect of an embodiment of the present disclosure, an electronic device is provided. The electronic device includes a memory and a processor. The memory is used to store computer instructions executable on the processor. The processor is used to execute the The computer instructions are based on the data interaction method described in the first aspect.
根据本公开实施例的第六方面,提供一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现第一方面所述的方法。According to a sixth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
本公开通过获取交互数据中的关键数据,并将关键数据封装为M个第一数据包,然后可以将所述M个第一数据包中N个第一数据包进行加密处理,并依次发送所述M个第一数据包至第二终端设备,最后接收所述第二终端设备返回的加密信息,根据所述加密信息确定是否继续发送所述交互数据,其中,所述加密信息由所述第二终端设备对经过加密处理的第一数据包进行解密得到。由于对交互数据中的关键数据所封装的M个第一数据包中N个第一数据包进行了加密处理,因此可以在M个数据包发送至第二终端设备后,根据第二终端设备是否返回了能够通过验证的加密信息,来判断第二终端设备是否成功解密了被加密的第一数据包,进而能够判断发送至第二终端设备的数据是否安全,并在不安全的情况停止发送交互数据,从而避免数据泄露,保证数据安全。This disclosure obtains the key data in the interaction data and encapsulates the key data into M first data packets. Then, the N first data packets among the M first data packets can be encrypted and sent in sequence. The M first data packets are sent to the second terminal device, and finally the encrypted information returned by the second terminal device is received, and whether to continue sending the interactive data is determined according to the encrypted information, wherein the encrypted information is provided by the third terminal device. The second terminal device decrypts the encrypted first data packet to obtain the encrypted data packet. Since the N first data packets among the M first data packets encapsulated by the key data in the interactive data are encrypted, after the M data packets are sent to the second terminal device, the second terminal device can be encrypted according to whether the second terminal device Encrypted information that can pass verification is returned to determine whether the second terminal device has successfully decrypted the encrypted first data packet, and then can determine whether the data sent to the second terminal device is safe, and stop sending interactions if it is unsafe. data, thereby avoiding data leakage and ensuring data security.
附图说明Description of the drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
图1是本公开一示例性实施例示出的应用于第一终端设备的数据交互方法的流程图;Figure 1 is a flow chart of a data interaction method applied to a first terminal device according to an exemplary embodiment of the present disclosure;
图2是本公开一示例性实施例示出的第一终端设备和第二终端设备的交互过程示意图;Figure 2 is a schematic diagram of the interaction process between a first terminal device and a second terminal device according to an exemplary embodiment of the present disclosure;
图3是本公开一示例性实施例示出的关键数据的封装过程示意图;Figure 3 is a schematic diagram of the encapsulation process of key data according to an exemplary embodiment of the present disclosure;
图4是本公开一示例性实施例示出的关键数据的加密过程示意图;Figure 4 is a schematic diagram of the encryption process of key data according to an exemplary embodiment of the present disclosure;
图5是本公开一示例性实施例示出的关键数据的加密方式示意图;Figure 5 is a schematic diagram of an encryption method of key data according to an exemplary embodiment of the present disclosure;
图6是本公开一示例性实施例示出的应用于第二终端设备的数据交互方法的流程图;Figure 6 is a flow chart of a data interaction method applied to a second terminal device according to an exemplary embodiment of the present disclosure;
图7是本公开一示例性实施例示出的第二终端设备在接收到交互数据后的处理流程;Figure 7 is a processing flow of the second terminal device after receiving interactive data according to an exemplary embodiment of the present disclosure;
图8是本公开一示例性实施例示出的应用于第一终端设备的数据交互装置的结构示意图;Figure 8 is a schematic structural diagram of a data interaction device applied to a first terminal device according to an exemplary embodiment of the present disclosure;
图9是本公开一示例性实施例示出的应用于第二终端设备的数据交互装置的结构示意图;Figure 9 is a schematic structural diagram of a data interaction device applied to a second terminal device according to an exemplary embodiment of the present disclosure;
图10是本公开一示例性实施例示出的电子设备的结构框图。FIG. 10 is a structural block diagram of an electronic device according to an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with aspects of the disclosure as detailed in the appended claims.
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "the" and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所 使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, the information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present disclosure, the first information may also be called second information, and similarly, the second information may also be called first information. Depending on the context, the word "if" as used herein may be interpreted as "when" or "when" or "in response to determining."
近年来,不同终端设备之间的数据交互形式越来越多,例如投屏连接等。投屏连接的场景下,一个终端设备将其视频、音频等数据通过录屏、录音等方式保存成多帧数据,再通过有线连接或无线连接的方式传输到另一个终端设备,另一个终端设备则可以对多帧数据进行解析后得到原视频、音频等数据,进而对其进行显示或播放等展示操作。在两个终端设备之间持续传输大量数据的过程中,数据存在被恶意应用截取的可能,即数据交互的安全性较差,如果这些数据中包含用户的通话数据、联系人、账号密码等,可能会导致这些信息的泄露,严重影响用户的个人信息安全。In recent years, there have been more and more forms of data interaction between different terminal devices, such as screen projection connections. In the scenario of screen casting connection, one terminal device saves its video, audio and other data into multi-frame data through screen recording, audio recording, etc., and then transmits it to another terminal device through wired connection or wireless connection, and the other terminal device Then you can parse the multi-frame data to obtain the original video, audio and other data, and then perform display operations such as display or playback. During the continuous transmission of large amounts of data between two terminal devices, the data may be intercepted by malicious applications, that is, the security of data interaction is poor. If the data contains the user's call data, contacts, account passwords, etc., It may lead to the leakage of this information and seriously affect the security of users' personal information.
为了保证数据交互的安全性,相关技术中,一个终端设备在传输数据前对数据进行加密处理,另一个终端设备在接收到数据后再对数据进行解密处理。但是上述加密解密的过程不仅会降低数据交互的效率,还会增加终端设备的运算负荷。以投屏连接的场景为例,上述加密和加密的过程会会大大降低视频、音频传输的效率,造成视频画面的卡顿或者模糊,以及音频卡顿或者失真等问题。而且如果截取交互数据的恶意应用具有解密能力,则会还续获取交互数据并解密,造成重要信息的持续泄露,对数据安全的影响较大。In order to ensure the security of data interaction, in related technologies, one terminal device encrypts the data before transmitting the data, and the other terminal device decrypts the data after receiving the data. However, the above-mentioned encryption and decryption process will not only reduce the efficiency of data interaction, but also increase the computing load of the terminal device. Taking the screen-casting connection scenario as an example, the above-mentioned encryption and encryption processes will greatly reduce the efficiency of video and audio transmission, causing problems such as stuck or blurred video images, and audio stuck or distortion. Moreover, if the malicious application that intercepts the interactive data has the decryption capability, it will continue to obtain and decrypt the interactive data, causing the continuous leakage of important information and having a greater impact on data security.
基于此,第一方面,本公开至少一个实施例提供了一种数据交互方法,请参照附图1,其示出了该方法的流程,包括步骤S101和步骤S103。Based on this, in the first aspect, at least one embodiment of the present disclosure provides a data interaction method. Please refer to FIG. 1 , which shows the flow of the method, including step S101 and step S103.
其中,该方法可以应用于第一终端设备,所述第一终端与第二终端进行投屏交互。第一终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字处理(Personal Digital Assistant,PDA)手持设备、计算设备、可穿戴设备等。第一终端设备可以为数据交互场景下的数据源头,也就是向外发送数据的一侧,例如智能手机向电视机投屏的场景下,智能手机为数据源头,电视机为数据终点。Wherein, this method can be applied to a first terminal device, and the first terminal and the second terminal perform screen projection interaction. The first terminal device may be a user equipment (User Equipment, UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA) handheld device, a computing device, a wearable device, etc. The first terminal device can be the data source in a data interaction scenario, that is, the side that sends data outward. For example, in a scenario where a smartphone projects a screen to a TV, the smartphone is the data source and the TV is the data destination.
可以理解的是,可以由第一终端设备的特定应用程序或特定模块等来执行该方法。例如,可以按照附图2,作为第一终端设备的终端A具有用于数据交互的应用C,应用C可以与应用1、应用2、应用3等其他应用程序通信 连接,从而向其他应用程序获取音频数据、视频数据等交互数据,并对这些交互数据进行封装并发送至作为第二终端设备的终端B,终端B是数据交互的数据终点,其可以接收应用C发送的数据,并对接收的数据进行解封装,同时还能够反控终端A的应用,即向应用C发送控制指令,然后应用C将这些控制指令发送至对应的应用程序。这些其他应用程序可以为音乐类应用程序、视频类应用程序、导航类应用程序、社交类应用程序等。It can be understood that the method may be executed by a specific application program or a specific module of the first terminal device, or the like. For example, according to Figure 2, terminal A as the first terminal device has application C for data interaction. Application C can communicate and connect with other application programs such as application 1, application 2, application 3, etc., thereby obtaining information from other application programs. Interactive data such as audio data, video data, etc. are encapsulated and sent to Terminal B as the second terminal device. Terminal B is the data end point of data interaction. It can receive the data sent by Application C and process the received data. The data is decapsulated, and at the same time, the application of terminal A can be counter-controlled, that is, control instructions are sent to application C, and then application C sends these control instructions to the corresponding application. These other applications may be music applications, video applications, navigation applications, social applications, etc.
在步骤S101中,获取交互数据中的关键数据,并将所述关键数据封装为M个第一数据包,其中,M为大于1的自然数。In step S101, key data in the interaction data is obtained, and the key data is encapsulated into M first data packets, where M is a natural number greater than 1.
其中,交互数据为数据交互所针对的数据,也就是第一终端设备向第二终端设备所发送的数据。以投屏场景为例,交互数据为视频、音频等数据。关键数据可以为涉及到用户隐私或者账户安全的数据。The interaction data is data targeted by data interaction, that is, data sent by the first terminal device to the second terminal device. Taking the screencasting scenario as an example, the interactive data is video, audio and other data. Key data can be data related to user privacy or account security.
在数据交互的过程中,第一终端设备可以根据交互控制指令确定交互数据,以及交互数据所属的应用程序,并向交互数据所属的应用程序获取所述交互数据,其中,所述交互控制指令基于用户对所述第一终端设备或所述第二终端设备的操作生成。以投屏场景为例,在第一终端设备和第二终端设备建立投屏连接后,第一终端设备会将默认画面发送至第二终端设备,以使第二终端设备显示该默认画面,该默认画面可以为第一终端设备的当前画面、桌面或者投屏程序的专用初始画面;接下来,用户可以对第一终端设备进行操作,则第一终端设备基于该操作生成交互控制指令,或者对第二终端设备上显示的上述默认画面进行操作,第二终端设备基于该操作生成交互控制指令并将该交互控制指令发送至第一终端设备,第一终端设备根据该交互控制指令向对应的应用程序获取画面、音频等数据,例如交互控制指令是启动桌面上的某个应用程序,则第一终端设备启动该应用程序,并获取该应用程序启动后的初始界面作为交互数据。During the process of data interaction, the first terminal device can determine the interaction data and the application program to which the interaction data belongs according to the interaction control instruction, and obtain the interaction data from the application program to which the interaction data belongs, wherein the interaction control instruction is based on Generated by a user's operation on the first terminal device or the second terminal device. Taking the screencasting scenario as an example, after the first terminal device and the second terminal device establish a screencasting connection, the first terminal device will send the default screen to the second terminal device so that the second terminal device displays the default screen. The default screen can be the current screen of the first terminal device, the desktop, or the dedicated initial screen of the screen projection program; next, the user can operate the first terminal device, and the first terminal device generates an interactive control instruction based on the operation, or The second terminal device operates on the above-mentioned default screen displayed on the second terminal device. The second terminal device generates an interactive control instruction based on the operation and sends the interactive control instruction to the first terminal device. The first terminal device sends a request to the corresponding application according to the interactive control instruction. The program obtains picture, audio and other data. For example, if the interactive control instruction is to start an application on the desktop, then the first terminal device starts the application and obtains the initial interface after the application is started as the interaction data.
第一终端设备在获取交互数据后,可以按照下述方式确定该交互数据中是否存在关键数据:首先,确定所述交互数据中是否存在属于预设关键数据列表的数据,示例性的,第一终端设备内预先设置了预设关键数据列表;接 下来,在所述交互数据中存在属于预设关键数据列表的数据的情况下,确定所述交互数据中存在关键数据,并确定所述交互数据中,属于所述预设关键数据列表的数据为关键数据;在所述交互数据中不存在预设关键数据列表中的数据的情况下,确定所述交互数据中不存在关键数据。After acquiring the interaction data, the first terminal device can determine whether there is key data in the interaction data in the following manner: first, determine whether there is data belonging to the preset key data list in the interaction data. For example, first A preset key data list is preset in the terminal device; next, if there is data belonging to the preset key data list in the interaction data, it is determined that key data exists in the interaction data, and the interaction data is determined , the data belonging to the preset key data list is key data; when there is no data in the preset key data list in the interaction data, it is determined that there is no key data in the interaction data.
在所述交互数据中存在关键数据的情况下,可以执行本步骤,即获取所述交互数据中的关键数据。由于受到传输通道带宽的影响,关键数据无法直接传输至第二终端设备,因此可以参照附图3,将关键数据封装为M个第一数据包。In the case where key data exists in the interaction data, this step can be performed, that is, obtaining the key data in the interaction data. Due to the influence of the bandwidth of the transmission channel, the key data cannot be directly transmitted to the second terminal device. Therefore, the key data can be encapsulated into M first data packets with reference to Figure 3.
另外,还可以获取所述交互数据中的非关键数据,并将关键数据封装为多个第二数据包,以及将所述多个第二数据包发送至所述第二终端设备,以使所述第二终端设备解析并展示所述非关键数据。In addition, non-critical data in the interactive data can also be obtained, the critical data can be encapsulated into a plurality of second data packets, and the plurality of second data packets can be sent to the second terminal device, so that all The second terminal device parses and displays the non-critical data.
在所述交互数据中不存在关键数据的情况下,可以将交互数据封装为多个第三数据包,以及将所述多个第三数据包发送至所述第二终端设备,以使所述第二终端设备解析并展示所述交互数据。When there is no key data in the interaction data, the interaction data may be encapsulated into a plurality of third data packets, and the plurality of third data packets may be sent to the second terminal device, so that the The second terminal device parses and displays the interaction data.
在步骤S102中,将所述M个第一数据包中N个第一数据包进行加密处理,并依次发送所述M个第一数据包至第二终端设备,其中,N大于等于1,且小于M。In step S102, N first data packets among the M first data packets are encrypted, and the M first data packets are sent to the second terminal device in sequence, where N is greater than or equal to 1, and Less than M.
其中,进行加密处理的第一数据包可以为所述M个第一数据包中的部分。示例性的,可以先根据所述第一终端设备的计算力p和数据传输链路的质量参数q,确定所述加密比例K,第一终端设备的计算力p可以用于表征第一终端设备的加密速度,数据传输链路的质量参数q可以用于表征丢包率,如果丢包率过高则可能会造成加密的第一数据包丢失,进而造成加密无意义,以投屏场景为例,丢包率极低,q的值在0.98-1之间,例如可以按照下述公式计算K:K=p*q;然后根据所述M和加密比例K,确定加密数量N,例如可以按照下述公式计算N:N=M*K;最后将所述多个第一数据包中的前N个第一数据包进行加密处理。可以参照附图4,关键数据被封装为4个第一数据包后,前3个第一数据包被加密。可以理解的是,附图4仅为实例,一般加密比例K 在20%-30%之间。The first data packet to be encrypted may be part of the M first data packets. For example, the encryption ratio K can be determined first based on the computing power p of the first terminal device and the quality parameter q of the data transmission link. The computing power p of the first terminal device can be used to characterize the first terminal device. The encryption speed, the quality parameter q of the data transmission link can be used to characterize the packet loss rate. If the packet loss rate is too high, the first encrypted data packet may be lost, which will make the encryption meaningless. Take the screen projection scenario as an example. , the packet loss rate is extremely low, and the value of q is between 0.98-1. For example, K can be calculated according to the following formula: K = p*q; then according to the M and the encryption ratio K, the encryption number N is determined, for example, according to The following formula is used to calculate N: N=M*K; finally, the first N first data packets among the plurality of first data packets are encrypted. Referring to Figure 4, after key data is encapsulated into four first data packets, the first three first data packets are encrypted. It can be understood that Figure 4 is only an example, and the general encryption ratio K is between 20% and 30%.
在一个可能的实施例中,可以按照如图5所示的方式对第一数据包进行加密处理:将加密标识F、加密信息I和第一数据包进行加密处理,得到加密后的第一数据包,其中,所述加密标识F用于第二终端设备从所述多个第一数据包中确定经过加密处理的第一数据包。In a possible embodiment, the first data packet can be encrypted as shown in Figure 5: the encryption identifier F, the encryption information I and the first data packet are encrypted to obtain the encrypted first data. package, wherein the encryption identifier F is used by the second terminal device to determine the encrypted first data packet from the plurality of first data packets.
可以理解的是,在数据交互的过程中,第一终端设备会持续的根据交互控制指令获取交互数据,并判断交互数据中是否存在关键数据,若存在关键数据则对关键数据封装得到的多个第一数据包中的部分或全部进行加密后发送到第二终端设备,并对非关键数据封装得到的多个第二数据包直接发送至第二终端设备,若不存在关键数据则直接将交互数据封装后得到的多个第三数据包发送至第二终端设备。可以根据获取交互数据的顺序确定上述交互数据的处理和发送顺序。It can be understood that during the process of data interaction, the first terminal device will continuously obtain the interaction data according to the interaction control instructions, and determine whether there is key data in the interaction data. If there is key data, the key data will be encapsulated into multiple Part or all of the first data packet is encrypted and sent to the second terminal device, and the multiple second data packets obtained by encapsulating non-critical data are directly sent to the second terminal device. If there is no critical data, the interaction is directly The plurality of third data packets obtained after data encapsulation are sent to the second terminal device. The order of processing and sending the above interactive data can be determined according to the order in which the interactive data is obtained.
在步骤S103中,接收到所述第二终端设备返回的加密信息,根据所述加密信息确定是否继续发送所述交互数据,其中,所述加密信息由所述第二终端设备对经过加密处理的第一数据包进行解密得到。In step S103, the encrypted information returned by the second terminal device is received, and whether to continue sending the interactive data is determined according to the encrypted information, wherein the encrypted information is used by the second terminal device to encrypt the encrypted information. The first data packet is decrypted and obtained.
其中,第二终端设备在数据交互过程中持续接收第一终端设备以数据包的形式所发送的交互数据,然后依次对接收到的交互数据进行处理,即依次对接收到的数据包进行处理。在处理数据包前,可以查看数据包是否具有加密标识,若不具有加密标识,则该数据包为第二数据包、第三数据包或未经加密处理的第一数据包,若具有加密标识,则该数据包为经过加密的第一数据包。The second terminal device continues to receive the interaction data sent by the first terminal device in the form of data packets during the data interaction process, and then processes the received interaction data in sequence, that is, processes the received data packets in sequence. Before processing the data packet, you can check whether the data packet has an encryption identifier. If it does not have an encryption identifier, the data packet is the second data packet, the third data packet, or the first data packet that has not been encrypted. If it has an encryption identifier, , then the data packet is the encrypted first data packet.
在接收第一终端设备发送的多个第二数据包之后,可以按照接收顺序依次对所述多个第二数据包进行解析处理,得到所述非关键数据,并按照所述非关键数据的展示方式,对所述非关键数据进行展示。示例性的,非关键数据为画面,则可以对图像进行显示;非关键数据为视频,则可以对视频进行播放。After receiving a plurality of second data packets sent by the first terminal device, the plurality of second data packets can be parsed in sequence according to the order of reception, to obtain the non-critical data, and display the non-critical data according to the method to display the non-critical data. For example, if the non-key data is a picture, the image can be displayed; if the non-key data is a video, the video can be played.
在接收第一终端设备发送的多个第三数据包之后,可以按照接收顺序依 次对所述多个第三数据包进行解析处理,得到所述交互数据,并按照所述交互数据的展示方式,对所述交互数据进行展示。示例性的,交互数据为画面,则可以对图像进行显示;交互数据为视频,则可以对视频进行播放。After receiving a plurality of third data packets sent by the first terminal device, the plurality of third data packets may be parsed and processed in sequence according to the reception order to obtain the interactive data, and according to the display method of the interactive data, Display the interactive data. For example, if the interactive data is a picture, the image can be displayed; if the interactive data is a video, the video can be played.
在接收第一终端设备发送的多个第一数据包之后,可以先将所述多个第一数据包中具有加密标识的第一数据包,确定为经过加密处理的第一数据包,然后对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息和解密后的第一数据包,然后按照接收顺序依次对所述多个第一数据包进行解析处理,得到所述关键数据,并按照所述关键数据的展示方式,对所述关键数据进行展示,示例性的,关键数据为画面,则可以对图像进行显示;关键数据为视频,则可以对视频进行播放;同时可以将加密信息发送至第一终端设备。After receiving a plurality of first data packets sent by the first terminal device, the first data packet with an encryption identifier among the plurality of first data packets may first be determined as the encrypted first data packet, and then the first data packet may be The N first data packets that have been encrypted are decrypted to obtain the encrypted information and the decrypted first data packets, and then the multiple first data packets are parsed in sequence according to the order of reception to obtain the key data, and display the key data according to the display method of the key data. For example, if the key data is a picture, the image can be displayed; if the key data is a video, the video can be played; at the same time, Send the encrypted information to the first terminal device.
第一终端设备在预设时长内接收到所述第二终端设备返回的加密信息,且所述加密信息通过验证的情况下,继续发送所述交互数据,即继续以数据包的形式发送存在关键数据的交互数据中的关键数据和非关键数据,以及不存在关键数据的交互数据;否则(即第一终端设备未在预设时长内接收到所述第二终端设备返回的加密信息,或第一终端设备在预设时长内接收到所述第二终端设备返回的加密信息,但加密信息未通过验证的情况下),停止发送交互数据,即停止以发送存在关键数据的交互数据中的关键数据和非关键数据,以及不存在关键数据的交互数据,例如,在投屏场景下,可以停止投屏,断开与第二终端设备间的投屏连接。If the first terminal device receives the encrypted information returned by the second terminal device within the preset time period, and the encrypted information passes the verification, it will continue to send the interactive data, that is, continue to send the existence key in the form of data packets. Key data and non-key data in the interactive data of the data, as well as interactive data without critical data; otherwise (that is, the first terminal device does not receive the encrypted information returned by the second terminal device within the preset time period, or the first terminal device does not receive the encrypted information returned by the second terminal device within the preset time period, or the When a terminal device receives the encrypted information returned by the second terminal device within a preset time period, but the encrypted information fails to pass verification), it stops sending interactive data, that is, it stops sending key interactive data in which critical data exists. Data and non-critical data, as well as interactive data without critical data. For example, in a screencasting scenario, you can stop screencasting and disconnect the screencasting connection with the second terminal device.
可以理解的是,第一终端设备在第一终端设备未在预设时长内接收到所述第二终端设备返回的加密信息,或第一终端设备在预设时长内接收到所述第二终端设备返回的加密信息,但加密信息未通过验证的情况下,还可以生成提示信息,例如显示在显示屏上的文字提示信息,或由扬声器播放的音频提示信息。It can be understood that the first terminal device does not receive the encrypted information returned by the second terminal device within the preset time period, or the first terminal device receives the encrypted information returned by the second terminal device within the preset time period. If the device returns encrypted information, but the encrypted information fails to pass verification, it can also generate prompt information, such as text prompt information displayed on the display, or audio prompt information played by the speaker.
本公开通过获取交互数据中的关键数据,并将关键数据封装为M个第一数据包,然后可以将所述M个第一数据包中N个第一数据包进行加密处理, 并依次发送所述M个第一数据包至第二终端设备,最后接收所述第二终端设备返回的加密信息,根据所述加密信息确定是否继续发送所述交互数据,其中,所述加密信息由所述第二终端设备对经过加密处理的第一数据包进行解密得到。由于对交互数据中的关键数据所封装的M个第一数据包中N个第一数据包进行了加密处理,因此可以在M个数据包发送至第二终端设备后,根据第二终端设备是否返回了能够通过验证的加密信息,来判断第二终端设备是否成功解密了被加密的第一数据包,进而能够判断发送至第二终端设备的数据是否安全,并在不安全的情况停止发送交互数据,从而避免数据泄露,保证数据安全。This disclosure obtains the key data in the interactive data and encapsulates the key data into M first data packets. Then, the N first data packets among the M first data packets can be encrypted and sent in sequence. The M first data packets are sent to the second terminal device, and finally the encrypted information returned by the second terminal device is received, and whether to continue sending the interactive data is determined according to the encrypted information, wherein the encrypted information is provided by the third terminal device. The second terminal device decrypts the encrypted first data packet to obtain the encrypted data packet. Since the N first data packets among the M first data packets encapsulated by the key data in the interactive data are encrypted, after the M data packets are sent to the second terminal device, the second terminal device can be encrypted according to whether the second terminal device Encrypted information that can pass verification is returned to determine whether the second terminal device has successfully decrypted the encrypted first data packet, and then can determine whether the data sent to the second terminal device is safe, and stop sending interactions if it is unsafe. data, thereby avoiding data leakage and ensuring data security.
本公开中,对封装得到的多个第一数据包中的部分进行加密处理,从而可以降低第一终端设备的加密处理的运算负荷,以及第二终端设备的解密处理的运算负荷,从而避免出现卡顿和断流的问题。而且本公开的进一步根据第二终端设备对加密的第一数据包的解密情况,来控制第一终端设备后续的数据交互,即在第二终端设备对加密的第一数据包成功解密的情况下继续进行数据交互,在第二终端设备对加密的第一数据包未成功解密的情况下停止进行数据交互,从而避免了第二终端设备中的恶意应用虽然不能够解密经过加密处理的第一数据包,但依然可以继续获取未经过加密处理的第一数据包而造成的用户信息泄露。再者本公开将多个第一数据包中的前N个第一数据包进行加密,能够在存在恶意应用截取数据的情况下避免后续未加密的数据包被截取,最大程度的保证了数据安全。In the present disclosure, some of the encapsulated first data packets are encrypted, thereby reducing the computational load of the encryption process of the first terminal device and the computational load of the decryption process of the second terminal device, thereby avoiding the occurrence of Problems with lags and interruptions. Moreover, the present disclosure further controls the subsequent data interaction of the first terminal device based on the decryption of the encrypted first data packet by the second terminal device, that is, when the second terminal device successfully decrypts the encrypted first data packet. Continue data interaction, and stop data interaction if the second terminal device fails to decrypt the encrypted first data packet, thereby avoiding the possibility that a malicious application in the second terminal device cannot decrypt the encrypted first data. package, but it is still possible to continue to obtain the first data package that has not been encrypted, resulting in the leakage of user information. Furthermore, the present disclosure encrypts the first N first data packets among multiple first data packets, which can prevent subsequent unencrypted data packets from being intercepted when there is a malicious application intercepting data, thus ensuring data security to the greatest extent. .
第二方面,本公开至少一个实施例提供了一种数据交互方法,请参照附图6,其示出了该方法的流程,包括步骤S601和步骤S503。In the second aspect, at least one embodiment of the present disclosure provides a data interaction method. Please refer to FIG. 6 , which shows the flow of the method, including step S601 and step S503.
其中,该方法可以应用于第二终端设备。第二终端设备可以为电视机、车载终端等。第二终端设备可以为数据交互场景下的数据终点,也就是接收数据的一侧,例如智能手机向电视机投屏的场景下,智能手机为数据源头,电视机为数据终点。Wherein, the method can be applied to the second terminal device. The second terminal device may be a television, a vehicle-mounted terminal, etc. The second terminal device can be the data destination in a data interaction scenario, that is, the side that receives data. For example, in a scenario where a smartphone projects a screen to a TV, the smartphone is the data source and the TV is the data destination.
在步骤S601中,接收第一终端设备发送的M个第一数据包,其中,所 述多个第一数据包由所述第一终端设备对交互数据中的关键数据进行封装得到,所述M个第一数据包中的N个第一数据包经过所述第一终端设备的加密处理,M为大于1的自然数,N大于等于1,且小于M。In step S601, M first data packets sent by the first terminal device are received, wherein the plurality of first data packets are obtained by the first terminal device encapsulating key data in the interactive data, and the M N first data packets among the first data packets have been encrypted by the first terminal device. M is a natural number greater than 1, and N is greater than or equal to 1 and less than M.
本步骤中第一终端设备对关键数据的获取、封装、加密、发送等操作已经在第一方面的实施例中进行了详细的介绍,因此这里不再重复赘述。In this step, the operations of obtaining, encapsulating, encrypting, and sending key data by the first terminal device have been described in detail in the embodiment of the first aspect, so the details will not be repeated here.
在步骤S602中,对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息。In step S602, the N first data packets that have been encrypted are decrypted to obtain encrypted information.
首先,可以将所述M个第一数据包中具有加密标识的第一数据包,确定为经过加密处理的第一数据包,接下来,对经过加密处理的第一数据包进行解密处理。解密后,不仅得到了解密后的第一数据包,还得到了第一终端设备在解密出来过程中加入的加密信息。First, the first data packet with the encryption identifier among the M first data packets may be determined as the encrypted first data packet. Next, the encrypted first data packet may be decrypted. After decryption, not only the decrypted first data packet is obtained, but also the encrypted information added by the first terminal device during the decryption process is obtained.
在对经过加密处理的所述N个第一数据包进行解密处理之后,可以按照接收顺序依次对所述M个第一数据包进行解析处理,得到所述关键数据,并按照所述关键数据的展示方式,对所述关键数据进行展示。示例性的,非关键数据为画面,则可以对图像进行显示;非关键数据为视频,则可以对视频进行播放。After decrypting the encrypted N first data packets, the M first data packets can be parsed in sequence according to the receiving order to obtain the key data, and according to the key data Display method to display the key data. For example, if the non-key data is a picture, the image can be displayed; if the non-key data is a video, the video can be played.
在步骤S603中,将所述加密信息发送至所述第一终端设备,以使所述第一终端设备继续发送所述交互数据。In step S603, the encrypted information is sent to the first terminal device, so that the first terminal device continues to send the interaction data.
本步骤中第一终端设备对加密信息的接收、验证以及根据验证结果进行的继续或停止发送交互数据等操作,已经在第一方面的实施例中进行了详细的介绍,因此这里不再重复赘述。In this step, operations such as receiving and verifying the encrypted information by the first terminal device and continuing or stopping sending interactive data based on the verification results have been described in detail in the embodiment of the first aspect, so the details will not be repeated here. .
另外,第二终端设备还可以接收第一终端设备发送的多个第二数据包,其中,所述多个第二数据包由所述第一终端设备对交互数据中的非关键数据进行封装得到;并按照接收顺序依次对所述多个第二数据包进行解析处理,得到所述非关键数据;以及按照所述非关键数据的展示方式,对所述非关键数据进行展示。示例性的,非关键数据为画面,则可以对图像进行显示;非关键数据为视频,则可以对视频进行播放。In addition, the second terminal device may also receive a plurality of second data packets sent by the first terminal device, wherein the plurality of second data packets are obtained by the first terminal device encapsulating non-critical data in the interactive data. ; and sequentially parse and process the plurality of second data packets according to the order of reception to obtain the non-critical data; and display the non-critical data according to the display method of the non-critical data. For example, if the non-key data is a picture, the image can be displayed; if the non-key data is a video, the video can be played.
另外,第二终端设备还可以接收第一终端设备发送的多个第三数据包,其中,所述多个第三数据包由所述第一终端设备对不存在关键数据的交互数据进行封装得到;并按照接收顺序依次对所述多个第三数据包进行解析处理,得到所述交互数据;以及按照所述交互数据的展示方式,对所述交互数据进行展示。示例性的,非关键数据为画面,则可以对图像进行显示;非关键数据为视频,则可以对视频进行播放。In addition, the second terminal device may also receive a plurality of third data packets sent by the first terminal device, wherein the plurality of third data packets are obtained by the first terminal device encapsulating interactive data without critical data. ; and sequentially parse and process the plurality of third data packets according to the order of reception to obtain the interactive data; and display the interactive data according to the display method of the interactive data. For example, if the non-key data is a picture, the image can be displayed; if the non-key data is a video, the video can be played.
可以参照附图7,其示出了作为第二终端设备的终端B在接收到交互数据后的处理流程。终端B收到数据后,首先确定是否需要解密;若不需要解密,即数据为存在关键数据的交互数据中的非关键数据,或不存在关键数据的交互数据,则解析数据并展示;若需要解密,则对数据进行加密,并对解密的数据进行解析并展示,同时解密过程中获取加密信息I,然后将加密信息I发送到作为第一终端设备的终端A,终端A确定信息I是否正确,若正确(即通过验证)则继续发送数据,若不正确(即未通过验证)则终止发送数据。Reference may be made to FIG. 7 , which shows the processing flow of terminal B as the second terminal device after receiving interactive data. After receiving the data, terminal B first determines whether decryption is required; if decryption is not required, that is, the data is non-critical data in the interactive data where critical data exists, or interactive data where critical data does not exist, the data will be parsed and displayed; if necessary To decrypt, the data is encrypted, and the decrypted data is parsed and displayed. At the same time, the encrypted information I is obtained during the decryption process, and then the encrypted information I is sent to terminal A as the first terminal device. Terminal A determines whether the information I is correct. , if it is correct (that is, it passes the verification), it will continue to send the data, if it is incorrect (that is, it does not pass the verification), it will stop sending the data.
基于第二终端设备对交互数据的展示,用户可以对交互数据的展示结果进行操作,例如对第二终端设备显示的投屏界面进行操作;第二终端设备则可以基于用户对所述交互数据的展示结果的操作,生成交互控制指令,并将所述交互控制指令发送至所述第一终端设备,以使所述终端设备继续返回所述交互数据。Based on the display of the interactive data by the second terminal device, the user can operate on the display result of the interactive data, such as operating the screen projection interface displayed by the second terminal device; the second terminal device can then operate on the display result of the interactive data based on the user's display of the interactive data. The operation of displaying the results generates an interaction control instruction, and sends the interaction control instruction to the first terminal device, so that the terminal device continues to return the interaction data.
可以将上述两个方面介绍的数据交互方法进行结合,得到下述数据交互方法。在该数据交互方法中,第一终端设备持续的,根据交互控制指令(所述交互控制指令基于用户对所述第一终端设备或所述第二终端设备的操作生成)获取交互数据,并将交互数据封装后发送至第二终端设备,第二终端设备接收到交互数据后进行解封装,然后进行展示,例如显示画面和播放音视频等。在上述交互数据中存在关键数据,关键数据涉及用户隐私或者账号信息,因此需要加密进行保护,因此在对关键数据进行封装后,对得到的多个第一数据包中的部分进行加密,然后发送到第二终端设备,第二终端设备接收到加密的第一数据包需要先进行解密,然后解封装,再进行展示。同时, 关键数据中的加密的第一数据包还作为数据交互过程中的安全性验证手段,即第一数据包在加密过程中加入了加密信息,而第二终端设备在解密后会得到该加密信息,并将该加密信息返回至第一终端设备,因此第一终端设备接收到正确的加密信息则表示目前交互过程安全,可以继续进行数据交互,第一终端设备未接收到正确的加密信息则表示目前交互过程不安全,可以停止进行数据交互。The data interaction methods introduced in the above two aspects can be combined to obtain the following data interaction method. In this data interaction method, the first terminal device continuously obtains interaction data according to the interaction control instructions (the interaction control instructions are generated based on the user's operation of the first terminal device or the second terminal device), and The interactive data is encapsulated and sent to the second terminal device. After receiving the interactive data, the second terminal device decapsulates the data and then displays it, such as displaying pictures and playing audio and video. There is key data in the above interactive data. The key data involves user privacy or account information, so it needs to be encrypted for protection. Therefore, after the key data is encapsulated, parts of the multiple first data packets obtained are encrypted and then sent. To the second terminal device, the second terminal device receives the encrypted first data packet and needs to first decrypt it, then decapsulate it, and then display it. At the same time, the encrypted first data packet in the key data also serves as a security verification method during the data interaction process. That is, the first data packet adds encrypted information during the encryption process, and the second terminal device will obtain the encrypted information after decryption. information and returns the encrypted information to the first terminal device. Therefore, if the first terminal device receives the correct encrypted information, it means that the current interaction process is safe and data interaction can continue. If the first terminal device does not receive the correct encrypted information, then Indicates that the current interaction process is unsafe and data interaction can be stopped.
根据本公开实施例的第三方面,提供一种数据交互装置,应用于第一终端设备,所述第一终端与第二终端进行投屏交互,请参照附图8,所述装置包括:According to a third aspect of the embodiment of the present disclosure, a data interaction device is provided, which is applied to a first terminal device. The first terminal and the second terminal perform screen projection interaction. Please refer to Figure 8. The device includes:
第一获取模块801,用于获取交互数据中的关键数据,并将所述关键数据封装为M个第一数据包,其中,M为大于1的自然数;The first acquisition module 801 is used to acquire key data in the interaction data, and encapsulate the key data into M first data packets, where M is a natural number greater than 1;
加密模块802,用于将所述M个第一数据包中N个第一数据包进行加密处理,并依次发送所述M个第一数据包至第二终端设备,其中,N大于等于1,且小于M;The encryption module 802 is used to encrypt N first data packets among the M first data packets, and send the M first data packets to the second terminal device in sequence, where N is greater than or equal to 1, And less than M;
验证模块803,用于接收到所述第二终端设备返回的加密信息,根据所述加密信息确定是否继续发送所述交互数据,其中,所述加密信息由所述第二终端设备对经过加密处理的第一数据包进行解密得到。 Verification module 803, configured to receive the encrypted information returned by the second terminal device, and determine whether to continue sending the interactive data according to the encrypted information, wherein the encrypted information is encrypted by the second terminal device. The first data packet is decrypted and obtained.
在本公开的一些实施例中,还包括确定模块,用于:In some embodiments of the present disclosure, a determining module is further included for:
根据交互控制指令确定交互数据,并获取所述交互数据,以及确定所述交互数据中是否存在关键数据,其中,所述交互控制指令基于用户对所述第一终端设备或所述第二终端设备的操作生成;Determine interaction data according to the interaction control instructions, obtain the interaction data, and determine whether key data exists in the interaction data, wherein the interaction control instructions are based on the user's control of the first terminal device or the second terminal device. The operation generates;
所述第一获取模块具体用于:The first acquisition module is specifically used for:
响应于所述交互数据中存在关键数据,获取所述交互数据中的关键数据。In response to the existence of key data in the interaction data, the key data in the interaction data is obtained.
在本公开的一些实施例中,所述确定模块用于根据交互控制指令确定交互数据,并获取所述交互数据时,具体用于:In some embodiments of the present disclosure, the determination module is used to determine interaction data according to interaction control instructions, and when acquiring the interaction data, it is specifically used to:
根据交互控制指令确定交互数据,以及所述交互数据所属的应用程序;Determine the interaction data according to the interaction control instructions, and the application program to which the interaction data belongs;
向所述交互数据所属的应用程序获取所述交互数据。Obtain the interaction data from the application program to which the interaction data belongs.
在本公开的一些实施例中,所述确定模块用于确定所述交互数据中是否存在关键数据时,具体用于:In some embodiments of the present disclosure, the determination module is used to determine whether key data exists in the interaction data, specifically for:
确定所述交互数据中是否存在属于预设关键数据列表的数据;Determine whether there is data belonging to a preset key data list in the interactive data;
响应于所述交互数据中存在属于预设关键数据列表的数据,确定所述交互数据中存在关键数据,并确定所述交互数据中,属于所述预设关键数据列表的数据为关键数据;In response to the presence of data belonging to the preset key data list in the interaction data, determining that key data exists in the interaction data, and determining that the data belonging to the preset key data list in the interaction data is the key data;
响应于所述交互数据中不存在预设关键数据列表中的数据,确定所述交互数据中不存在关键数据。In response to the fact that the data in the preset key data list does not exist in the interaction data, it is determined that the key data does not exist in the interaction data.
在本公开的一些实施例中,所述加密模块用于将所述M个第一数据包中N个第一数据包进行加密处理时,具体用于:In some embodiments of the present disclosure, the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
根据所述M和加密比例,确定加密数量N;According to the M and the encryption ratio, determine the encryption amount N;
将所述多个第一数据包中的前N个第一数据包进行加密处理。The first N first data packets among the plurality of first data packets are encrypted.
在本公开的一些实施例中,还包括比例模块,用于:In some embodiments of the present disclosure, a proportional module is also included for:
根据所述第一终端设备的计算力和数据传输链路的质量参数,确定所述加密比例。The encryption ratio is determined based on the computing power of the first terminal device and the quality parameters of the data transmission link.
在本公开的一些实施例中,所述加密模块用于将所述M个第一数据包中N个第一数据包进行加密处理时,具体用于:In some embodiments of the present disclosure, the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
将加密标识、所述加密信息和第一数据包进行加密处理,得到加密后的第一数据包,其中,所述加密标识用于第二终端设备从所述多个第一数据包中确定经过加密处理的第一数据包。The encrypted identification, the encrypted information and the first data packet are encrypted to obtain an encrypted first data packet, wherein the encrypted identification is used by the second terminal device to determine the process from the plurality of first data packets. Encryption of the first packet processed.
在本公开的一些实施例中,还包括第二获取模块,用于:In some embodiments of the present disclosure, a second acquisition module is also included, used for:
获取所述交互数据中的非关键数据,并将关键数据封装为多个第二数据包,以及将所述多个第二数据包发送至所述第二终端设备,以使所述第二终端设备解析并展示所述非关键数据。Obtain non-critical data in the interaction data, encapsulate the critical data into a plurality of second data packets, and send the plurality of second data packets to the second terminal device, so that the second terminal The device parses and displays the non-critical data.
在本公开的一些实施例中,所述交互数据包括视频和/或音频。In some embodiments of the present disclosure, the interaction data includes video and/or audio.
根据本公开实施例的第四方面,提供一种数据交互装置,应用于第二终端设备,请参照附图9,所述装置包括:According to a fourth aspect of the embodiment of the present disclosure, a data interaction device is provided, which is applied to a second terminal device. Please refer to FIG. 9. The device includes:
接收模块901,用于接收第一终端设备发送的M个第一数据包,其中,所述M个第一数据包由所述第一终端设备对交互数据中的关键数据进行封装得到,所述M个第一数据包中的N个第一数据包经过所述第一终端设备的加密处理,M为大于1的自然数,N大于等于1,且小于M;The receiving module 901 is configured to receive M first data packets sent by the first terminal device, wherein the M first data packets are obtained by the first terminal device encapsulating key data in the interaction data, and the N first data packets among the M first data packets have been encrypted by the first terminal device, M is a natural number greater than 1, N is greater than or equal to 1, and less than M;
解密模块902,用于对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息;The decryption module 902 is used to decrypt the encrypted N first data packets to obtain encrypted information;
发送模块903,用于将所述加密信息发送至所述第一终端设备,以使所述第一终端设备继续发送所述交互数据。The sending module 903 is configured to send the encrypted information to the first terminal device, so that the first terminal device continues to send the interactive data.
在本公开的一些实施例中,还包括识别模块,用于:In some embodiments of the present disclosure, an identification module is also included for:
在所述对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息之前,将所述M个第一数据包中具有加密标识的第一数据包,确定为经过加密处理的第一数据包。Before decrypting the encrypted N first data packets to obtain encrypted information, the first data packet with an encryption identifier among the M first data packets is determined to be the encrypted first data packet. First packet.
在本公开的一些实施例中,还包括第一展示模块,用于:In some embodiments of the present disclosure, a first display module is also included, used for:
在所述对经过加密处理的所述N个第一数据包进行解密处理之后,按照接收顺序依次对所述M个第一数据包进行解析处理,得到所述关键数据;After decrypting the encrypted N first data packets, parsing the M first data packets in sequence according to the order of reception to obtain the key data;
按照所述关键数据的展示方式,对所述关键数据进行展示。Display the key data according to the display method of the key data.
在本公开的一些实施例中,还包括第一展示模块,用于:In some embodiments of the present disclosure, a first display module is also included, used for:
接收第一终端设备发送的多个第二数据包,其中,所述多个第二数据包由所述第一终端设备对交互数据中的非关键数据进行封装得到;Receive a plurality of second data packets sent by the first terminal device, wherein the plurality of second data packets are obtained by the first terminal device encapsulating non-critical data in the interactive data;
按照接收顺序依次对所述多个第二数据包进行解析处理,得到所述非关键数据;Sequentially parse the plurality of second data packets according to the order of reception to obtain the non-critical data;
按照所述非关键数据的展示方式,对所述非关键数据进行展示。Display the non-key data according to the display method of the non-key data.
在本公开的一些实施例中,还包括控制模块,用于:In some embodiments of the present disclosure, a control module is also included for:
基于用户对所述交互数据的展示结果的操作,生成交互控制指令;Generate interactive control instructions based on the user's operation on the display result of the interactive data;
将所述交互控制指令发送至所述第一终端设备,以使所述终端设备继续返回所述交互数据。Send the interaction control instruction to the first terminal device, so that the terminal device continues to return the interaction data.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在第 一方面有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the first aspect of the embodiment of the method, and will not be described in detail here.
根据本公开实施例的第五方面,请参照附图10,其示例性的示出了一种电子设备的框图。例如,装置1000可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。According to the fifth aspect of the embodiment of the present disclosure, please refer to FIG. 10 , which exemplarily shows a block diagram of an electronic device. For example, the device 1000 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like.
参照图10,装置1000可以包括以下一个或多个组件:处理组件1002,存储器1004,电源组件1006,多媒体组件1008,音频组件1010,输入/输出(I/O)的接口1012,传感器组件1014,以及通信组件1016。Referring to Figure 10, the device 1000 may include one or more of the following components: a processing component 1002, a memory 1004, a power supply component 1006, a multimedia component 1008, an audio component 1010, an input/output (I/O) interface 1012, a sensor component 1014, and communications component 1016.
处理组件1002通常控制装置1000的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件1002可以包括一个或多个处理器1020来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1002可以包括一个或多个模块,便于处理组件1002和其他组件之间的交互。例如,处理部件1002可以包括多媒体模块,以方便多媒体组件1008和处理组件1002之间的交互。 Processing component 1002 generally controls the overall operations of device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing element 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 1002 may include one or more modules that facilitate interaction between processing component 1002 and other components. For example, processing component 1002 may include a multimedia module to facilitate interaction between multimedia component 1008 and processing component 1002.
存储器1004被配置为存储各种类型的数据以支持在设备1000的操作。这些数据的示例包括用于在装置1000上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1004可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。 Memory 1004 is configured to store various types of data to support operations at device 1000 . Examples of such data include instructions for any application or method operating on device 1000, contact data, phonebook data, messages, pictures, videos, etc. Memory 1004 may be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EEPROM), Programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
电力组件1006为装置1000的各种组件提供电力。电力组件1006可以包括电源管理***,一个或多个电源,及其他与为装置1000生成、管理和分配电力相关联的组件。 Power component 1006 provides power to various components of device 1000. Power components 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 1000 .
多媒体组件1008包括在所述装置1000和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触控面板(TP)。如果屏幕包括触控面板,屏幕可以被实现为触控屏,以接收来自用户的输入 信号。触控面板包括一个或多个触控传感器以感测触控、滑动和触控面板上的手势。所述触控传感器可以不仅感测触控或滑动动作的边界,而且还检测与所述触控或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件1008包括一个前置摄像头和/或后置摄像头。当装置1000处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。 Multimedia component 1008 includes a screen that provides an output interface between the device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may not only sense the boundary of the touch or sliding operation, but also detect the duration and pressure associated with the touch or sliding operation. In some embodiments, multimedia component 1008 includes a front-facing camera and/or a rear-facing camera. When the device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front-facing camera and rear-facing camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
音频组件1010被配置为输出和/或输入音频信号。例如,音频组件1010包括一个麦克风(MIC),当装置1000处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1004或经由通信组件1016发送。在一些实施例中,音频组件1010还包括一个扬声器,用于输出音频信号。 Audio component 1010 is configured to output and/or input audio signals. For example, audio component 1010 includes a microphone (MIC) configured to receive external audio signals when device 1000 is in operating modes, such as call mode, recording mode, and speech recognition mode. The received audio signals may be further stored in memory 1004 or sent via communications component 1016 . In some embodiments, audio component 1010 also includes a speaker for outputting audio signals.
I/O接口1012为处理组件1002和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 1012 provides an interface between the processing component 1002 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, etc. These buttons may include, but are not limited to: Home button, Volume buttons, Start button, and Lock button.
传感器组件1014包括一个或多个传感器,用于为装置1000提供各个方面的状态评估。例如,传感器组件1014可以检测到装置1000的打开/关闭状态,组件的相对定位,例如所述组件为装置1000的显示器和小键盘,传感器组件1014还可以检测装置1000或装置1000一个组件的位置改变,用户与装置1000接触的存在或不存在,装置1000方位或加速/减速和装置1000的温度变化。传感器组件1014还可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1014还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1014还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。 Sensor component 1014 includes one or more sensors for providing various aspects of status assessment for device 1000 . For example, the sensor component 1014 can detect the open/closed state of the device 1000, the relative positioning of components, such as the display and keypad of the device 1000, and the sensor component 1014 can also detect a change in position of the device 1000 or a component of the device 1000. , the presence or absence of user contact with the device 1000 , device 1000 orientation or acceleration/deceleration and temperature changes of the device 1000 . Sensor assembly 1014 may also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 1014 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件1016被配置为便于装置1000和其他设备之间有线或无线方式的通信。装置1000可以接入基于通信标准的无线网络,如WiFi,2G或3G, 4G或5G或它们的组合。在一个示例性实施例中,通信部件1016经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,所述通信部件1016还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。 Communication component 1016 is configured to facilitate wired or wireless communication between apparatus 1000 and other devices. The device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 1016 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communications. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置1000可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述电子设备的供电方法。In an exemplary embodiment, apparatus 1000 may be configured by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable Gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are implemented for executing the power supply method of the above electronic device.
第六方面,本公开在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1004,上述指令可由装置1000的处理器1020执行以完成上述电子设备的供电方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In a sixth aspect, in an exemplary embodiment, the present disclosure also provides a non-transitory computer-readable storage medium including instructions, such as a memory 1004 including instructions, which can be executed by the processor 1020 of the device 1000 to complete the above. Methods of powering electronic equipment. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure that follow the general principles of the disclosure and include common knowledge or customary technical means in the technical field that are not disclosed in the disclosure. . It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It is to be understood that the present disclosure is not limited to the precise structures described above and illustrated in the accompanying drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the disclosure is limited only by the appended claims.

Claims (30)

  1. 一种数据交互方法,其特征在于,应用于第一终端设备,所述第一终端与第二终端进行投屏交互,所述方法包括:A data interaction method, characterized in that it is applied to a first terminal device, and the first terminal and a second terminal perform screen projection interaction. The method includes:
    获取交互数据中的关键数据,并将所述关键数据封装为M个第一数据包,其中,M为大于1的自然数;Obtain key data in the interactive data, and encapsulate the key data into M first data packets, where M is a natural number greater than 1;
    将所述M个第一数据包中N个第一数据包进行加密处理,并依次发送所述M个第一数据包至所述第二终端设备,其中,N大于等于1,且小于M;Encrypt N first data packets among the M first data packets, and send the M first data packets to the second terminal device in sequence, where N is greater than or equal to 1 and less than M;
    接收所述第二终端设备返回的加密信息,根据所述加密信息确定是否继续发送所述交互数据,其中,所述加密信息由所述第二终端设备对经过加密处理的第一数据包进行解密得到。Receive the encrypted information returned by the second terminal device, and determine whether to continue sending the interactive data according to the encrypted information, wherein the encrypted information is decrypted by the second terminal device on the encrypted first data packet. get.
  2. 根据权利要求1所述的数据交互方法,其特征在于,还包括:The data interaction method according to claim 1, further comprising:
    根据交互控制指令确定交互数据,并获取所述交互数据,以及确定所述交互数据中是否存在关键数据,其中,所述交互控制指令基于用户对所述第一终端设备或所述第二终端设备的操作生成;Determine interaction data according to the interaction control instructions, obtain the interaction data, and determine whether key data exists in the interaction data, wherein the interaction control instructions are based on the user's control of the first terminal device or the second terminal device. The operation generates;
    所述获取交互数据中的关键数据,包括:The key data obtained in the interactive data include:
    响应于所述交互数据中存在关键数据,获取所述交互数据中的关键数据。In response to the existence of key data in the interaction data, the key data in the interaction data is obtained.
  3. 根据权利要求2所述的数据交互方法,其特征在于,所述根据交互控制指令确定交互数据,并获取所述交互数据,包括:The data interaction method according to claim 2, wherein determining the interaction data according to the interaction control instructions and obtaining the interaction data includes:
    根据交互控制指令确定交互数据,以及所述交互数据所属的应用程序;Determine the interaction data according to the interaction control instructions, and the application program to which the interaction data belongs;
    向所述交互数据所属的应用程序获取所述交互数据。Obtain the interaction data from the application program to which the interaction data belongs.
  4. 根据权利要求2所述的数据交互方法,其特征在于,所述确定所述交互数据中是否存在关键数据,包括:The data interaction method according to claim 2, wherein determining whether key data exists in the interaction data includes:
    确定所述交互数据中是否存在属于预设关键数据列表的数据;Determine whether there is data belonging to a preset key data list in the interactive data;
    响应于所述交互数据中存在属于预设关键数据列表的数据,确定所述交互数据中存在关键数据,并确定所述交互数据中,属于所述预设关键数据列表的数据为关键数据;In response to the presence of data belonging to the preset key data list in the interaction data, determining that key data exists in the interaction data, and determining that the data belonging to the preset key data list in the interaction data is the key data;
    响应于所述交互数据中不存在预设关键数据列表中的数据,确定所述交互数据中不存在关键数据。In response to the fact that the data in the preset key data list does not exist in the interaction data, it is determined that the key data does not exist in the interaction data.
  5. 根据权利要求1所述的数据交互方法,其特征在于,所述将所述M个第一数据包中N个第一数据包进行加密处理,包括:The data interaction method according to claim 1, wherein encrypting N first data packets among the M first data packets includes:
    根据所述M和加密比例,确定N;According to the M and encryption ratio, determine N;
    将所述M个第一数据包中的前N个第一数据包进行加密处理。The first N first data packets among the M first data packets are encrypted.
  6. 根据权利要求5所述的数据交互方法,其特征在于,还包括:The data interaction method according to claim 5, further comprising:
    根据所述第一终端设备的计算力和数据传输链路的质量参数,确定所述加密比例。The encryption ratio is determined based on the computing power of the first terminal device and the quality parameters of the data transmission link.
  7. 根据权利要求1所述的数据交互方法,其特征在于,所述将所述M个第一数据包中N个第一数据包进行加密处理,包括:The data interaction method according to claim 1, wherein encrypting N first data packets among the M first data packets includes:
    将加密标识、所述加密信息和第一数据包进行加密处理,得到加密后的第一数据包,其中,所述加密标识用于第二终端设备从所述多个第一数据包中确定经过加密处理的第一数据包。The encrypted identification, the encrypted information and the first data packet are encrypted to obtain an encrypted first data packet, wherein the encrypted identification is used by the second terminal device to determine the process from the plurality of first data packets. Encryption of the first packet processed.
  8. 根据权利要求1所述的数据交互方法,其特征在于,还包括:The data interaction method according to claim 1, further comprising:
    获取所述交互数据中的非关键数据,并将关键数据封装为多个第二数据包,以及将所述多个第二数据包发送至所述第二终端设备,以使所述第二终端设备解析并展示所述非关键数据。Obtain non-critical data in the interaction data, encapsulate the critical data into a plurality of second data packets, and send the plurality of second data packets to the second terminal device, so that the second terminal The device parses and displays the non-critical data.
  9. 根据权利要求1至8任一项所述的数据交互方法,其特征在于,所述交互数据包括视频和/或音频。The data interaction method according to any one of claims 1 to 8, wherein the interaction data includes video and/or audio.
  10. 一种数据交互方法,其特征在于,应用于第二终端设备,包括:A data interaction method, characterized in that it is applied to a second terminal device and includes:
    接收第一终端设备发送的M个第一数据包,其中,所述M个第一数据包由所述第一终端设备对交互数据中的关键数据进行封装得到,所述M个第一数据包中的N个第一数据包经过所述第一终端设备的加密处理,M为大于1的自然数,N大于等于1,且小于M;Receive M first data packets sent by the first terminal device, wherein the M first data packets are obtained by the first terminal device encapsulating key data in the interaction data, and the M first data packets The N first data packets in have been encrypted by the first terminal device, M is a natural number greater than 1, N is greater than or equal to 1, and less than M;
    对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息;Decrypt the encrypted N first data packets to obtain encrypted information;
    将所述加密信息发送至所述第一终端设备,以使所述第一终端设备继续发送所述交互数据。The encrypted information is sent to the first terminal device, so that the first terminal device continues to send the interactive data.
  11. 根据权利要求10所述的数据交互方法,其特征在于,在所述对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息之前,还包括:The data interaction method according to claim 10, characterized in that, before decrypting the encrypted N first data packets to obtain the encrypted information, it further includes:
    将所述M个第一数据包中具有加密标识的第一数据包,确定为经过加密处理的第一数据包。The first data packet with the encryption identifier among the M first data packets is determined as the first data packet that has been encrypted.
  12. 根据权利要求10所述的数据交互方法,其特征在于,对经过加密处理的所述N个第一数据包进行解密处理之后,还包括:The data interaction method according to claim 10, characterized in that, after decrypting the encrypted N first data packets, it further includes:
    按照接收顺序依次对所述M个第一数据包进行解析处理,得到所述关键数据;Analyze and process the M first data packets in sequence according to the order of reception to obtain the key data;
    按照所述关键数据的展示方式,对所述关键数据进行展示。Display the key data according to the display method of the key data.
  13. 根据权利要求10所述的数据交互方法,其特征在于,还包括:The data interaction method according to claim 10, further comprising:
    接收第一终端设备发送的多个第二数据包,其中,所述多个第二数据包由所述第一终端设备对交互数据中的非关键数据进行封装得到;Receive a plurality of second data packets sent by the first terminal device, wherein the plurality of second data packets are obtained by the first terminal device encapsulating non-critical data in the interactive data;
    按照接收顺序依次对所述多个第二数据包进行解析处理,得到所述非关键数据;Sequentially parse the plurality of second data packets according to the order of reception to obtain the non-critical data;
    按照所述非关键数据的展示方式,对所述非关键数据进行展示。Display the non-key data according to the display method of the non-key data.
  14. 根据权利要求10所述的数据交互方法,其特征在于,还包括:The data interaction method according to claim 10, further comprising:
    基于用户对所述交互数据的展示结果的操作,生成交互控制指令;Generate interactive control instructions based on the user's operation on the display result of the interactive data;
    将所述交互控制指令发送至所述第一终端设备,以使所述终端设备继续返回所述交互数据。Send the interaction control instruction to the first terminal device, so that the terminal device continues to return the interaction data.
  15. 一种数据交互装置,其特征在于,应用于第一终端设备,所述第一终端与第二终端进行投屏交互,所述装置包括:A data interaction device, characterized in that it is applied to a first terminal device, and the first terminal and a second terminal perform screen projection interaction. The device includes:
    第一获取模块,用于获取交互数据中的关键数据,并将所述关键数据封装为M个第一数据包,其中,M为大于1的自然数;The first acquisition module is used to acquire key data in the interactive data, and encapsulate the key data into M first data packets, where M is a natural number greater than 1;
    加密模块,用于将所述M个第一数据包中N个第一数据包进行加密处理,并依次发送所述M个第一数据包至所述第二终端设备,其中,N大于等于1,且小于M;An encryption module, configured to encrypt N first data packets among the M first data packets, and send the M first data packets to the second terminal device in sequence, where N is greater than or equal to 1 , and less than M;
    验证模块,用于接收到所述第二终端设备返回的加密信息,根据所述加密信息确定是否继续发送所述交互数据,其中,所述加密信息由所述第二终端设备对经过加密处理的第一数据包进行解密得到。A verification module, configured to receive encrypted information returned by the second terminal device, and determine whether to continue sending the interactive data according to the encrypted information, wherein the encrypted information is processed by the second terminal device. The first data packet is decrypted and obtained.
  16. 根据权利要求15所述的数据交互装置,其特征在于,还包括确定模块,用于:The data interaction device according to claim 15, further comprising a determining module for:
    根据交互控制指令确定交互数据,并获取所述交互数据,以及确定所述交互数据中是否存在关键数据,其中,所述交互控制指令基于用户对所述第一终端设备或所述第二终端设备的操作生成;Determine interaction data according to the interaction control instructions, obtain the interaction data, and determine whether key data exists in the interaction data, wherein the interaction control instructions are based on the user's control of the first terminal device or the second terminal device. The operation generates;
    所述第一获取模块具体用于:The first acquisition module is specifically used for:
    响应于所述交互数据中存在关键数据,获取所述交互数据中的关键数 据。In response to the existence of key data in the interaction data, the key data in the interaction data is obtained.
  17. 根据权利要求16所述的数据交互装置,其特征在于,所述确定模块用于根据交互控制指令确定交互数据,并获取所述交互数据时,具体用于:The data interaction device according to claim 16, wherein the determination module is used to determine interaction data according to interaction control instructions, and when acquiring the interaction data, it is specifically used to:
    根据交互控制指令确定交互数据,以及所述交互数据所属的应用程序;Determine the interaction data according to the interaction control instructions, and the application program to which the interaction data belongs;
    向所述交互数据所属的应用程序获取所述交互数据。Obtain the interaction data from the application program to which the interaction data belongs.
  18. 根据权利要求16所述的数据交互装置,其特征在于,所述确定模块用于确定所述交互数据中是否存在关键数据时,具体用于:The data interaction device according to claim 16, wherein the determination module is used to determine whether key data exists in the interaction data, specifically for:
    确定所述交互数据中是否存在属于预设关键数据列表的数据;Determine whether there is data belonging to a preset key data list in the interactive data;
    响应于所述交互数据中存在属于预设关键数据列表的数据,确定所述交互数据中存在关键数据,并确定所述交互数据中,属于所述预设关键数据列表的数据为关键数据;In response to the presence of data belonging to the preset key data list in the interaction data, determining that key data exists in the interaction data, and determining that the data belonging to the preset key data list in the interaction data is the key data;
    响应于所述交互数据中不存在预设关键数据列表中的数据,确定所述交互数据中不存在关键数据。In response to the fact that the data in the preset key data list does not exist in the interaction data, it is determined that the key data does not exist in the interaction data.
  19. 根据权利要求15所述的数据交互装置,其特征在于,所述加密模块用于将所述M个第一数据包中的N个第一数据包进行加密处理时,具体用于:The data interaction device according to claim 15, wherein the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
    根据所述M和加密比例,确定N;According to the M and encryption ratio, determine N;
    将所述M个第一数据包中的前N个第一数据包进行加密处理。The first N first data packets among the M first data packets are encrypted.
  20. 根据权利要求19所述的数据交互装置,其特征在于,还包括比例模块,用于:The data interaction device according to claim 19, further comprising a proportion module for:
    根据所述第一终端设备的计算力和数据传输链路的质量参数,确定所述加密比例。The encryption ratio is determined based on the computing power of the first terminal device and the quality parameters of the data transmission link.
  21. 根据权利要求15所述的数据交互装置,其特征在于,所述加密模块用于将所述M个第一数据包中N个第一数据包进行加密处理时,具体用于:The data interaction device according to claim 15, wherein the encryption module is used to encrypt N first data packets among the M first data packets, specifically for:
    将加密标识、所述加密信息和第一数据包进行加密处理,得到加密后的第一数据包,其中,所述加密标识用于第二终端设备从所述多个第一数据包中确定经过加密处理的第一数据包。The encrypted identification, the encrypted information and the first data packet are encrypted to obtain an encrypted first data packet, wherein the encrypted identification is used by the second terminal device to determine the process from the plurality of first data packets. Encryption of the first packet processed.
  22. 根据权利要求15所述的数据交互装置,其特征在于,还包括第二获取模块,用于:The data interaction device according to claim 15, further comprising a second acquisition module for:
    获取所述交互数据中的非关键数据,并将关键数据封装为多个第二数据包,以及将所述多个第二数据包发送至所述第二终端设备,以使所述第二终端设备解析并展示所述非关键数据。Obtain non-critical data in the interaction data, encapsulate the critical data into a plurality of second data packets, and send the plurality of second data packets to the second terminal device, so that the second terminal The device parses and displays the non-critical data.
  23. 根据权利要求15至22任一项所述的数据交互装置,其特征在于,所述交互数据包括视频和/或音频。The data interaction device according to any one of claims 15 to 22, wherein the interaction data includes video and/or audio.
  24. 一种数据交互装置,其特征在于,应用于第二终端设备,包括:A data interaction device, characterized in that it is applied to a second terminal device and includes:
    接收模块,用于接收第一终端设备发送的M个第一数据包,其中,所述M个第一数据包由所述第一终端设备对交互数据中的关键数据进行封装得到,所述M个第一数据包中的N个第一数据包经过所述第一终端设备的加密处理,M为大于1的自然数,N大于等于1,且小于M;A receiving module, configured to receive M first data packets sent by the first terminal device, wherein the M first data packets are obtained by the first terminal device encapsulating key data in the interaction data, and the M first data packets are obtained by encapsulating key data in the interactive data. N first data packets among the first data packets have been encrypted by the first terminal device, M is a natural number greater than 1, N is greater than or equal to 1, and less than M;
    解密模块,用于对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息;A decryption module, used to decrypt the encrypted N first data packets to obtain encrypted information;
    发送模块,用于将所述加密信息发送至所述第一终端设备,以使所述第一终端设备继续发送所述交互数据。A sending module, configured to send the encrypted information to the first terminal device, so that the first terminal device continues to send the interactive data.
  25. 根据权利要求24所述的数据交互装置,其特征在于,还包括识别模块,用于:The data interaction device according to claim 24, further comprising an identification module for:
    在所述对经过加密处理的所述N个第一数据包进行解密处理,得到加密信息之前,将所述M个第一数据包中具有加密标识的第一数据包,确定为经过加密处理的第一数据包。Before decrypting the encrypted N first data packets to obtain encrypted information, the first data packet with an encryption identifier among the M first data packets is determined to be the encrypted first data packet. First packet.
  26. 根据权利要求24所述的数据交互装置,其特征在于,还包括第一展示模块,用于:The data interaction device according to claim 24, further comprising a first display module for:
    在所述对经过加密处理的所述N个第一数据包进行解密处理之后,按照接收顺序依次对所述M个第一数据包进行解析处理,得到所述关键数据;After decrypting the encrypted N first data packets, parsing the M first data packets in sequence according to the order of reception to obtain the key data;
    按照所述关键数据的展示方式,对所述关键数据进行展示。Display the key data according to the display method of the key data.
  27. 根据权利要求24所述的数据交互装置,其特征在于,还包括第一展示模块,用于:The data interaction device according to claim 24, further comprising a first display module for:
    接收第一终端设备发送的多个第二数据包,其中,所述多个第二数据包由所述第一终端设备对交互数据中的非关键数据进行封装得到;Receive a plurality of second data packets sent by the first terminal device, wherein the plurality of second data packets are obtained by the first terminal device encapsulating non-critical data in the interactive data;
    按照接收顺序依次对所述多个第二数据包进行解析处理,得到所述非关键数据;Sequentially parse the plurality of second data packets according to the order of reception to obtain the non-critical data;
    按照所述非关键数据的展示方式,对所述非关键数据进行展示。Display the non-key data according to the display method of the non-key data.
  28. 根据权利要求24所述的数据交互装置,其特征在于,还包括控制模块,用于:The data interaction device according to claim 24, further comprising a control module for:
    基于用户对所述交互数据的展示结果的操作,生成交互控制指令;Generate interactive control instructions based on the user's operation on the display result of the interactive data;
    将所述交互控制指令发送至所述第一终端设备,以使所述终端设备继续返回所述交互数据。Send the interaction control instruction to the first terminal device, so that the terminal device continues to return the interaction data.
  29. 一种电子设备,其特征在于,所述电子设备包括存储器、处理器, 所述存储器用于存储可在处理器上运行的计算机指令,所述处理器用于在执行所述计算机指令时基于权利要求1至14中任一项所述的数据交互方法。An electronic device, characterized in that the electronic device includes a memory and a processor, the memory is used to store computer instructions that can be run on the processor, and the processor is used to execute the computer instructions based on the claims. The data interaction method described in any one of 1 to 14.
  30. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述程序被处理器执行时实现权利要求1至14中任一项所述的方法。A computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, the method of any one of claims 1 to 14 is implemented.
PCT/CN2022/091265 2022-05-06 2022-05-06 Data interaction method and apparatus, electronic device, and storage medium WO2023212943A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2022/091265 WO2023212943A1 (en) 2022-05-06 2022-05-06 Data interaction method and apparatus, electronic device, and storage medium
CN202280004232.7A CN116097621A (en) 2022-05-06 2022-05-06 Data interaction method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/091265 WO2023212943A1 (en) 2022-05-06 2022-05-06 Data interaction method and apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2023212943A1 true WO2023212943A1 (en) 2023-11-09

Family

ID=86214309

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/091265 WO2023212943A1 (en) 2022-05-06 2022-05-06 Data interaction method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN116097621A (en)
WO (1) WO2023212943A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190028532A1 (en) * 2016-01-11 2019-01-24 Lg Electronics Inc. Mobile terminal and control method therefor
CN109996097A (en) * 2019-03-12 2019-07-09 广州虎牙信息科技有限公司 A kind of throwing screen method, system and storage device
CN113179555A (en) * 2021-05-19 2021-07-27 北京小米移动软件有限公司 Screen projection method, screen projection device, screen projection system, electronic device, and storage medium
CN113965789A (en) * 2021-12-15 2022-01-21 荣耀终端有限公司 Screen projection method, terminal and communication system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190028532A1 (en) * 2016-01-11 2019-01-24 Lg Electronics Inc. Mobile terminal and control method therefor
CN109996097A (en) * 2019-03-12 2019-07-09 广州虎牙信息科技有限公司 A kind of throwing screen method, system and storage device
CN113179555A (en) * 2021-05-19 2021-07-27 北京小米移动软件有限公司 Screen projection method, screen projection device, screen projection system, electronic device, and storage medium
CN113965789A (en) * 2021-12-15 2022-01-21 荣耀终端有限公司 Screen projection method, terminal and communication system

Also Published As

Publication number Publication date
CN116097621A (en) 2023-05-09

Similar Documents

Publication Publication Date Title
US9819652B2 (en) Information interaction methods and devices
US9769667B2 (en) Methods for controlling smart device
US10193875B2 (en) Method and apparatus for controlling access to surveillance video
US9961393B2 (en) Method and device for playing multimedia file
CN107819572B (en) Command transmission method and device and electronic equipment
KR102244436B1 (en) Application interface display method, apparatus and computer-readable storage medium
US20220382884A1 (en) Method and device for parsing shared password
US9723486B2 (en) Method and apparatus for accessing network
WO2018228051A1 (en) Device access method, apparatus and system
US20170171794A1 (en) Method and apparatus for acquiring routing information
CN108900553B (en) Communication method, device and computer readable storage medium
CN108053241B (en) Data analysis method, device and computer readable storage medium
CN113179555A (en) Screen projection method, screen projection device, screen projection system, electronic device, and storage medium
WO2022205906A1 (en) Data encryption method and apparatus, electronic device and storage medium
US10681533B2 (en) Information writing method and device
WO2023212943A1 (en) Data interaction method and apparatus, electronic device, and storage medium
US11444927B2 (en) Method and apparatus for encrypting data
CN113206832B (en) Data processing method and device and data processing device
CN113225691B (en) Audio processing method, device and storage medium
CN216437496U (en) Screen projection equipment, receiving equipment and screen projection system
CN118041649A (en) Bus encryption communication method, system, device, equipment and readable storage medium
CN116167065A (en) Data security encryption and security decryption method for ciphertext database
CN115473736A (en) Data request message verification method, device, equipment and storage medium
CN115514479A (en) Data information processing method, device and equipment based on block chain

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22940637

Country of ref document: EP

Kind code of ref document: A1