Same-screen connection method and device and electronic equipment
By implementing identity verification processes on both the sending and receiving ends, along with server-side caching and breakpoint resume technologies, the problems of insecure screen sharing and unstable network transmission are solved, enabling secure and reliable screen sharing and file transfer.
Patent Information
- Application Number
- CN202411881301.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-12-12
AI Technical Summary
Existing screen mirroring methods are insecure, easily impersonated by malicious devices, and cannot properly transfer multimedia files when network conditions are unstable.
The identity verification process between the sender and the server includes sending a screen sharing request, analyzing the receiver's information code to obtain a second identity identifier, and performing a second verification on the server to ensure the authenticity of the identity. At the same time, the server caches files and uses breakpoint resume technology to reduce the impact of network fluctuations.
It improves the security of screen mirroring connections, reduces the risk of malicious connections, and ensures the reliability and efficiency of file transfer when the network is unstable.
Smart Images

Figure CN121116218A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of screen mirroring, and in particular to a screen mirroring connection method, device and electronic equipment. BACKGROUND
[0002] With the development of computer technology and the improvement of the public demand for the quality of life, multi-screen interaction, as one of the ways to provide sharing services for multimedia content, can effectively meet the intelligent needs of users for product interaction.
[0003] In the related art, the screen mirroring connection method for realizing multi-screen interaction is not secure. SUMMARY
[0004] Embodiments of the present application provide a screen mirroring connection method, device and electronic equipment, which can at least solve the problem of insecure screen mirroring connection method.
[0005] To solve the above technical problems, the present application is implemented as follows: In a first aspect, the embodiments of the present application provide a screen mirroring connection method applied to a sending end, which comprises: sending a screen mirroring request with a receiving end to a service end, wherein the screen mirroring request carries a first identity of the sending end; obtaining a second identity by analyzing an information code displayed by the receiving end; sending a verification request to the service end, wherein the verification request carries the second identity; receiving a verification result obtained by the service end after verifying the second identity according to the first identity; and establishing a screen mirroring connection with the receiving end if the verification result is a verification pass.
[0006] In a second aspect, a screen mirroring connection method applied to a service end is provided, which comprises: receiving a screen mirroring request with a receiving end sent by a sending end, wherein the screen mirroring request carries a first identity of the sending end; sending the first identity to the receiving end to make the receiving end generate an information code according to the first identity; receiving a verification request sent by the sending end, wherein the verification request carries a second identity identified by the sending end from the information code displayed by the receiving end; obtaining a verification result by verifying the first identity and the second identity; and sending the verification result to the sending end to make the sending end confirm whether to establish a screen mirroring connection with the receiving end.
[0007] In a third aspect, a same-screen connection apparatus is provided, which is applied to a sending end and includes: a first sending module configured to send a same-screen request for a receiving end to a server, wherein the same-screen request carries a first identity of the sending end; an obtaining module configured to obtain a second identity by analyzing an information code displayed by the receiving end; a second sending module configured to send a verification request to the server, wherein the verification request carries the second identity; a receiving module configured to receive a verification result obtained by the server after verifying the second identity according to the first identity; and an establishing module configured to establish a same-screen connection with the receiving end if the verification result is a verification pass.
[0008] In a fourth aspect, a same-screen connection apparatus is provided, which is applied to a server and includes: a first receiving module configured to receive a same-screen request for a receiving end sent by a sending end, wherein the same-screen request carries a first identity of the sending end; a first sending module configured to send the first identity to the receiving end to enable the receiving end to generate an information code according to the first identity; a second receiving module configured to receive a verification request sent by the sending end, wherein the verification request carries a second identity identified by the sending end from the information code displayed by the receiving end; an obtaining module configured to obtain a verification result by verifying the first identity and the second identity; and a second sending module configured to send the verification result to the sending end to enable the sending end to confirm whether to establish a same-screen connection with the receiving end.
[0009] In a fifth aspect, an electronic device is provided, which includes a processor and a memory, the memory stores programs or instructions executable on the processor, and the programs or instructions are executed by the processor to implement the steps of the method according to the first aspect or the second aspect.
[0010] In a sixth aspect, a computer readable storage medium is provided, which stores programs or instructions, and the programs or instructions are executed by a processor to implement the steps of the method according to the first aspect or the second aspect.
[0011] In a seventh aspect, a computer program product is provided, which includes a computer program stored on a non-transitory computer readable storage medium, the computer program includes program instructions, and the program instructions are executed by a computer to cause the computer to perform the steps of the method according to the first aspect or the second aspect.
[0012] The technical solutions provided in the present application can have the following beneficial effects: In this embodiment, the sending end can send a screen-sharing request to the server, wherein the screen-sharing request carries the sending end's first identity identifier; then, by analyzing the information code displayed by the receiving end, a second identity identifier is obtained; next, a verification request carrying the second identity identifier is sent to the server; then, the sending end receives the verification result obtained by the server after verifying the second identity identifier based on the first identity identifier; finally, if the verification result is successful, a screen-sharing connection is established with the receiving end. This two-stage identity verification method ensures the security of screen-sharing and reduces security risks.
[0013] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0014] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0015] Figure 1 A flowchart illustrating a screen-sharing method provided in an embodiment of this application is shown. Figure 2 A flowchart illustrating another screen-sharing method provided in an embodiment of this application is shown; Figure 3 This illustration shows a schematic diagram of screen-sharing connectivity provided in an embodiment of this application; Figure 4 This illustration shows a schematic diagram of identity authentication and file preview provided in an embodiment of this application; Figure 5 A timing diagram of a screen-sharing method provided in an embodiment of this application is shown; Figure 6 A timing diagram of a file preview method provided in an embodiment of this application is shown; Figure 7 This paper shows a schematic diagram of another screen-sharing device provided in an embodiment of this application; Figure 8 This paper shows a schematic diagram of another screen-sharing device provided in an embodiment of this application; Figure 9 This illustration shows a structural schematic diagram of an electronic device provided in an embodiment of this application; Figure 10 A schematic diagram of the structure of another electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0016] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0017] With the development of computer technology and the increasing demand for quality of life, multi-screen interaction, as one of the ways to provide shared multimedia content services, can effectively meet users' intelligent needs for product interaction. As the core of the Internet of Things, multi-screen interaction, through wireless network connections, enables a series of operations such as the transmission, parsing, and display of multimedia content, achieving the goal of sharing content across different terminal devices and realizing media-sharing entertainment interaction.
[0018] In related technologies, server forwarding is commonly used to address the need for multi-screen interaction, enabling the synchronous conversion of files from the source device to the target device. This means that the media file opening process is implemented on the mobile device.
[0019] To enable screen mirroring for multi-screen interaction, one method involves the receiving end reporting device information, including Internet Protocol (IP), port, and user identifier (UID), to the server upon receiving a mirroring request. The server then generates a short link according to preset rules and sends it back to the receiving end. The receiving end generates and displays a corresponding information code. The sending end scans the information code, parses it, and obtains the necessary IP, port, and UID for the connection, thus establishing the mirroring connection. However, this method does not verify that the requesting sending end and the actual connecting mobile device are the same. Therefore, when the information code is exposed to the user, the unrestricted scanning method allows any mobile device to connect via mirroring. If another mobile device scans the code, the original source device will be unable to connect and will be forced to abandon the screen mirroring process.
[0020] In related technologies, there is a multi-screen interaction method where a first terminal collects the identification information of a second terminal and sends the identification information to a server; the first terminal also sends multimedia file source information to the server, so that the server sends the multimedia file source information to the second terminal based on the identification information, and the second terminal plays the multimedia file based on the multimedia file source information. This method enables multi-screen interaction between terminals using different networks. However, in implementation, the mobile terminal needs to have the ability to open multimedia files. If the application has high requirements for the mobile terminal, such as an Office file, a third-party software development kit (SDK) or application is needed to open it. If the mobile terminal does not have the relevant application pre-installed, the multimedia file cannot be opened normally, which is unacceptable to users. Furthermore, when the source device transmits data to the target device through a server, due to the lack of caching capabilities on the device, transmission failure is highly likely in weak network conditions, preventing users from opening multimedia files normally.
[0021] Figure 1 This application illustrates a screen-sharing method provided by an exemplary embodiment, applied at a sending end. The sending end corresponds to a mobile terminal source device, which can be a mobile phone, tablet, or other device. Figure 1 As shown, the method mainly includes the following steps: S101: Send a screen mirroring request to the server and the receiver.
[0022] The screen sharing request carries the first identity identifier of the sending end.
[0023] In this embodiment, the sending end can send a screen-sharing request to the server, indicating that the sending end wishes to establish a screen-sharing connection with the receiving end. The screen-sharing request can carry the sending end's first identity identifier, which may include the sending end's IP address and User ID. The User ID can serve as a unique identifier for the sending end and, in practical applications, can consist of numbers, letters, or other characters. In this embodiment, using a User ID helps reduce the possibility of identity theft. By sending a screen-sharing request carrying the first identity identifier to the server, the server can obtain the sending end's first identity identifier, facilitating identity verification, ensuring identity authenticity, and thus improving the security of the screen-sharing connection. Compared to the direct communication connection between the sending end and the receiving end in related technologies, this embodiment can achieve screen-sharing data transmission between the sending end and the receiving end through the server.
[0024] In this embodiment, before the sending end sends a screen-sharing request to the server, the receiving end has already established a communication link with the server. During device initialization, the receiving end actively establishes the corresponding communication connection. For example, after turning on the TV, it actively enters the network environment and has the ability to communicate with the server. The screen-sharing request from the sending end can be generated according to the user's needs. When there is a screen-sharing requirement, a request can be sent to the server.
[0025] S102: Obtain the second identity identifier by analyzing the information code displayed by the receiving end.
[0026] In this embodiment, the sending end can analyze the information code displayed by the receiving end to obtain a second identity identifier. This information code is generated by the receiving end based on the first identity identifier sent by the server. In practical applications, the information code can be a QR code, a 3D code, or other types of codes; this embodiment does not impose specific limitations. Identity verification can be performed using the second identity identifier, avoiding accidental connections and improving the security of screen-sharing connections.
[0027] In one optional implementation, the step of analyzing the information code displayed by the receiving end to obtain the second identity identifier may include the following steps: Step 1: By recognizing the information code, the encrypted data within the information code is obtained. In this embodiment, the sending end can scan and recognize the information code displayed by the receiving end to obtain the encrypted data within the information code. Obtaining the encrypted data indicates that parameter data involved in the identity authentication process is encrypted, which helps to further improve data security.
[0028] Step 2: Decrypt the encrypted data using preset rules to obtain the second identity identifier. In this embodiment, the sending end can decrypt the encrypted data using preset rules to obtain the second identity identifier. In this embodiment, the preset rules of the sending end are consistent with the preset rules of the server, and the specific form of the preset rules is not specifically limited in this embodiment. After obtaining the second identity identifier, secondary authentication can be performed to improve the security of the screen-sharing connection. In this embodiment, the information code displayed by the receiving end includes the second identity identifier, which includes a User ID, not the IP address, port, or other information of the receiving end. The sending end will not directly establish a screen-sharing connection with the receiving end. If other terminals obtain encrypted data by scanning the information code displayed by the receiving end, they will not be able to establish a screen-sharing connection with the receiving end, which will not affect the establishment of a screen-sharing connection between the sending end and the receiving end, thus helping to improve the security of the screen-sharing connection. The second identity identifier in this embodiment may also include an IP address, which is not specifically limited in this embodiment.
[0029] S103: Send a verification request to the server.
[0030] The verification request carries the second identity identifier.
[0031] In this embodiment, the sending end can send a verification request carrying a second identity verification to the server, so that the server can verify the second identity verification based on the first identity verification. By verifying whether the UserID after parsing the information code is the same as the originally stored User ID, malicious tampering with the information contained in the information code can be prevented, which helps to ensure the authenticity of the identity and reduce the security risks of screen sharing.
[0032] S104: Receive the verification result obtained by the server after verifying the second identity identifier based on the first identity identifier.
[0033] In this embodiment, the sending end can receive the verification result obtained by the server after verifying the second identity identifier based on the first identity identifier, and then determine whether to connect on the same screen based on the verification result. This secondary verification of the identity identifier further enhances the security of screen sharing.
[0034] S105: If the verification result is successful, establish a screen-sharing connection with the receiving end.
[0035] In this embodiment, if the verification result is successful, the sending end can establish a screen-sharing connection with the receiving end, enter the screen-sharing state with the receiving end, and obtain the cloud-based interface; if the verification result is unsuccessful, the screen-sharing request fails, the sending end cannot establish a screen-sharing connection with the receiving end, and will not enter the screen-sharing state with the receiving end. This can improve the security of screen-sharing and reduce the security risks associated with screen-sharing.
[0036] In an optional implementation, after establishing a screen-sharing connection with the receiving end, the method may further include the following steps: Step 1: In response to a file preview request, send a file message containing the file to be previewed to the server. In this embodiment, the sending end can respond to a user-initiated file preview request by sending a file message carrying the file identifier of the file to be previewed to the server. The file to be previewed can be a text file, an office file, an image, music, video, etc., and this embodiment does not specifically limit this. The file message may include the file type of the file to be previewed, and may also include the file identifier of the file to be previewed, such as a hash code or other file identifier that can identify a file. The specific form of the file identifier is not specifically limited in this embodiment. Step 2: Receive the cached file node of the file to be previewed sent by the server. In this embodiment, the server can cache and store the file to be previewed. Due to network or other reasons, the file to be previewed may be partially stored on the server or may not have been uploaded to the server yet. The sending end can receive the cached file node of the file to be previewed sent by the server. The cached file node can indicate the specific storage status of the file to be previewed on the server or indicate that the file to be previewed has not yet been cached on the server.
[0037] Step 3: Send the file to be previewed to the server according to the cached file node; In this embodiment of the application, the sending end can send the file to be previewed to the server according to the cached file node, that is, transmit the content of the file to be previewed after the cached file node to the server, or transmit the complete file to be previewed, so that the server can obtain the complete file to be previewed.
[0038] Step 4: Receive the preview notification sent by the server; In this embodiment of the application, the sending end can receive the preview notification sent by the server, which can be used to indicate that the sending end can perform file preview based on screen sharing connection with the receiving end.
[0039] Step 5: In response to the preview operation on the file to be previewed, send an operation instruction for the file to be previewed to the server. In this embodiment, the sending end can respond to the user's preview operation on the file to be previewed by sending an operation instruction for the file to be previewed to the server, such as swiping the page, switching media files, pausing or playing audio or video files, etc. In this embodiment, placing the display and operation of the file preview on the server can avoid the problem of insufficient ability of the sending end to open multimedia files. At the same time, the server displaying the preview file can solve the problem of excessive bandwidth consumption during file transmission between the two ends, as well as the problems of unstable transmission and untimely preview caused by insufficient network stability.
[0040] In one optional implementation, the sending end can use a resume-on-break technique to transfer the file to be previewed to the server. Resume-on-break means that if the file transfer is interrupted due to network failure or other reasons, the upload or download can resume from where it left off, without having to restart the entire file transfer process. This technology can significantly improve the efficiency and reliability of file transfer, especially when handling large files.
[0041] In an optional implementation, after the transmission is complete, the sending end can also receive a success flag sent by the server, which indicates that the transmission of the file to be previewed has been successfully completed.
[0042] In this embodiment of the application, the file to be previewed can be transferred from the sending end to the server. By changing the storage location of the file to be previewed, the memory resources of the sending end can be released, thus alleviating the problem of excessive memory resource occupation.
[0043] In this embodiment, the sending end can send a screen-sharing request to the server, wherein the screen-sharing request carries the sending end's first identity identifier; then, by analyzing the information code displayed by the receiving end, a second identity identifier is obtained; next, a verification request carrying the second identity identifier is sent to the server; then, the sending end receives the verification result obtained by the server after verifying the second identity identifier based on the first identity identifier; finally, if the verification result is successful, a screen-sharing connection is established with the receiving end. This two-stage identity verification method ensures the security of screen-sharing and reduces screen-sharing security risks.
[0044] Figure 2 This application illustrates an exemplary embodiment of a screen-sharing method applied to a server. For example... Figure 2 As shown, the method mainly includes the following steps: S201: Receive the screen mirroring request sent by the sender.
[0045] The screen sharing request carries the first identity identifier of the sending end.
[0046] In this embodiment, the server can receive a screen-sharing request sent by the sender, carrying the sender's first identity identifier. The first identity identifier may include the sender's IP address and User ID. This embodiment enables screen-sharing data transmission between the sender and receiver via the server. The screen-sharing request indicates that the sender wishes to establish a screen-sharing connection with the receiver. In this embodiment, before receiving the screen-sharing request, the server has already established a communication link with the receiver and received the receiver's IP address. The server can further enhance the security of screen-sharing and reduce security risks by verifying the obtained identity identifier.
[0047] S202: Send the first identity identifier to the receiving end so that the receiving end generates an information code based on the first identity identifier.
[0048] In this embodiment, the server can save a first identity identifier and then send it to the receiving end, so that the receiving end can generate an information code based on the first identity identifier. This facilitates secondary verification of the identity identifier and improves the security of simultaneous screen connections.
[0049] In an optional implementation, sending the first identity identifier to the receiving end may include the following steps: Step 1: Encrypt the first identity identifier using preset rules. In this embodiment, the server can encrypt the first identity identifier using preset rules, which can further improve data security. In practical applications, the preset rules used by the server are consistent with those used by the sender, and the specific form of the preset rules is not specifically limited in this embodiment.
[0050] Step 2: Send the encrypted first identity identifier to the receiving end. In this embodiment, the server can send the encrypted first identity identifier to the receiving end, which helps to improve the security of screen-sharing connections.
[0051] S203: Receive the verification request sent by the sending end.
[0052] The verification request carries a second identity identifier that the sending end recognizes from the information code displayed by the receiving end.
[0053] In this embodiment, the server can receive a verification request sent by the sender, wherein the verification request carries a second identity identifier identified by the sender from the information code displayed by the receiver. The second identity identifier in this embodiment includes a User ID and may also include an IP address. The server can perform two-factor authentication, which helps ensure the authenticity of the identity.
[0054] S204: By verifying the first identity identifier and the second identity identifier, the verification result is obtained.
[0055] In this embodiment, the server can verify the first identity identifier and the second identity identifier to obtain a verification result. During the verification process, the server can synchronously compare the first identity identifier carried in the screen sharing request with the second identity identifier carried in the verification request to obtain a verification result. By verifying whether the User ID after parsing the information code is the same as the originally stored User ID, malicious tampering with the information code can be prevented. If the first identity identifier and the second identity identifier are the same, the verification result is "verification passed"; if the first identity identifier and the second identity identifier are different, the verification result is "verification failed". The server's verification of the first identity identifier and the second identity identifier helps to improve the security of screen sharing.
[0056] S205: Send the verification result to the sending end so that the sending end can confirm whether to establish a screen-sharing connection with the receiving end.
[0057] In this embodiment, the server can send the final verification result back to the sender. When the verification result is successful, the sender and receiver enter a screen-sharing state; when the verification result is unsuccessful, the screen-sharing request is rejected. By performing a secondary verification of the sender's identity, the server further enhances the security of establishing a screen-sharing connection between the sender and receiver, thereby reducing screen-sharing security risks.
[0058] In an optional implementation, after sending the verification result to the sender, the method further includes the following steps: Step 1: Receive the file message of the file to be previewed sent by the sending end. In this embodiment, the server can receive the file message of the file to be previewed sent by the sending end. The file to be previewed can be a text file, an office file, an image, music, video, etc., and this embodiment does not specifically limit the type. The file message of the file to be previewed may include the file type of the file to be previewed, and may also include the file identifier of the file to be previewed, such as a hash code, which can identify the file. The specific form of the file identifier is not specifically limited in this embodiment. Step 2: Based on the file message, obtain the cached file node of the file to be previewed and send the cached file node of the file to be previewed to the sending end; In this embodiment of the application, the server can obtain the cache status and cached file node of the file to be previewed based on the file message, and then send the cached file node of the file to be previewed to the sending end.
[0059] Step 3: Receive the file to be previewed sent by the sending end. In this embodiment, the server can receive the data stream of the file to be previewed sent by the sending end, store it in a cache, and generate the final file to be previewed, facilitating previewing of the file on the server. In this embodiment, after receiving the file to be previewed sent by the sending end, the server can return a success flag to the sending end, indicating that the transmission of the file to be previewed has been successfully completed.
[0060] Step 4: Use a preview application to parse the file to be previewed; In this embodiment of the application, the server can use a preview application (APP) to parse the file to be previewed, which does not rely on third-party applications to open it, nor does it rely on third-party SDKs, which can effectively reduce the dependence on terminal performance.
[0061] Step 5: Send a previewable notification to the sending end; In this embodiment of the application, the server can send a previewable notification to both the sending end and the receiving end, so that the receiving end and the sending end can simultaneously perform real-time preview and operation of the file to be previewed.
[0062] Step 6: Receive the operation instruction for the file to be previewed sent by the sending end, so that the preview application can parse and execute the operation instruction, thereby enabling the sending end and the receiving end to preview the file on the same screen. In this embodiment, the server can receive the operation instruction and forward it to the preview application, so that the preview application can parse and execute the operation instruction, thereby enabling the sending end and the receiving end to preview the file on the same screen.
[0063] In this embodiment, for step 2 above, the server can obtain the cache status and cache file node of the file to be previewed based on the file message. In practical applications, the cache status can be divided into three types: the first is that the file to be previewed has been completely cached on the server, in which case step 3 can be omitted; the second is that the file to be previewed has never been cached on the server, in which case the cache file node can be used to instruct the sender to transmit the complete file to be previewed; the third is that the file to be previewed was uploaded to the server, but was not completely uploaded due to network or other reasons, in which case the cache file node can indicate the specific storage status of the file to be previewed on the server, i.e., the node of the last transmission, so that the sender can send the remaining part of the file to be previewed to the server.
[0064] In this embodiment of the application, for step 4 above, the server can start the preview APP and pass in the file information of the file to be previewed; after the preview APP starts, it can parse the file information and open the corresponding preview interface according to the file type, such as opening the Office file preview interface, the audio and video file playback interface, etc.; and then it can receive the successful result of the file opening action returned by the preview APP.
[0065] In this embodiment, the preview app can be written internally and pre-installed on the server. The preview interface includes interfaces for text files, Office files, images, music, videos, etc. It does not rely on third-party applications or SDKs to open the file. When performing related operations, only operation commands need to be sent at the sending or receiving end to manipulate files in real time, such as zooming in on images, switching music playlists, pausing, or dragging the video progress bar. In this embodiment, file upload caching capabilities can be provided, allowing files to be quickly opened in every subsequent preview after only one transmission, avoiding lengthy file transfer processes each time, thus saving user time, data usage, and memory.
[0066] In this embodiment, the server can receive a screen-sharing request from a sender, wherein the screen-sharing request carries a first identity identifier of the sender; send the first identity identifier to the receiver so that the receiver generates an information code based on the first identity identifier; receive a verification request from the sender, wherein the verification request carries a second identity identifier identified by the sender from the information code displayed on the receiver; verify the first identity identifier and the second identity identifier to obtain a verification result; and send the verification result to the sender so that the sender confirms whether to establish a screen-sharing connection with the receiver. By performing a secondary verification of the sender's identity identifier, the server further enhances the security of screen-sharing and reduces security risks associated with it.
[0067] The screen-sharing method for the sending end described in the embodiments of this application (such as...) Figure 1 (as shown) and the server-side screen mirroring connection method (such as...) Figure 2 The overall process (as shown) can be achieved through... Figure 3 To demonstrate, Figure 3 A screen mirroring connection device is illustrated. The device includes modules such as a transmitter, a receiver, and a server, where the transmitter corresponds to a mobile terminal source device and the receiver corresponds to a television (TV) target device. The device may include the following steps: Step 1: Establish a connection; the receiving end can establish a communication link with the server.
[0068] Step 2, Screen Sharing Request; The sending end can send a screen sharing request to the server, wherein the screen sharing request carries the sending end's first identity identifier; Step 3: Encrypt data on the same screen; the server can send the encrypted first identity to the receiving end; Step 4: Scan the QR code; the sending end can scan the QR code from the receiving end to obtain the second identity identifier; Step 5: Verification Request; The sending end can send a verification request carrying a second identity identifier to the server; Step 6: Return the verification result; The server can return the verification result to the sender so that the sender can determine whether to establish a screen-sharing connection with the receiver based on the verification result.
[0069] In this embodiment, after establishing the data communication link, when the sending end sends a screen-sharing request to the server, the server records the sending end's first identity identifier and encrypts and forwards it to the receiving end. The receiving end can display the encrypted data on the TV side as a QR code. The sending end scans the QR code, decrypts the encrypted data according to preset rules, and requests screen-sharing verification from the server again. The server verifies the second request and returns the final verification result to the sending end. By performing a second verification of the sending end's identity identifier, the server further enhances the security of screen-sharing and reduces screen-sharing security risks.
[0070] In the process of implementing file preview in the embodiments of this application, such as Figure 4 As shown, the process can include two stages: identity authentication and file preview. Identity authentication establishes a communication link between the mobile terminal and the target TV device (establishing a screen-sharing connection between the sender and receiver). Subsequently, cloud file preview is performed based on the established communication link. During the identity authentication stage of establishing the communication link, login and authentication between the sender, receiver, and server can be performed through secondary verification of identity identifiers. By authenticating identity identifiers, the occurrence of identity forgery is reduced, and security is improved.
[0071] Figure 5 This is a timing diagram of a screen-sharing process provided in an embodiment of this application, which includes the following steps: Step 1: Establish a communication link; a communication connection can be established between the receiving end and the server, and after the receiving end connects to the server, it sends the IP address to the server.
[0072] Step 2: Initiate a screen mirroring request containing IP / UserID; the mobile terminal sends a screen mirroring request containing the source device's IP address and UserID to the server.
[0073] Step 3: Encrypt data during screen mirroring; The server saves the source device IP address and UserID in the screen mirroring request, and encrypts the stored data using preset rules to obtain encrypted data, which is then sent to the receiving end.
[0074] Step 4: Generate and display a QR code; the receiving end can receive encrypted data and display it in the form of a QR code.
[0075] Step 5: Scan the QR code; mobile devices can scan and recognize the QR code.
[0076] Step 6: Obtain QR code information; Mobile terminals can obtain the data in the QR code by scanning and recognizing it.
[0077] Step 7: Decrypt to obtain decrypted data; the mobile terminal can use preset rules to perform data decryption and obtain decrypted data.
[0078] Step 8: Verify IP / UserID; After obtaining the decrypted data, the mobile terminal sends a request for data verification to the server again, and performs identity authentication through secondary verification; the verification data includes the UserID.
[0079] Step 9: Return the verification result; During the verification process, the server synchronously compares the UserId of the source device in the previous request record. If they match, the verification passes; otherwise, it fails. The server then returns the final comparison result to the mobile terminal.
[0080] Step 10: Verification failed; the next step is screen mirroring request failed.
[0081] Step 11: Verification passed. The next step is to enter the screen mirroring state and obtain the cloud interface.
[0082] After completing identity authentication and entering screen mirroring mode, you will enter the cloud file preview stage, such as... Figure 6 As shown, it includes the following steps: Step 1: Request to open file and send file information; The mobile user initiates a file preview request and sends a message to the server about the file to be opened; Step 2: Parse file information to obtain the current file cache status and nodes; The server receives the file preview request message, parses it, and obtains the current file cache status and nodes; Step 3: Return to the current file transfer node; the server returns the current file node to the mobile terminal for marking. Step 4: Resume file transfer from interrupted point based on the transmission node; the mobile terminal resumes file transfer from interrupted point to the server based on the file node. Step 5: Receive the data stream, store it in the buffer, and generate the final file; Step 6: File reception complete, return success identifier code; Step 7: Launch the app and pass in the file information; Step 8: Parse the file type and open the corresponding preview interface; After the preview app starts, it parses the file information and opens the corresponding preview interface according to the file type; for example, it opens the preview interface for Office files, the playback interface for audio and video files, etc. Step 9: Return to the preview interface; the action was successful. Step 10: Notify the terminal that the file has been successfully opened and can be previewed in real time; Step 11: Notify TV that the file has been successfully opened and can be previewed in real time; Step 12: Send operation commands as needed; The TV and mobile terminals can simultaneously preview and operate files in real time. Both can send operation commands to the server, such as swiping pages, switching media files, pausing or playing audio and video files, etc. Step 13, relay operation instructions; the server forwards the operation instructions, only forwarding the data of the operation instructions. Step 14: Parse and execute the operation instructions. The preview app can parse and execute operation instructions.
[0083] In this embodiment, the overall file processing process responds to the needs of cloud applications, placing the overall file function in a cloud-based APP. The sending and receiving ends only send instructions and receive images, effectively reducing the dependence on terminal performance.
[0084] The embodiments provided in this application Figure 1 The screen mirroring connection method shown can be executed by the following entities: Figure 7 The screen mirroring connection device is shown. This application embodiment uses the screen mirroring connection device to execute the screen mirroring connection method as an example to illustrate the screen mirroring connection device provided in this application embodiment.
[0085] Figure 7 This application shows a schematic diagram of the structure of a screen mirroring device provided in an exemplary embodiment, which can achieve the following: Figure 1 The screen-sharing connection device, as shown in all or part of the embodiments, includes: a first sending module 701, an acquisition module 702, a second sending module 703, a receiving module 704, and an establishment module 705.
[0086] In this embodiment, the first sending module 701 is used to send a screen-sharing request to the server and the receiving end, wherein the screen-sharing request carries a first identity identifier of the sending end; the obtaining module 702 is used to obtain a second identity identifier by analyzing the information code displayed by the receiving end; the second sending module 703 is used to send a verification request to the server, wherein the verification request carries the second identity identifier; the receiving module 704 is used to receive the verification result obtained by the server after verifying the second identity identifier according to the first identity identifier; and the establishing module 705 is used to establish a screen-sharing connection with the receiving end if the verification result is successful.
[0087] In an optional implementation, when the acquisition module 702 is used to obtain the second identity identifier by analyzing the information code displayed by the receiving end, it is specifically used for: By identifying the information code, the encrypted data in the information code can be obtained; The second identity identifier is obtained by decrypting the encrypted data using preset rules.
[0088] In an optional implementation, the setup module 705 is further configured to send a file message of the file to be previewed to the server in response to a file preview request; Receive the cached file node of the file to be previewed sent by the server; Based on the cached file node, the file to be previewed is sent to the server; Receive a previewable notification sent by the server; In response to the preview operation of the file to be previewed, an operation instruction for the file to be previewed is sent to the server.
[0089] The screen-sharing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0090] The screen-sharing device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0091] The screen-sharing device provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0092] The embodiments provided in this application Figure 2 The screen mirroring connection method shown can be executed by the following entities: Figure 8The screen mirroring connection device is shown. This application embodiment uses the screen mirroring connection device to execute the screen mirroring connection method as an example to illustrate the screen mirroring connection device provided in this application embodiment.
[0093] Figure 8 This application shows a schematic diagram of the structure of a screen mirroring device provided in an exemplary embodiment, which can achieve the following: Figure 2 The screen-sharing device, as shown in the embodiments, includes all or part of the following components: a first receiving module 801, a first sending module 802, a second receiving module 803, an acquisition module 804, and a second sending module 805.
[0094] In this embodiment, a first receiving module 801 is used to receive a screen-sharing request sent by a sending end, wherein the screen-sharing request carries a first identity identifier of the sending end; a first sending module 802 is used to send the first identity identifier to the receiving end, so that the receiving end generates an information code based on the first identity identifier; a second receiving module 803 is used to receive a verification request sent by the sending end, wherein the verification request carries a second identity identifier identified by the sending end from the information code displayed by the receiving end; an obtaining module 804 is used to obtain a verification result by verifying the first identity identifier and the second identity identifier; and a second sending module 805 is used to send the verification result to the sending end, so that the sending end confirms whether to establish a screen-sharing connection with the receiving end.
[0095] In an optional implementation, when the first sending module 802 is used to send the first identity identifier to the receiving end, it is specifically used for: The first identity identifier is encrypted using preset rules; The encrypted first identity identifier is sent to the receiving end.
[0096] In an optional implementation, the second transmitting module 805 is further configured to: Receive the file message for the file to be previewed sent by the sending end; Based on the file message, obtain the cache file node of the file to be previewed and send the cache file node of the file to be previewed to the sending end; Receive the file to be previewed sent by the sending end; The file to be previewed is parsed using a preview application; Send a preview notification to the sending end; The system receives operation instructions for the file to be previewed sent by the sending end, so that the preview application can parse and execute the operation instructions, thereby enabling the sending end and the receiving end to preview the file on the same screen.
[0097] The screen-sharing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0098] The screen-sharing device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0099] The screen-sharing device provided in this application embodiment can achieve... Figure 2 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0100] Optionally, such as Figure 9 As shown, this application embodiment also provides an electronic device 900, including a processor 901 and a memory 902. The memory 902 stores a program or instructions that can run on the processor 901. When the program or instructions are executed by the processor 901, they implement the above-mentioned... Figure 1 The screen sharing connection method shown or Figure 2 The steps of the screen-sharing method shown are all applicable and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0101] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0102] Figure 10This application illustrates a structural block diagram of another electronic device 1000 according to an exemplary embodiment. The electronic device 1000 can be implemented as a smartphone, tablet computer, laptop computer, desktop computer, smartwatch, and television, etc. The electronic device 1000 may also be referred to as a user device, portable terminal, laptop terminal, desktop terminal, or other names.
[0103] Typically, electronic device 1000 includes a processor 1001 and a memory 1002.
[0104] Processor 1001 may include one or more processing cores, such as a quad-core processor, a deca-core processor, etc. Processor 1001 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1001 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1001 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 1001 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0105] The memory 1002 may include one or more computer-readable storage media, which may be non-transitory. The memory 1002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1002 is used to store at least one instruction, which is executed by the processor 1001 to implement all or part of the steps in the screen-sharing method shown in the method embodiments of this application.
[0106] In some embodiments, the electronic device 1000 may optionally include a peripheral device interface 1003 and at least one peripheral device. The processor 1001, memory 1002, and peripheral device interface 1003 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1003 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1004, a display screen 1005, a camera assembly 1006, an audio circuit 1007, and a power supply 1008.
[0107] In some embodiments, the electronic device 1000 further includes one or more sensors 1009. The one or more sensors 1009 include, but are not limited to: an acceleration sensor 1010, a gyroscope sensor 1011, a pressure sensor 1012, an optical sensor 1013, and a proximity sensor 1014.
[0108] Those skilled in the art will understand that Figure 10 The structure shown does not constitute a limitation on the electronic device 1000, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0109] This application also provides a computer-readable storage medium storing a program or instructions that, when executed by a processor, implement the above-described functionality. Figure 1 The screen sharing connection method shown or Figure 2 The various processes of the screen-sharing method shown here achieve the same technical effect, and to avoid repetition, they will not be described in detail here.
[0110] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0111] This application embodiment also provides a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the above. Figure 1 The screen sharing connection method shown or Figure 2 The various processes of the screen-sharing method shown here achieve the same technical effect, and to avoid repetition, they will not be described in detail here.
[0112] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0113] This application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, implement the above-described functionality. Figure 1 The screen sharing connection method shown or Figure 2 The steps of the screen-sharing method shown are the same and can achieve the same technical effect. To avoid repetition, they will not be repeated here.
[0114] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the claims.
[0115] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A screen-sharing method, applied at the sending end, characterized in that, include: Send a screen-sharing request to the server and the receiving end, wherein the screen-sharing request carries the first identity identifier of the sending end; The second identity identifier is obtained by analyzing the information code displayed by the receiving end; Send a verification request to the server, wherein the verification request carries the second identity identifier; Receive the verification result obtained by the server after verifying the second identity identifier based on the first identity identifier; If the verification result is successful, a screen-sharing connection is established with the receiving end.
2. The method according to claim 1, characterized in that, The step of analyzing the information code displayed by the receiving end to obtain the second identity identifier includes: By identifying the information code, the encrypted data in the information code can be obtained; The second identity identifier is obtained by decrypting the encrypted data using preset rules.
3. The method according to claim 2, characterized in that, After establishing a screen-to-screen connection with the receiving end, the method further includes: In response to a file preview request, a file message for the file to be previewed is sent to the server; Receive the cached file node of the file to be previewed sent by the server; Based on the cached file node, the file to be previewed is sent to the server; Receive a previewable notification sent by the server; In response to the preview operation of the file to be previewed, an operation instruction for the file to be previewed is sent to the server.
4. A screen-sharing method, applied on a server side, characterized in that, include: The receiving end receives a screen mirroring request sent by the sending end, wherein the screen mirroring request carries the first identity identifier of the sending end; The first identity identifier is sent to the receiving end so that the receiving end generates an information code based on the first identity identifier; The sender receives a verification request, wherein the verification request carries a second identity identifier that the sender identifies from the information code displayed by the receiver. The verification result is obtained by verifying the first identity identifier and the second identity identifier; The verification result is sent to the sending end so that the sending end can confirm whether to establish a screen-sharing connection with the receiving end.
5. The method according to claim 4, characterized in that, Sending the first identity identifier to the receiving end includes: The first identity identifier is encrypted using preset rules; The encrypted first identity identifier is sent to the receiving end.
6. A screen-sharing connection device, applied at the sending end, characterized in that, include: The first sending module is used to send a screen sharing request between the sending and receiving ends to the server, wherein the screen sharing request carries the first identity identifier of the sending end; The acquisition module is used to obtain a second identity identifier by analyzing the information code displayed by the receiving end; The second sending module is used to send a verification request to the server, wherein the verification request carries the second identity identifier; The receiving module is used to receive the verification result obtained by the server after verifying the second identity identifier based on the first identity identifier; A module is established to establish a screen-to-screen connection with the receiving end if the verification result is successful.
7. A screen mirroring connection device, applied on a server side, characterized in that, include: The first receiving module is used to receive a screen sharing request sent by the sending end and the receiving end, wherein the screen sharing request carries the first identity identifier of the sending end; The first sending module is used to send the first identity identifier to the receiving end, so that the receiving end generates an information code based on the first identity identifier; The second receiving module is used to receive a verification request sent by the sending end, wherein the verification request carries a second identity identifier that the sending end identifies from the information code displayed by the receiving end; The acquisition module is used to obtain the verification result by verifying the first identity identifier and the second identity identifier; The second sending module is used to send the verification result to the sending end, so that the sending end can confirm whether to establish a screen-sharing connection with the receiving end.
8. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the steps of the screen mirroring method as described in any one of claims 1 to 3 or the screen mirroring method as described in any one of claims 4 to 5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the screen mirroring method as described in any one of claims 1 to 3 or the screen mirroring method as described in any one of claims 4 to 5.
10. A computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program including program instructions that, when executed by a computer, cause the computer to perform the steps of the screen mirroring method as described in any one of claims 1 to 3 or the screen mirroring method as described in any one of claims 4 to 5.