Cloud screen projection method and device and terminal equipment
By obtaining the network information of the cloud screen projection device, the transmission path is automatically adjusted. If the device is in the same LAN, it adopts direct connection. If it is not in the same LAN, a P2P connection is established, which solves the problem of the existing cloud screen projection method that consumes a high consumption and does not consider the network. The problem of environmental differences has achieved the effect of reducing operational costs and improving data transmission efficiency.
Patent Information
- Application Number
- CN202411516270.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-07
AI Technical Summary
The existing cloud screen projection method consumes a large amount of cloud service bandwidth during each screen projection, resulting in high operating costs. It depends on cloud service bandwidth for data transmission regardless of the differences in network environment between devices.
By obtaining the network information of the cloud screen projection device, the transmission path is automatically adjusted. If the device is in the same LAN, it uses direct connection. If it is not in the same LAN, a P2P connection is established to avoid using cloud service bandwidth.
It reduces the operating cost of the cloud screen projection method, optimizes the utilization of network resources, reduces unnecessary bandwidth and waste of computing resources, and improves the efficiency of data transmission and the user's real-time operation experience.
Smart Images

Figure CN119402697A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission technology, and in particular to a cloud screen projection method, device and terminal equipment. Background Art
[0002] Cloud screen projection is a screen projection solution based on cloud computing technology, which allows users to project multimedia content such as audio, video, and pictures from one device, such as a mobile phone, tablet, or computer, to another device for playback via the Internet. Its main principle is to transmit and process content through a cloud server, thereby realizing the screen projection function across devices and platforms.
[0003] The existing cloud screen projection methods consume a lot of cloud service bandwidth each time the screen is projected, which leads to high operating costs. In addition, the traditional cloud screen projection methods usually do not consider the network environment differences between devices. Even if the devices are in the same local area network or can achieve data transmission through P2P connection, they still rely on cloud service bandwidth for data transmission. Summary of the invention
[0004] The present invention provides a cloud screen projection method, device and terminal equipment to automatically adjust the transmission path of the cloud screen projection based on the network environment, avoid using the cloud service bandwidth, and reduce the operating cost of the cloud screen projection method.
[0005] In order to solve the above technical problems, an embodiment of the present invention provides a cloud screen projection method, including:
[0006] Obtain network information of the cloud projection device, and determine a connection mode of the cloud projection device based on the network information;
[0007] Determine a data transmission path based on the connection mode, encrypt the data, and transmit the encrypted data based on the transmission path;
[0008] The data transmission status is detected in real time, and the data transmission path is adjusted based on the data transmission status.
[0009] Further, the obtaining of network information of the cloud screen projection device and determining the connection mode of the cloud screen projection device based on the network information includes:
[0010] Obtain network information of the cloud screen projection device, and determine whether the cloud screen projection device is in the same local area network based on the network information; if so, the connection mode is direct connection; the cloud screen projection device includes a screen projection initiating device and a screen projection receiving device;
[0011] If not, a P2P connection is established for the cloud projection device, and the connection mode of the cloud projection device is determined based on the connection status.
[0012] Furthermore, the obtaining of network information of the cloud screen projection device and determining whether the cloud screen projection device is in the same local area network based on the network information includes:
[0013] Obtain the first network information of the screen projection initiating device and the second network information of the screen projection receiving device in the cloud screen projection device; the first network information includes the IP address, subnet mask, gateway and other network parameters of the screen projection initiating device; the second network information includes the IP address, subnet mask, gateway and other network parameters of the screen projection receiving device;
[0014] Calculate the first network address of the screen projection initiating device based on the first network information, and calculate the second network address of the screen projection receiving device based on the second network information;
[0015] Based on the first network address and the second network address, determine whether the cloud projection device is in the same local area network.
[0016] Further, judging whether the cloud screen projection device is in the same local area network based on the first network address and the second network address includes:
[0017] If the first network address and the second network address are equal, the cloud screen projection device is in the same local area network; otherwise, the cloud screen projection device is not in the same local area network.
[0018] Further, establishing a P2P connection to the cloud projection device and determining a connection mode of the cloud projection device based on the connection state includes:
[0019] Obtain the P2P connection support status of the cloud screen projection device, and perform a network penetration test on the cloud screen projection device based on the connection support status;
[0020] Based on the test results of the network penetration test, a P2P connection is established for the cloud projection device. If the cloud projection device successfully establishes the P2P connection, the connection mode of the cloud projection device is the direct mode; otherwise, the connection mode of the cloud projection device is the bandwidth mode.
[0021] Further, determining a data transmission path based on the connection mode, encrypting the data, and transmitting the encrypted data based on the transmission path includes:
[0022] When the connection mode is a direct mode, the data transmission path is a P2P transmission path;
[0023] When the connection mode is a bandwidth mode, the data transmission path is a cloud service bandwidth path;
[0024] The data is encrypted based on a symmetric encryption algorithm, and the encrypted data is transmitted based on the transmission path.
[0025] Further, the real-time detection of the data transmission status and the adjustment of the data transmission path based on the data transmission status include:
[0026] The data transmission status is detected in real time. When the data transmission status is abnormal, the abnormal status is recorded in the operation log; and the data transmission path is adjusted based on the real-time network information.
[0027] Furthermore, the usage time of the cloud screen projection is recorded with the start time of data transmission, and when the usage time reaches a preset time threshold or a disconnect command is received, the connection between the screen projection initiating device and the screen projection receiving device is disconnected.
[0028] In a second aspect, the present invention provides a cloud screen projection device, comprising: a connection mode confirmation module, a transmission module and a monitoring module;
[0029] The connection mode confirmation module is used to obtain network information of the cloud screen projection device and determine the connection mode of the cloud screen projection device based on the network information;
[0030] The transmission module is used to determine a data transmission path based on the connection mode, encrypt the data, and transmit the encrypted data based on the transmission path;
[0031] The monitoring module is used to detect the data transmission status in real time and adjust the data transmission path based on the data transmission status.
[0032] In a third aspect, the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the cloud screen projection method when executing the computer program. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A schematic diagram of a process of a cloud screen projection method provided in an embodiment of the present invention;
[0034] Figure 2 A structural schematic diagram of a cloud projection device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0036] The terms "first" and "second" and the like in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0037] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0038] First, some terms in this application are explained to facilitate understanding by those skilled in the art.
[0039] (1) A P2P connection (Peer-to-Peer Connection) is a network connection method that directly connects two devices (called peers), allowing them to exchange data directly without the need for a central server to transfer data.
[0040] (2) STUN server (Session Traversal Utilities for NAT), used to help devices discover their own public IP addresses and ports.
[0041] (3) TURN server (Traversal Using Relays around NAT) acts as a relay service that helps devices forward data and enables communication even when there is no direct connection.
[0042] Example 1
[0043] See also Figure 1 , Figure 1 The following is a flow chart of a cloud screen projection method provided in an embodiment of the present invention. The present invention provides a cloud screen projection method, including steps 101 to 103, which are as follows:
[0044] Step 101: Obtain network information of a cloud screen projection device, and determine a connection mode of the cloud screen projection device based on the network information;
[0045] In this embodiment, the obtaining of network information of the cloud screen projection device and determining the connection mode of the cloud screen projection device based on the network information includes:
[0046] Obtain network information of the cloud screen projection device, and determine whether the cloud screen projection device is in the same local area network based on the network information; if so, the connection mode is direct connection; the cloud screen projection device includes a screen projection initiating device and a screen projection receiving device;
[0047] If not, a P2P connection is established for the cloud projection device, and the connection mode of the cloud projection device is determined based on the connection status.
[0048] In this embodiment, the cloud screen projection device includes a screen projection initiating device and a screen projection receiving device. It is determined whether the screen projection initiating device and the screen projection receiving device are in the same local area network based on network information. If both devices are in the same local area network, a connection is established directly, skipping the cloud service and P2P connection. If they are not in the same local area network, a P2P connection is established, relying on the STUN / TURN server for network penetration. According to the connection status, the final connection mode is further determined.
[0049] In this embodiment, when the devices are in the same local area network, direct connection can significantly reduce bandwidth consumption, because data does not need to be transferred through the cloud server, which greatly reduces the cost of using cloud services. In addition, direct connection within the local area network can minimize the delay of data transmission, because data does not need to be transferred through the Internet, which is suitable for application scenarios with high real-time requirements.
[0050] In this embodiment, even if the devices are not in the same local area network, the use of P2P connection can reduce the dependence on cloud bandwidth. Although the use of a relay service (TURN) may be required, the overall bandwidth overhead can be significantly reduced.
[0051] In this embodiment, the obtaining of network information of the cloud screen projection device and determining whether the cloud screen projection device is in the same local area network based on the network information includes:
[0052] Obtain the first network information of the screen projection initiating device and the second network information of the screen projection receiving device in the cloud screen projection device; the first network information includes the IP address, subnet mask, gateway and other network parameters of the screen projection initiating device; the second network information includes the IP address, subnet mask, gateway and other network parameters of the screen projection receiving device;
[0053] Calculate the first network address of the screen projection initiating device based on the first network information, and calculate the second network address of the screen projection receiving device based on the second network information;
[0054] Based on the first network address and the second network address, determine whether the cloud projection device is in the same local area network.
[0055] In this embodiment, the network information of the screen projection initiating device A and the screen projection receiving device B is first obtained, including network parameters such as IP address, subnet mask, gateway, etc. The network addresses of the screen projection initiating device A and the screen projection receiving device B are calculated, so as to determine whether they are in the same local area network based on the network address.
[0056] In this embodiment, the network address is specifically:
[0057] Network Address=IP Adderss&Subnet mask (1)
[0058] The symbol "&" represents the bitwise AND operation, Network Address represents the network address, IP Adderss is the IP address, and Subnet mask is the subnet mask.
[0059] In this embodiment, judging whether the cloud screen projection device is in the same local area network based on the first network address and the second network address includes:
[0060] If the first network address and the second network address are equal, the cloud screen projection device is in the same local area network; otherwise, the cloud screen projection device is not in the same local area network.
[0061] In this embodiment, if the network addresses of the screen projection initiating device A and the screen projection receiving device B are the same, they are determined to be in the same local area network, and the connection mode is direct mode. Otherwise, a P2P connection is established to the cloud screen projection device, and the connection mode of the cloud screen projection device is determined based on the connection status.
[0062] In this embodiment, the optimal connection mode is automatically determined and selected based on network information, without the need for manual configuration by the user, thereby improving the automation and intelligence level of the system. The connection mode is dynamically selected according to the network environment, thereby optimizing the utilization of network resources and avoiding unnecessary waste of bandwidth and computing resources.
[0063] In this embodiment, establishing a P2P connection to the cloud screen projection device and determining the connection mode of the cloud screen projection device based on the connection state includes:
[0064] Obtain the P2P connection support status of the cloud screen projection device, and perform a network penetration test on the cloud screen projection device based on the connection support status;
[0065] Based on the test results of the network penetration test, a P2P connection is established for the cloud projection device. If the cloud projection device successfully establishes the P2P connection, the connection mode of the cloud projection device is the direct mode; otherwise, the connection mode of the cloud projection device is the bandwidth mode.
[0066] In this embodiment, the P2P connection support status of the screen projection initiating device A and the screen projection receiving device B is obtained, and a network penetration test is performed using the STUN / TURN server. When performing a network penetration test based on the STUN server, the screen projection initiating device A and the screen projection receiving device B are respectively connected to the STUN server, obtain their own public IP addresses and ports, and determine their own NAT types. Compare the NAT types of device A and device B to determine whether they are compatible, and try to establish a direct P2P connection. If the NAT types are compatible, try to establish a P2P connection.
[0067] In this embodiment, if the NAT types are incompatible, a P2P connection cannot be directly established.
[0068] In this embodiment, the success of the P2P connection is determined by the following conditions:
[0069] Connection Established=NAT TYPE A |NAT TYPE B (2)
[0070] Among them, Connection Established is the connection status, NAT TYPE A NAT type of the device initiating screen projection, NAT TYPE B The NAT type of the screen projection receiving device. The symbol "|" represents a logical OR operation. When the NAT type of any device allows P2P connection, the connection is successful, otherwise the connection fails. After success, the P2P connection session is initialized and the resources required for the P2P connection are allocated.
[0071] In this embodiment, if the cloud projection device successfully establishes a P2P connection, the connection mode of the cloud projection device is a direct mode, otherwise the connection mode of the cloud projection device is a bandwidth mode.
[0072] In this embodiment, the optimal connection mode is automatically determined and selected based on network information, without the need for manual configuration by the user, thereby improving the automation and intelligence level of the system. The connection mode is dynamically selected according to the network environment, thereby optimizing the utilization of network resources and avoiding unnecessary waste of bandwidth and computing resources.
[0073] Step 102: determining a data transmission path based on the connection mode, encrypting the data, and transmitting the encrypted data based on the transmission path;
[0074] In this embodiment, determining a data transmission path based on the connection mode, encrypting the data, and transmitting the encrypted data based on the transmission path includes:
[0075] When the connection mode is a direct mode, the data transmission path is a P2P transmission path;
[0076] When the connection mode is a bandwidth mode, the data transmission path is a cloud service bandwidth path;
[0077] The data is encrypted based on a symmetric encryption algorithm, and the encrypted data is transmitted based on the transmission path.
[0078] In this embodiment, after the connection mode is determined, a connection session is initialized based on the connection mode, and a data transmission path is determined.
[0079] In this embodiment, in direct mode, data is directly transmitted between devices through the P2P transmission path, which reduces the intermediate links, improves the data transmission efficiency and speed, avoids long-term use of bandwidth connection, reduces bandwidth consumption, and reduces costs.
[0080] In this embodiment, the appropriate transmission path is automatically selected according to the connection mode, so that the system can flexibly adapt to different network environments and requirements. The bandwidth pressure of the cloud server is reduced, the bandwidth utilization is optimized, and the bandwidth cost of the cloud service is saved. The efficient transmission of the P2P path reduces the delay and improves the user's real-time operation experience.
[0081] In this embodiment, it is an encryption method in which the same key is used for encryption and decryption. This means that both the sender and the receiver of the data must have the same key to complete the encryption and decryption process of the data. Symmetric encryption algorithms are generally used to protect the confidentiality of data and ensure that the data is not accessed or stolen by unauthorized third parties during transmission or storage. Common symmetric encryption algorithms include AES (Advanced Encryption Standard), DES (Data Encryption Standard) and RC4 algorithms.
[0082] In this embodiment, if the connection is successful within the LAN or P2P, the LAN or P2P is used for data transmission first; otherwise, the cloud service bandwidth is used. Initialize the data transmission session, configure the data transmission protocol and parameters, such as UDP / TCP, bandwidth control, etc. At the same time, perform data encryption processing, use a symmetric encryption algorithm to encrypt the transmitted data, and generate a key to distribute to both devices. Start data transmission and monitor the transmission status in real time.
[0083] In this embodiment, a symmetric encryption algorithm is used to encrypt data to ensure the security of data during transmission. Even if the data is intercepted during transmission, due to encryption protection, attackers cannot easily decrypt and obtain the original data.
[0084] Step 103: Detect the data transmission status in real time, and adjust the data transmission path based on the data transmission status.
[0085] In this embodiment, the real-time detection of the data transmission status and the adjustment of the data transmission path based on the data transmission status include:
[0086] The data transmission status is detected in real time. When the data transmission status is abnormal, the abnormal status is recorded in the operation log; and the data transmission path is adjusted based on the real-time network information.
[0087] In this embodiment, when the transmission status is abnormal, a log is recorded and an attempt is made to switch to a backup transmission path.
[0088] In this embodiment, the start time of data transmission is taken as the start time, and the usage time of cloud screen projection is recorded. When the usage time reaches a preset time threshold or a disconnect command is received, the connection between the screen projection initiating device and the screen projection receiving device is disconnected.
[0089] In this embodiment, the number of times cloud screen projection is used and the duration of use are counted. At the start and end of each screen projection, the timestamp is recorded and the usage time is accumulated. A timer is set. When the cloud screen projection usage time reaches 1 hour, the current connection is automatically disconnected and the user is prompted to reconnect. At the same time, a server-side control interface is provided, allowing the server-side administrator to interrupt the ongoing cloud screen projection connection at any time. After disconnection, notify both devices to terminate the screen projection session.
[0090] In an optional embodiment, the cloud screen projection method includes steps 1 to 4, specifically:
[0091] Step 1: Detect the device network environment: First, obtain the network information of cloud projection device A and device B, including network parameters such as IP address, subnet mask, gateway, etc. Analyze and compare the IP addresses using the following formula to determine whether the two devices are in the same LAN: If the network addresses of device A and device B are the same, they are determined to be in the same LAN, and the results are recorded for use in subsequent steps.
[0092] Step 2: Establish a P2P connection: Get the P2P connection support status of the two devices and use the STUN / TURN server to perform a network penetration test. The STUN server will return the public IP address and port of device A and device B to determine the NAT type. If the NAT type is compatible, try to establish a P2P connection. When the NAT type of either device allows P2P connection, the connection is successful, otherwise the connection fails. After success, initialize the P2P connection session and allocate the resources required for the P2P connection.
[0093] Step 3: Data transmission path optimization: According to the network status parameters in step 1 and step 2, select the optimal data transmission path. If the connection is successful within the LAN or P2P, the LAN or P2P is used for data transmission first; otherwise, the cloud service bandwidth is used. Initialize the data transmission session and configure the data transmission protocol and parameters, such as UDP / TCP, bandwidth control, etc. At the same time, perform data encryption processing, use the symmetric encryption algorithm to encrypt the transmitted data, and generate a key to distribute to both devices. Start data transmission and monitor the transmission status in real time. When the transmission status is abnormal, record the log and try to switch to the backup transmission path.
[0094] Step 4: Data statistics and connection management: Statistics on the number of times and duration of cloud screen projection. Record the timestamp and accumulate the duration of each screen projection start and end. Set a timer. When the cloud screen projection usage time reaches 1 hour, the current connection is automatically disconnected and the user is prompted to reconnect. At the same time, a server control interface is provided to allow the server administrator to interrupt the ongoing cloud screen projection connection at any time. After disconnection, notify both devices to terminate the screen projection session.
[0095] In this embodiment, in step 1, if the devices are in the same local area network, jump to step 3; otherwise, go to step 2. In step 2, if the P2P connection is successful, jump to step 3; otherwise, go to step 4. In step 3, if an abnormality occurs during data transmission, try to switch to an alternative path or re-establish the connection. In step 4, when 1 hour is reached or the server issues a disconnection command, the system will automatically disconnect.
[0096] The embodiment of the present invention also provides a cloud screen projection system, which includes an interactive interface. When the cloud screen projection connection is made for the first time, the user selects the target device on the interactive interface, and the system automatically selects the optimal transmission path according to the network detection result, and prompts the user of the current connection status on the interface. During the screen projection process: the user can view the current connection status in real time based on the interactive interface, such as bandwidth usage, P2P connection status, etc. The system performs transmission optimization and status monitoring in the background without affecting the normal use of the user.
[0097] In this embodiment, when the cloud screen projection reaches the 1-hour limit or the server issues a disconnect command, the system will automatically disconnect the screen projection connection and display a prompt message on the interactive interface. The user can choose to reconnect to continue the screen projection.
[0098] In this embodiment, the interactive page can also be used to view statistical information. Users can view statistical information such as the historical usage times and duration of cloud projection through the system interface. The system provides visual charts to display this data.
[0099] Please refer to Figure 2 , Figure 2 A schematic diagram of the structure of a cloud screen projection device provided by an embodiment of the present invention includes: a connection mode confirmation module 201, a transmission module 202 and a monitoring module 203;
[0100] The connection mode confirmation module 201 is used to obtain network information of the cloud screen projection device and determine the connection mode of the cloud screen projection device based on the network information;
[0101] The transmission module 202 is used to determine a data transmission path based on the connection mode, encrypt the data, and transmit the encrypted data based on the transmission path;
[0102] The monitoring module 203 is used to detect the data transmission status in real time and adjust the data transmission path based on the data transmission status.
[0103] In this embodiment, the connection mode confirmation module includes:
[0104] Obtain network information of the cloud screen projection device, and determine whether the cloud screen projection device is in the same local area network based on the network information; if so, the connection mode is direct connection; the cloud screen projection device includes a screen projection initiating device and a screen projection receiving device;
[0105] If not, a P2P connection is established for the cloud projection device, and the connection mode of the cloud projection device is determined based on the connection status.
[0106] In this embodiment, the connection mode confirmation module includes:
[0107] Obtain the first network information of the screen projection initiating device and the second network information of the screen projection receiving device in the cloud screen projection device; the first network information includes the IP address, subnet mask, gateway and other network parameters of the screen projection initiating device; the second network information includes the IP address, subnet mask, gateway and other network parameters of the screen projection receiving device;
[0108] Calculate the first network address of the screen projection initiating device based on the first network information, and calculate the second network address of the screen projection receiving device based on the second network information;
[0109] Based on the first network address and the second network address, determine whether the cloud projection device is in the same local area network.
[0110] In this embodiment, judging whether the cloud screen projection device is in the same local area network based on the first network address and the second network address includes:
[0111] If the first network address and the second network address are equal, the cloud projection device is in the same local area network; otherwise, the cloud projection device is not in the same local area network.
[0112] In this embodiment, the connection mode confirmation module includes:
[0113] Obtain the P2P connection support status of the cloud screen projection device, and perform a network penetration test on the cloud screen projection device based on the connection support status;
[0114] Based on the test results of the network penetration test, a P2P connection is established for the cloud projection device. If the cloud projection device successfully establishes the P2P connection, the connection mode of the cloud projection device is the direct mode; otherwise, the connection mode of the cloud projection device is the bandwidth mode.
[0115] In this embodiment, the transmission module includes:
[0116] When the connection mode is a direct mode, the data transmission path is a P2P transmission path;
[0117] When the connection mode is a bandwidth mode, the data transmission path is a cloud service bandwidth path;
[0118] The data is encrypted based on a symmetric encryption algorithm, and the encrypted data is transmitted based on the transmission path.
[0119] In this embodiment, the monitoring module includes:
[0120] The data transmission status is detected in real time. When the data transmission status is abnormal, the abnormal status is recorded in the operation log; and the data transmission path is adjusted based on the real-time network information.
[0121] In this embodiment, a statistical module is also included, which is used to record the usage time of cloud screen projection with the start time of data transmission. When the usage time reaches a preset time threshold or a disconnect command is received, the connection between the screen projection initiating device and the screen projection receiving device is disconnected.
[0122] In this embodiment, the optimal transmission path can be dynamically selected according to the network environment in which the device is located, and it can be flexibly adjusted whether in a local area network or across network environments to ensure the efficiency of data transmission. The transmission path is selected according to the actual network conditions, which reduces unnecessary use of cloud resources, thereby optimizing the utilization efficiency of cloud services and reducing operating costs. At the same time, efficient transmission in direct mode reduces the delay of data transmission and improves the user's real-time operation experience.
[0123] In an embodiment of the present invention, a terminal device is further provided, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and the processor implements the above-mentioned terminal method when executing the computer program.
[0124] In an embodiment of the present invention, a computer-readable storage medium is also provided, and the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned cloud projection method.
[0125] Exemplarily, the computer program may be divided into one or more modules, one or more modules are stored in a memory and executed by a processor to implement the present invention. One or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in a terminal device.
[0126] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The terminal device may include, but is not limited to, a processor, a memory, and a display. Those skilled in the art will appreciate that the above components are merely examples of the terminal device and do not constitute a limitation on the terminal device. The terminal device may include more or fewer components than the components, or may combine certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0127] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0128] The memory can be used to store computer programs and / or modules. The processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0129] Wherein, if the module based on the terminal is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0130] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A cloud screen projection method, characterized in that: include: Obtain network information of the cloud projection device, and determine a connection mode of the cloud projection device based on the network information; Determine a data transmission path based on the connection mode, encrypt the data, and transmit the encrypted data based on the transmission path; The data transmission status is detected in real time, and the data transmission path is adjusted based on the data transmission status.
2. A cloud screen projection method as claimed in claim 1, characterized in that: The obtaining of network information of the cloud screen projection device and determining the connection mode of the cloud screen projection device based on the network information includes: Obtain network information of the cloud screen projection device, and determine whether the cloud screen projection device is in the same local area network based on the network information; if so, the connection mode is direct connection; the cloud screen projection device includes a screen projection initiating device and a screen projection receiving device; If not, a P2P connection is established for the cloud projection device, and the connection mode of the cloud projection device is determined based on the connection status.
3. A cloud screen projection method as claimed in claim 1, characterized in that: The obtaining network information of the cloud screen projection device, and judging whether the cloud screen projection device is in the same local area network based on the network information, includes: Obtain the first network information of the screen projection initiating device and the second network information of the screen projection receiving device in the cloud screen projection device; the first network information includes the IP address, subnet mask, gateway and other network parameters of the screen projection initiating device; the second network information includes the IP address, subnet mask, gateway and other network parameters of the screen projection receiving device; Calculate the first network address of the screen projection initiating device based on the first network information, and calculate the second network address of the screen projection receiving device based on the second network information; Based on the first network address and the second network address, determine whether the cloud projection device is in the same local area network.
4. A cloud screen projection method as claimed in claim 3, characterized in that: The determining whether the cloud screen projection device is in the same local area network based on the first network address and the second network address includes: If the first network address and the second network address are equal, the cloud screen projection device is in the same local area network; otherwise, the cloud screen projection device is not in the same local area network.
5. A cloud screen projection method as claimed in claim 4, characterized in that: The establishing of a P2P connection to the cloud screen projection device and determining a connection mode of the cloud screen projection device based on a connection state includes: Obtain the P2P connection support status of the cloud screen projection device, and perform a network penetration test on the cloud screen projection device based on the connection support status; Based on the test results of the network penetration test, a P2P connection is established for the cloud projection device. If the cloud projection device successfully establishes the P2P connection, the connection mode of the cloud projection device is the direct mode; otherwise, the connection mode of the cloud projection device is the bandwidth mode.
6. A cloud screen projection method as claimed in claim 5, characterized in that: The step of determining a data transmission path based on the connection mode, encrypting the data, and transmitting the encrypted data based on the transmission path includes: When the connection mode is a direct mode, the data transmission path is a P2P transmission path; When the connection mode is a bandwidth mode, the data transmission path is a cloud service bandwidth path; The data is encrypted based on a symmetric encryption algorithm, and the encrypted data is transmitted based on the transmission path.
7. A cloud screen projection method as claimed in claim 6, characterized in that: The real-time detection of the data transmission status and the adjustment of the data transmission path based on the data transmission status include: The data transmission status is detected in real time. When the data transmission status is abnormal, the abnormal status is recorded in the operation log; and the data transmission path is adjusted based on the real-time network information.
8. A cloud screen projection method according to any one of claims 1 to 7, characterized in that: Taking the start time of data transmission as the start time, the usage time of cloud screen projection is recorded. When the usage time reaches a preset time threshold or a disconnect command is received, the connection between the screen projection initiating device and the screen projection receiving device is disconnected.
9. A cloud screen projection device, characterized in that: include: Connection mode confirmation module, transmission module and monitoring module; The connection mode confirmation module is used to obtain network information of the cloud screen projection device and determine the connection mode of the cloud screen projection device based on the network information; The transmission module is used to determine a data transmission path based on the connection mode, encrypt the data, and transmit the encrypted data based on the transmission path; The monitoring module is used to detect the data transmission status in real time and adjust the data transmission path based on the data transmission status.
10. A terminal device, characterized in that: It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a cloud screen projection method as described in any one of claims 1 to 7.
Citation Information
Cited By
Image synchronous display method and device of VR equipment, equipment and storage medium
CN120512569A