Cross-device distributed screen projection method and system, terminal and storage medium
By establishing a soft bus network between devices and performing coding, compression and encryption processing, the compatibility problem between devices with different communication protocols is solved, and efficient and reliable cross-device screen projection is achieved to meet user needs and improve user experience.
Patent Information
- Application Number
- CN202411279570.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, there are compatibility problems between devices using different communication protocols, which leads to inability to communicate and data projection between devices, which cannot meet user needs.
By receiving the equipment group network instructions, obtain the equipment communication protocol for the source equipment, control the source equipment for equipment discovery and processing, and obtain multiple target equipment. Then, obtain a distributed soft bus, conduct network connection of source equipment and target equipment, and establish a soft bus network. When receiving the device investment instruction, obtain the content of the screens and the network status of the device, coding compression processing, generate the target screen content, and encrypted it, and send it to the screen device to display the screen.
Realized the efficient and reliable screens between different communication protocol equipment, solved the problem of equipment compatibility, improved the user experience, and used the distributed soft bus to ensure that the data cast screen between devices was adjusted according to the network status. Ensure that the screen is successfully completed.
Smart Images

Figure CN119364097A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of screen projection control technology, and in particular to a cross-device distributed screen projection method, system, terminal and computer-readable storage medium. Background Art
[0002] Currently, the widely used device networking communication technologies mainly include wireless local area network (WLAN), wired local area network (such as Ethernet) and short-range wireless communication technology (such as Bluetooth), which use radio waves for data transmission or physical optical fiber as a physical medium for device discovery and networking communication. For example, for mobile communications that require large-scale coverage, cellular networks are the first choice, while for local area networks that require high speed and low latency, Ethernet is more suitable.
[0003] There are generally two types of screen projection technologies between devices: wired screen projection and wireless screen projection, and wireless screen projection technology has been widely used due to its convenience and flexibility. However, there are compatibility issues between devices using different communication protocols in the prior art, which results in the inability to communicate and project data between devices, and cannot meet user needs.
[0004] Therefore, the prior art still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide a cross-device distributed screen projection method, system, terminal and computer-readable storage medium, aiming to solve the problem in the prior art that there is incompatibility between devices using different communication protocols, which leads to the inability to communicate and project data between devices and cannot meet user needs.
[0006] To achieve the above object, the present invention provides a cross-device distributed screen projection method, and the cross-device distributed screen projection method comprises the following steps:
[0007] When receiving a device networking instruction, obtaining a device communication protocol of a source device according to the device networking instruction, and controlling the source device to perform device discovery processing according to the device communication protocol to obtain a plurality of target devices within a preset signal range;
[0008] Acquire a distributed soft bus, and network the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network;
[0009] When receiving a device screen projection instruction, the screen projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the screen projection device are obtained according to the device screen projection instruction, and the screen projection content is encoded and compressed according to the device network status to obtain the target screen projection content;
[0010] The target screen projection content is encrypted to obtain the encrypted screen projection content, and the encrypted screen projection content is sent to the screen projection device for screen projection display.
[0011] Optionally, the cross-device distributed screen projection method, wherein when a device networking instruction is received, the device communication protocol of the source device is obtained according to the device networking instruction, and the source device is controlled to perform device discovery processing according to the device communication protocol to obtain multiple target devices within a preset signal range, specifically includes:
[0012] When receiving a device networking instruction issued by a user, determining a source device and a corresponding device communication protocol of the source device according to the device networking instruction, and setting a device discovery strategy of the source device, wherein the device discovery strategy includes a device discovery frequency, a data reporting frequency, and a scanning period;
[0013] Determine a preset signal range of the source device, control the source device to send a request message in a broadcast manner within the preset signal range according to the device communication protocol and the device discovery strategy, and receive multiple returned message response information in real time;
[0014] Performing verification processing on the plurality of message response information, and obtaining a plurality of target message response information that pass the verification from the plurality of message response information;
[0015] A plurality of target devices corresponding to the plurality of target message response information are determined, and the plurality of target devices are determined to be networkable devices.
[0016] Optionally, the cross-device distributed screen projection method, wherein the obtaining of a distributed soft bus, and networking the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network, specifically includes:
[0017] Acquire device node information of the source device and the plurality of target devices, wherein the device node information includes device scanning perception information, device status information, and device attribute information;
[0018] A distributed soft bus is obtained, and the distributed soft bus is used to network the source device and the plurality of target devices according to the device node information to obtain a soft bus network.
[0019] Optionally, the cross-device distributed screen projection method, wherein the step of obtaining a distributed soft bus and networking the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network, further comprises:
[0020] When the source device and the plurality of target devices are networked and connected, a detection heartbeat packet is generated at a preset interval according to the distributed soft bus;
[0021] If it is determined according to the detection heartbeat packet that the networking of the source device and the plurality of target devices is abnormal, the source device and the plurality of target devices are re-networked.
[0022] Optionally, the cross-device distributed screen projection method, wherein, when receiving a device screen projection instruction, obtaining the projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the projected device according to the device screen projection instruction, and encoding and compressing the projection content according to the device network status to obtain the target projection content, specifically includes:
[0023] When receiving a device screen projection instruction issued by a user, determining a screen projection device and a screen projection device in the soft bus network according to the device screen projection instruction;
[0024] Obtain the screen projection permission information of the projected device, and determine whether the projected device allows the projection device to project the screen according to the screen projection permission information; if allowed, obtain the projection content of the projection device according to the device projection instruction;
[0025] Obtain the device network status between the screen projection device and the screen projection device, determine the data compression ratio according to the device network status, and encode and compress the screen projection content according to the data compression ratio to obtain the target screen projection content.
[0026] Optionally, the cross-device distributed screen projection method, wherein the target screen projection content is encrypted to obtain the encrypted screen projection content, and the encrypted screen projection content is sent to the projected screen device for screen projection display, specifically includes:
[0027] Obtain the user's screen projection requirement information and the device identification information of the screen projection device, and generate an encrypted password according to the screen projection requirement information and the device identification information;
[0028] Encrypt the target screen projection content according to the encryption password to obtain encrypted screen projection content;
[0029] The encrypted projection content is sent to the projection device through the distributed soft bus, and the projection device is controlled to decrypt and decode the encrypted projection content to obtain the target projection content, and the target projection content is projected and displayed on the projection device.
[0030] Optionally, the cross-device distributed screen projection method, wherein the target screen projection content is encrypted to obtain the encrypted screen projection content, and the encrypted screen projection content is sent to the projected screen device for screen projection display, and then further includes:
[0031] Obtain the first clock information corresponding to the screen projection device and the second clock information of the projected screen device, and use the clock technology of the distributed soft bus to correct the second clock information according to the first clock information to control the screen projection device and the projected screen device to perform synchronous screen projection and display.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a cross-device distributed screen projection system, wherein the cross-device distributed screen projection system includes:
[0033] A device discovery processing module, configured to, when receiving a device networking instruction, obtain a device communication protocol of a source device according to the device networking instruction, and control the source device to perform device discovery processing according to the device communication protocol to obtain a plurality of target devices within a preset signal range;
[0034] A device networking connection module, used for acquiring a distributed soft bus, and networking the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network;
[0035] The coding and compression processing module is used for, when receiving a device screen projection instruction, obtaining the projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the projected device according to the device screen projection instruction, and encoding and compressing the projection content according to the device network status to obtain the target projection content;
[0036] The device screen projection and display module is used to encrypt the target screen projection content to obtain the encrypted screen projection content, and send the encrypted screen projection content to the projected screen device for screen projection and display.
[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a cross-device distributed screen projection program stored in the memory and executable on the processor, and when the cross-device distributed screen projection program is executed by the processor, the steps of the cross-device distributed screen projection method as described above are implemented.
[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a distributed screen projection program across devices, and when the distributed screen projection program across devices is executed by a processor, the steps of the distributed screen projection method across devices as described above are implemented.
[0039] In the present invention, when a device networking instruction is received, the device communication protocol of the source device is obtained according to the device networking instruction, and the source device is controlled to perform device discovery processing according to the device communication protocol to obtain multiple target devices within the preset signal range; a distributed soft bus is obtained, and the source device and the multiple target devices are networked and connected according to the distributed soft bus to obtain a soft bus network; when a device screen projection instruction is received, the screen projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the screen projection device are obtained according to the device screen projection instruction, and the screen projection content is encoded and compressed according to the device network status to obtain the target screen projection content; the target screen projection content is encrypted to obtain the encrypted screen projection content, and the encrypted screen projection content is sent to the screen projection device for screen projection display. The present invention discovers each other between devices with different communication protocols, and uses a distributed soft bus to connect and network different devices. Based on the networking connection between devices, it is possible to establish a screen projection connection between networking devices in the soft bus network, and encode and compress the projection content according to the network conditions between the projection devices. This can effectively realize the screen projection display between devices with different communication protocols. At the same time, it can also ensure that the data projection between devices with different communication protocols is adjusted according to the network status between the devices to ensure the smooth completion of the screen projection between devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a flow chart of a preferred embodiment of the distributed screen projection method across devices of the present invention;
[0041] Figure 2 It is a structural diagram of a preferred embodiment of the distributed screen projection system across devices of the present invention;
[0042] Figure 3 It is a structural diagram of a preferred embodiment of the terminal of the present invention. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0044] Screen projection technology can be divided into two main categories: wired screen projection and wireless screen projection. In recent years, wireless screen projection technology has been widely used due to its convenience and flexibility, such as Miracast, Chromecast and AirPlay. Among them, 1. Miracast is a widely adopted wireless display standard that supports point-to-point connection and can achieve direct communication between devices without an access point. Miracast technology can achieve high-definition video streaming and supports audio and touch feedback. Miracast can control the display area on the receiving device through custom client software, allowing users to perform other operations on the main screen at the same time. 2. Chromecast is a screen projection technology developed by Google that uses Wi-Fi connection to transmit content from mobile devices or computers to display devices such as TVs. Chromecast supports multiple content sources and can display content in small windows on the receiving end, and users can perform other activities on the same screen. 3. AirPlay is an Apple technology that allows users to wirelessly transmit content from iPhone, iPad or Mac to Apple TV or other supported devices. AirPlay introduces enhanced multi-room audio capabilities and supports small window playback, allowing users to continue playing audio or video content while performing other operations on the main screen. 4. Custom SDK. In addition to the above standard protocols, many manufacturers have also developed their own SDKs to implement the small window screen projection function. These SDKs usually integrate proprietary optimization technologies such as video compression, network bandwidth management, low-latency transmission, etc. to improve user experience. Through these SDKs, developers can easily integrate the small window screen projection function into their applications.
[0045] Although existing screen projection technologies such as Miracast, Chromecast, and AirPlay have brought great convenience to users, there are still the following problems in actual applications: 1. Device compatibility issues: Technologies such as Miracast / WiDi and Chromecast / Google Cast require the receiving device to support the corresponding standards or technologies, otherwise screen projection cannot be achieved; and AirPlay is mainly for Apple devices and has limited support for Android devices. 2. Network environment dependence: Technologies such as Miracast / WiDi are greatly affected by the network environment, such as signal interference, bandwidth limitations, etc., which may affect the quality of screen projection. 3. Limited screen mirroring function: Chromecast / Google Cast is mainly used for pushing media content, and has limited support for screen mirroring. 4. Technical standard limitations: Miracast / WiDi requires the device to support the Miracast standard, otherwise the function cannot be used. 5. Dependence on third-party applications: Implementing the screen projection function through third-party applications may require additional software or hardware support, and there may be certain instability and compatibility issues. In summary, although the existing screen projection technology has made significant progress in many aspects, there is still a lot of room for improvement in delay control, compatibility, resource management, performance optimization, and security.
[0046] To solve the above problems, the present invention provides a cross-device distributed screen projection method for realizing efficient and reliable screen projection between different devices. The advantages of the cross-device distributed screen projection method are as follows: 1. Cross-device compatibility: The present invention supports a wide range of device types, including but not limited to smart phones, tablet computers, smart TVs, etc., and improves the compatibility and interoperability between devices. 2. Distributed capability: The present invention adopts a distributed architecture to allow seamless sharing of resources and services between different devices, which means that users can easily switch between multiple devices to achieve more efficient multi-device collaboration; 3. Low latency: The present invention specifically considers the need for low latency in design, making the screen transmission smoother during screen projection and providing a better user experience. 4. No need for third-party applications: The present invention has a built-in screen projection function, without relying on third-party applications, reducing software compatibility and stability issues. 5. Security and privacy protection: The present invention focuses on security and privacy protection in design, and provides a series of security measures to ensure the security of user data. The present invention adopts distributed technology to support seamless connection and resource sharing between multiple devices. In terms of screen projection, the present invention provides more advanced functions, such as low-latency screen sharing, multi-device collaboration, etc.
[0047] The distributed screen projection method across devices described in the preferred embodiment of the present invention is as follows: Figure 1 As shown, the cross-device distributed screen projection method includes the following steps:
[0048] Step S10: when a device networking instruction is received, the device communication protocol of the source device is obtained according to the device networking instruction, and the source device is controlled to perform device discovery processing according to the device communication protocol to obtain multiple target devices within a preset signal range.
[0049] The distributed screen projection function of the present invention is based on distributed soft bus (DSoftBus) technology, which is a mechanism for achieving efficient communication between devices. DSoftBus supports multiple transmission protocols, including but not limited to Wi-Fi, Bluetooth, USB, etc., and can achieve high-speed data transmission between devices.
[0050] Distributed soft bus technology includes: 1. Device discovery: Use DSoftBus for device discovery to ensure that the source device can find the target device and establish a connection. 2. Connection management: Once the device is discovered, the system will establish a stable connection channel through DSoftBus to ensure the quality of data transmission. 3. Data transmission: The screen content is encoded into streaming media data and sent to the target device through DSoftBus. In order to improve efficiency, the present invention adopts adaptive compression technology and streaming media optimization strategy. 4. Display processing: After the target device receives the data, it decodes it and displays it on the screen.
[0051] Specifically, when a device networking instruction issued by a user is received, a source device and a corresponding device communication protocol of the source device are determined according to the device networking instruction, and a device discovery strategy of the source device is set, wherein the device discovery strategy includes a device discovery frequency, a data reporting frequency, and a scanning period; a preset signal range of the source device is determined, and the source device is controlled to send a request message in a broadcast manner within the preset signal range according to the device communication protocol and the device discovery strategy, and multiple returned message response information is received in real time; multiple message response information are verified and processed, and multiple target message response information that pass the verification is obtained from the multiple message response information; multiple target devices corresponding to the multiple target message response information are determined, and the multiple target devices are determined to be networkable devices.
[0052] The source device in the present invention can be a terminal device with a screen projection function such as a smart phone, a tablet computer, a laptop computer, etc., and the target device can be a terminal device with a screen projection function such as a smart phone, a tablet computer, a laptop computer, etc. The source device can be a master control device and the target device can be a controlled device.
[0053] The short-range wireless communication method includes, but is not limited to, NFC (Near Field Communication), Bluetooth, WiFi (Wireless Fidelity), and the like.
[0054] The source device uses broadcasting to perform device discovery and search. When the target device receives the broadcast information of the source device, it responds and performs pairing verification, wherein the verification method includes PIN code verification or certificate exchange. When the source device discovers multiple target devices, the source device obtains the authentication information of each target device, and parses the authentication information to obtain identification information (i.e., the message response information in the present invention); and obtains the preset identification information input by the user, thereby verifying whether the identification information is the same as the preset identification information; if the verification identification information is the same as the preset identification information, an authentication result of successful authentication is generated; if the verification identification information is not the same as the preset identification information, an authentication result of unsuccessful authentication is generated. For example, if the source device parses the authentication information and obtains the PIN code corresponding to the identification information as 1234; the source device obtains the PIN code corresponding to the preset identification information input by the user as 1234, then it is determined that the identification information is the same as the preset identification information, and generates an authentication result of successful authentication.
[0055] Step S20: Obtain a distributed soft bus, and network the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network.
[0056] In reality, there are many different ways of communication between multiple devices (WIFI, Bluetooth, etc.), and the use of different communication methods is very different, resulting in many communication problems. At the same time, there are also challenges such as the integration and sharing of communication links between devices and the inability to handle conflicts. The distributed soft bus fully abstracts the details of distributed communication, encapsulates the underlying communication protocol, and provides a simple communication interface to the outside world, so that developers only need to focus on the implementation of business logic and quickly and efficiently complete the networking and communication tasks between devices. The distributed soft bus is based on the hardware and software collaboration of Ethernet, WIFI and Bluetooth, and provides the discovery and connection functions between devices. After the devices discover and connect to each other, the distributed soft bus manages the self-organizing network and topological relationship between devices. The distributed soft bus realizes the unified distributed communication management capabilities between near-field devices, and provides the discovery, connection, networking and transmission capabilities between devices that do not distinguish between links. The distributed soft bus can connect all system devices in the same local area network, and has the characteristics of self-discovery, self-organizing network, high bandwidth and low latency. In addition to connecting hardware devices in the same network protocol, the soft bus technology also supports networking of heterogeneous networks with different protocols.
[0057] Specifically, device node information of the source device and the multiple target devices is obtained, wherein the device node information includes device scanning perception information, device status information and device attribute information; a distributed soft bus is obtained, and the distributed soft bus is used to network the source device and the multiple target devices according to the device node information to obtain a soft bus network.
[0058] Among them, the networking connection relationship between devices is determined by the device node information. The channel consumption between the corresponding devices is obtained according to the device node information, and the connection method with the least consumption is selected to build the network.
[0059] When the pairing is completed, the connection between the source device and the target device is established through the distributed soft bus. The distributed soft bus technology can realize unified distributed communication management capabilities between devices, and provide link-indistinguishable device discovery, networking and transmission capabilities. Therefore, the master device (i.e., the source device in the present invention) and the controlled device (i.e., the target device in the present invention) based on the distributed soft bus can discover each other and establish a connection, thereby enabling the transmission of data between the master device and the controlled device, and establishing a connection between the master device and the controlled device based on the distributed soft bus, thereby building a screen projection system.
[0060] Furthermore, after the networking connection between the source device and the multiple target devices is completed, a detection heartbeat packet is generated at a preset interval according to the distributed soft bus; if it is determined that the networking between the source device and the multiple target devices is abnormal according to the detection heartbeat packet, the source device and the multiple target devices are re-networked.
[0061] The connection establishment and maintenance process of networking devices includes 1. Connection establishment: After the devices are successfully paired, the two parties establish a stable communication connection through the distributed soft bus; 2. Connection maintenance: In order to maintain the stability of the connection, the distributed soft bus will periodically send heartbeat packets, detect the connection status, and re-establish the connection when necessary.
[0062] Step S30: When a device screen projection instruction is received, the projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the projected device are obtained according to the device screen projection instruction, and the projection content is encoded and compressed according to the device network status to obtain the target projection content.
[0063] After the devices are networked, if screen projection between devices is required, the projection device needs to obtain the projection permission of the projected device. Only when the projection device satisfies the projection permission of the projected device, the projection content of the projection device can be projected to the projected device.
[0064] Specifically, when a device screen casting instruction issued by the user is received, the screen casting device and the projected screen device in the soft bus network are determined according to the device screen casting instruction; the screen casting permission information of the projected screen device is obtained, and according to the screen casting permission information, it is judged whether the projected screen device allows the casting device to cast the screen; if allowed, the screen casting content of the casting device is obtained according to the device screen casting instruction; the device network status between the screen casting device and the projected screen device is obtained, the data compression ratio is determined according to the device network status, and the casting content is encoded and compressed according to the data compression ratio to obtain the target casting content.
[0065] The screen projection device obtains the screen projection permission information of the projected device, and determines whether the screen projection device is allowed according to the screen projection permission information; if it is determined that the screen projection device allows screen projection, the collaboration permission information of the projected device is obtained, and determines whether the projected device allows collaboration according to the collaboration permission information; if it is determined that the projected device allows collaboration, the projected device establishes a screen projection connection with the screen projection device through the distributed soft bus, thereby accurately obtaining the permission information of the corresponding device, thereby establishing a screen projection connection between the projected device and the screen projection device.
[0066] Get the device screen projection instruction issued by the user, parse each media stream data of the screen projection device according to the device screen projection instruction, obtain the corresponding media data, select the media data based on the device screen projection instruction, and obtain the determined screen projection content.
[0067] Before the projection content is sent, the present invention also sets up a detection process for the network environment between devices, obtains the device network status of the network between devices, determines the data compression ratio of the projection content based on the device network status, and compresses the projection content according to the data compression ratio.
[0068] It is understandable that before sending the projected content to the projected device, the projection device needs to detect the network environment of the projection device and obtain the device network status of the network between devices. Among them, a data packet can be sent by the projection device to the projected device to test the transmission rate. When the device network status shows that the transmission rate is slow, if the data is still sent according to the stored projection content, the projected device may not be able to display the projection content smoothly due to the slow network speed; based on this, the projection device determines the data compression ratio of the projection content according to the device network status, and compresses the projection content according to the data compression ratio; the compression ratio is determined in advance based on the transmission rate between devices, and the transmission rate is negatively correlated with the compression ratio, that is, the smaller the transmission rate, the larger the compression ratio, and correspondingly, the larger the transmission rate, the smaller the compression ratio. In this way, when the network transmission rate is slow, a larger compression ratio is used to compress the projected content, so that the projected device can play the received projected content smoothly; when the network transmission rate is fast, a smaller compression ratio is used to compress the projected content to obtain higher picture quality; the projection device pre-detects the network environment and compresses the projection content when the network environment is poor, so as to facilitate smooth playback of the projected device, which can effectively improve the user's operating experience.
[0069] Step S40: encrypt the target screen projection content to obtain encrypted screen projection content, and send the encrypted screen projection content to the projected screen device for screen projection display.
[0070] The data transmission and synchronization process includes: 1. Encoding and decoding: the projection content of the projection device is encoded and compressed to meet the requirements of network transmission. After the projection device receives the data, it is decoded and restored; 2. Data transmission: use efficient transmission protocols such as TCP / IP or UDP to realize the transmission of real-time data streams; 3. Synchronization mechanism: in order to ensure the synchronization of video and audio, the system needs to adopt an accurate time synchronization algorithm to reduce delays in the transmission process.
[0071] Specifically, the user's screen projection demand information and the device identification information of the projected device are obtained, and an encryption password is generated according to the screen projection demand information and the device identification information; the target projection content is encrypted according to the encryption password to obtain the encrypted projection content; the encrypted projection content is sent to the projected device through the distributed soft bus, the projected device is controlled to decrypt and decode the encrypted projection content to obtain the target projection content, and the target projection content is projected and displayed on the projected device.
[0072] The present invention generates first encrypted information based on screen projection requirement information, adds the first encrypted information to the device identification information of the projected device, generates second encrypted information based on the device identification information after adding the first encrypted information, and generates an encryption password based on the second encrypted information, the device identification information and the screen projection requirement information, encrypts the projection content based on the encryption password, generates encrypted projection content, and sends the encrypted projection content to the projected device, so that the projected device can perform screen projection display based on the encrypted file.
[0073] It can be understood that the projected screen device will generate a decryption password for the encrypted file that corresponds to or is the same as the encryption password based on the projection demand information and device identification information, and then decrypt the encrypted file according to the decryption password to obtain the encrypted projection content, and then realize the projection display on the projected screen device based on the encrypted projection content.
[0074] Since the encrypted screen projection content is encrypted through a specific encryption password generated by the screen projection requirement information and device identification information, which are specific information shared by the projection device and the projected device, other devices cannot generate the correct encryption password. The projected device only needs to be set with corresponding algorithm rules to generate a decryption password corresponding to or the same as the encryption password based on the above-mentioned screen projection requirement information and device identification information, so as to smoothly obtain the encrypted screen projection content. The above-mentioned encrypted screen projection content is encrypted and transmitted in a specific manner, which effectively reduces the risk of data leakage in the data transmission process, prevents illegal users from tampering with the data, and improves data security.
[0075] Furthermore, the first clock information corresponding to the screen projection device and the second clock information of the projected screen device are obtained, and the clock technology of the distributed soft bus is used to correct the second clock information according to the first clock information to control the screen projection device and the projected screen device to perform synchronous screen projection and display.
[0076] The present invention encodes, compresses and encrypts the projection content to obtain encrypted projection content, and sends the encrypted projection content to the projection device through a preset transmission protocol (such as TCP / IP and other protocols), and the projection device decodes the encrypted projection content to obtain the target projection content, and projects the target projection content on the projection device for display (wherein, an accurate time synchronization algorithm is required to ensure that the projection content of the projection device is consistent with the playback content of the projection device, thereby reducing delays in the transmission process).
[0077] By using the clock of the projection device as the reference clock, the time information of the projected device that needs to be projected can be corrected based on the distributed soft clock technology, and the synchronization of the projection device and the projected device can be accurately controlled, so that the distributed soft clock accuracy can reach 1ms. Based on the distributed soft clock algorithm and the coordination of the transmission layer, the distributed soft clock accuracy can reach 500us, and based on the distributed soft clock algorithm and the coordination of the transmission layer and the physical layer, the distributed soft clock accuracy is less than 300us, so that after the projected device receives the projection content sent by the projection device, it renders and plays according to the timestamp of the video frame image. Since the clocks of the projection device and the projected device are synchronized, the projection device and the projected device can display the image of the same frame at the same time, avoiding the phenomenon of image asynchrony. Furthermore, after the projection device and the projected device are connected for projection, the projection device can be remotely controlled, such as adjusting the volume and playback control of the projection content.
[0078] Furthermore, the time information of the projection device can be obtained, the time information can be corrected based on the reference clock of the distributed soft bus, the correction information can be obtained, the correction information can be sent to the projection device, and the projection device can correct the time information based on the correction information. Therefore, according to the stored reference clock, the time information of each projection device can be corrected based on the distributed soft clock technology.
[0079] The projected device uses the clock of the projected device as the standard clock, and can correct the clock information of the projected device based on the distributed soft clock technology, accurately control the time synchronization between the projecting device and the projected device, and make the distributed soft clock accuracy reach 1ms. Based on the distributed soft clock algorithm and the coordination of the transmission layer, the distributed soft clock accuracy can reach 500us, and based on the distributed soft clock algorithm and the coordination of the transmission layer and the physical layer, the distributed soft clock accuracy is less than 300us, so that after the projected device receives the projection content sent by the projection device, it will render and play according to the timestamp of the video frame image. The clock synchronization of the projection device and the projected device is achieved to avoid the phenomenon that the projection device and the projected device are out of sync.
[0080] After the projected device obtains the encrypted projection content sent by the projection device, it inputs the encrypted projection content into the application layer, and the application layer transmits the encrypted projection content to the interface layer. The interface layer calls the preset protocol library stored in the framework layer, and then converts the encrypted projection content into the target projection content to complete the processing of the encrypted projection content, thereby realizing data conversion between devices based on different operating systems;
[0081] The target screen projection content is projected by parsing the encrypted projection content, and the screen projection between devices across operating systems is completed without installing supporting applications, improving the user experience.
[0082] The interactive control process of screen projection content between devices in the present invention includes: 1. Remote control: In addition to the basic screen projection function, the distributed soft bus also supports the remote control function, that is, the user can control the operation of the projected device through the screen projection device, such as volume adjustment, playback control, etc.; 2. Multi-screen interaction: Support collaborative work between multiple devices, such as displaying different content on multiple screens or working as a whole.
[0083] For distributed screen projection across devices, the present invention adopts multiple technical means, including: 1. Distributed soft bus: responsible for communication and data transmission between devices. 2. Adaptive compression algorithm: dynamically adjust the video compression ratio according to the network conditions to ensure picture quality and transmission speed. 3. Multiplexing: supports simultaneous transmission of multiple data streams, such as video, audio, etc. 4. Security encryption: encryption technology is used to protect the security of data transmission.
[0084] The application scenarios of the present invention include: 1. Screen mirroring: Users can mirror their smartphone screens to smart TVs or other large-screen devices in real time, which is suitable for watching videos, presenting PPT, and other scenarios. 2. Multi-screen collaboration: The present invention supports collaborative work between multiple devices, such as editing a document on a mobile phone, dragging it directly to a tablet computer to continue editing, or viewing related information on a mobile phone while watching a video on a TV. 3. Game screen projection: Gamers can project the game screen onto a larger screen to enjoy a better visual experience.
[0085] Technical effects of the present invention:
[0086] 1. Low latency: By optimizing the transmission protocol and adopting efficient encoding and decoding algorithms, the latency of data transmission is significantly reduced.
[0087] 2. High bandwidth: Utilizing high-bandwidth wireless connection technologies, such as Wi-Fi 6 / 6E, ensures the transmission of high-quality video and audio.
[0088] 3. Self-discovery and self-organizing network: simplifies the user operation process and improves the connection efficiency between devices.
[0089] 4. Security: Built-in security mechanism ensures the security of data transmission and prevents unauthorized access.
[0090] In summary, the present invention adopts a distributed soft bus (DSoftBus) as the core communication mechanism, supports multiple transmission protocols, and dynamically adjusts the video compression ratio according to the network conditions through an adaptive compression algorithm, ensuring high-quality picture transmission and low-latency performance. In addition, the present invention also supports the multiplexing of multiple data streams, can simultaneously transmit various types of data such as video and audio, and uses secure encryption technology to ensure information security during the entire data transmission process. These technologies jointly realize a distributed screen projection method across devices.
[0091] Furthermore, if Figure 2 As shown, based on the above-mentioned cross-device distributed screen projection method, the present invention also provides a cross-device distributed screen projection system, wherein the cross-device distributed screen projection system includes:
[0092] The device discovery processing module 51 is used to, when receiving a device networking instruction, obtain a device communication protocol of a source device according to the device networking instruction, and control the source device to perform device discovery processing according to the device communication protocol to obtain multiple target devices within a preset signal range;
[0093] The device networking module 52 is used to obtain a distributed soft bus, and to network the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network;
[0094] The encoding and compression processing module 53 is used for, when receiving a device screen projection instruction, obtaining the projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the projected device according to the device screen projection instruction, and encoding and compressing the projection content according to the device network status to obtain the target projection content;
[0095] The device screen projection and display module 54 is used to encrypt the target screen projection content to obtain the encrypted screen projection content, and send the encrypted screen projection content to the projected screen device for screen projection and display.
[0096] Furthermore, if Figure 3 As shown, based on the above-mentioned distributed screen projection method and system across devices, the present invention also provides a terminal accordingly, and the terminal includes a processor 10, a memory 20 and a display 30. Figure 3 Only some components of the terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0097] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the terminal. Furthermore, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code of the installation terminal. The memory 20 can also be used to temporarily store data that has been output or is to be output. In one embodiment, a distributed screen projection program 40 across devices is stored on the memory 20, and the distributed screen projection program 40 across devices can be executed by the processor 10, thereby realizing the distributed screen projection method across devices in the present application.
[0098] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor or other data processing chip, used to run the program code or process data stored in the memory 20, such as executing the cross-device distributed screen projection method.
[0099] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0100] In one embodiment, when the processor 10 executes the distributed screen projection program 40 across devices in the memory 20, the following steps are implemented:
[0101] When receiving a device networking instruction, obtaining a device communication protocol of a source device according to the device networking instruction, and controlling the source device to perform device discovery processing according to the device communication protocol to obtain a plurality of target devices within a preset signal range;
[0102] Acquire a distributed soft bus, and network the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network;
[0103] When receiving a device screen projection instruction, the screen projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the screen projection device are obtained according to the device screen projection instruction, and the screen projection content is encoded and compressed according to the device network status to obtain the target screen projection content;
[0104] The target screen projection content is encrypted to obtain the encrypted screen projection content, and the encrypted screen projection content is sent to the screen projection device for screen projection display.
[0105] Among them, when receiving the device networking instruction, obtaining the device communication protocol of the source device according to the device networking instruction, and controlling the source device to perform device discovery processing according to the device communication protocol to obtain multiple target devices within a preset signal range, specifically includes:
[0106] When receiving a device networking instruction issued by a user, determining a source device and a corresponding device communication protocol of the source device according to the device networking instruction, and setting a device discovery strategy of the source device, wherein the device discovery strategy includes a device discovery frequency, a data reporting frequency, and a scanning period;
[0107] Determine a preset signal range of the source device, control the source device to send a request message in a broadcast manner within the preset signal range according to the device communication protocol and the device discovery strategy, and receive multiple returned message response information in real time;
[0108] Performing verification processing on the plurality of message response information, and obtaining a plurality of target message response information that pass the verification from the plurality of message response information;
[0109] A plurality of target devices corresponding to the plurality of target message response information are determined, and the plurality of target devices are determined to be networkable devices.
[0110] The step of obtaining a distributed soft bus and networking the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network specifically includes:
[0111] Acquire device node information of the source device and the plurality of target devices, wherein the device node information includes device scanning perception information, device status information, and device attribute information;
[0112] A distributed soft bus is obtained, and the distributed soft bus is used to network the source device and the plurality of target devices according to the device node information to obtain a soft bus network.
[0113] The method further comprises: obtaining a distributed soft bus, and networking the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network; and then:
[0114] When the source device and the plurality of target devices are networked and connected, a detection heartbeat packet is generated at a preset interval according to the distributed soft bus;
[0115] If it is determined according to the detection heartbeat packet that the networking of the source device and the plurality of target devices is abnormal, the source device and the plurality of target devices are re-networked.
[0116] Among them, when receiving the device screen projection instruction, the screen projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the screen projection device are obtained according to the device screen projection instruction, and the screen projection content is encoded and compressed according to the device network status to obtain the target screen projection content, specifically including:
[0117] When receiving a device screen projection instruction issued by a user, determining a screen projection device and a screen projection device in the soft bus network according to the device screen projection instruction;
[0118] Obtain the screen projection permission information of the projected device, and determine whether the projected device allows the projection device to project the screen according to the screen projection permission information; if allowed, obtain the projection content of the projection device according to the device projection instruction;
[0119] Obtain the device network status between the screen projection device and the screen projection device, determine the data compression ratio according to the device network status, and encode and compress the screen projection content according to the data compression ratio to obtain the target screen projection content.
[0120] The encrypting the target screen projection content to obtain the encrypted screen projection content, and sending the encrypted screen projection content to the screen projection device for screen projection display, specifically includes:
[0121] Obtain the user's screen projection requirement information and the device identification information of the screen projection device, and generate an encrypted password according to the screen projection requirement information and the device identification information;
[0122] Encrypt the target screen projection content according to the encryption password to obtain encrypted screen projection content;
[0123] The encrypted projection content is sent to the projection device through the distributed soft bus, and the projection device is controlled to decrypt and decode the encrypted projection content to obtain the target projection content, and the target projection content is projected and displayed on the projection device.
[0124] The target screen projection content is encrypted to obtain the encrypted screen projection content, and the encrypted screen projection content is sent to the screen projection device for screen projection display, and then the following steps are further included:
[0125] Obtain the first clock information corresponding to the screen projection device and the second clock information of the projected screen device, and use the clock technology of the distributed soft bus to correct the second clock information according to the first clock information to control the screen projection device and the projected screen device to perform synchronous screen projection and display.
[0126] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a cross-device distributed screen projection program, and when the cross-device distributed screen projection program is executed by a processor, the steps of the cross-device distributed screen projection method as described above are implemented.
[0127] In summary, the present invention provides a distributed screen projection method, system, terminal and computer-readable storage medium across devices, the method comprising: when receiving a device networking instruction, obtaining the device communication protocol of the source device according to the device networking instruction, and controlling the source device to perform device discovery processing according to the device communication protocol to obtain multiple target devices within a preset signal range; obtaining a distributed soft bus, and networking the source device and multiple target devices according to the distributed soft bus to obtain a soft bus network; when receiving a device screen projection instruction, obtaining the projection content of the projection device in the soft bus network and the device network status between the projection device and the projection device according to the device screen projection instruction, and encoding and compressing the projection content according to the device network status to obtain the target projection content; encrypting the target projection content to obtain encrypted projection content, and sending the encrypted projection content to the projection device for projection display. The present invention discovers each other between devices with different communication protocols, and uses a distributed soft bus to connect and network different devices. Based on the networking connection between devices, it is possible to establish a screen projection connection between networking devices in the soft bus network, and encode and compress the projection content according to the network conditions between the projection devices. This can effectively realize the screen projection display between devices with different communication protocols. At the same time, it can also ensure that the data projection between devices with different communication protocols is adjusted according to the network status between the devices to ensure the smooth completion of the screen projection between devices.
[0128] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or terminal including the element.
[0129] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer-readable storage medium that can be read by a computer, and the program can include the processes of the above-mentioned method embodiments when executed. The computer-readable storage medium can be a memory, a disk, an optical disk, etc.
[0130] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A distributed screen projection method across devices, characterized in that: The cross-device distributed screen projection method includes: When receiving a device networking instruction, obtaining a device communication protocol of a source device according to the device networking instruction, and controlling the source device to perform device discovery processing according to the device communication protocol to obtain a plurality of target devices within a preset signal range; Acquire a distributed soft bus, and network the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network; When receiving a device screen projection instruction, the screen projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the screen projection device are obtained according to the device screen projection instruction, and the screen projection content is encoded and compressed according to the device network status to obtain the target screen projection content; The target screen projection content is encrypted to obtain the encrypted screen projection content, and the encrypted screen projection content is sent to the screen projection device for screen projection display.
2. The distributed screen projection method across devices according to claim 1, characterized in that: When receiving a device networking instruction, obtaining a device communication protocol of a source device according to the device networking instruction, and controlling the source device to perform device discovery processing according to the device communication protocol to obtain multiple target devices within a preset signal range, specifically includes: When receiving a device networking instruction issued by a user, determining a source device and a corresponding device communication protocol of the source device according to the device networking instruction, and setting a device discovery strategy of the source device, wherein the device discovery strategy includes a device discovery frequency, a data reporting frequency, and a scanning period; Determine a preset signal range of the source device, control the source device to send a request message in a broadcast manner within the preset signal range according to the device communication protocol and the device discovery strategy, and receive multiple returned message response information in real time; Performing verification processing on the plurality of message response information, and obtaining a plurality of target message response information that pass the verification from the plurality of message response information; A plurality of target devices corresponding to the plurality of target message response information are determined, and the plurality of target devices are determined to be networkable devices.
3. The distributed screen projection method across devices according to claim 1, characterized in that: The obtaining of a distributed soft bus, and networking the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network, specifically includes: Acquire device node information of the source device and the plurality of target devices, wherein the device node information includes device scanning perception information, device status information, and device attribute information; A distributed soft bus is obtained, and the distributed soft bus is used to network the source device and the plurality of target devices according to the device node information to obtain a soft bus network.
4. The distributed screen projection method across devices according to claim 1, characterized in that: The step of obtaining a distributed soft bus and networking the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network further includes: When the source device and the plurality of target devices are networked and connected, a detection heartbeat packet is generated at a preset interval according to the distributed soft bus; If it is determined according to the detection heartbeat packet that the networking of the source device and the plurality of target devices is abnormal, the source device and the plurality of target devices are re-networked.
5. The distributed screen projection method across devices according to claim 1, characterized in that: When receiving a device screen projection instruction, obtaining the projection content of the projection device in the soft bus network and the device network status between the projection device and the projected device according to the device screen projection instruction, and encoding and compressing the projection content according to the device network status to obtain the target projection content, specifically including: When receiving a device screen projection instruction issued by a user, determining a screen projection device and a screen projection device in the soft bus network according to the device screen projection instruction; Obtain the screen projection permission information of the projected device, and determine whether the projected device allows the projection device to project the screen according to the screen projection permission information; if allowed, obtain the projection content of the projection device according to the device projection instruction; Obtain the device network status between the screen projection device and the screen projection device, determine the data compression ratio according to the device network status, and encode and compress the screen projection content according to the data compression ratio to obtain the target screen projection content.
6. The distributed screen projection method across devices according to claim 1, characterized in that: The encrypting the target screen projection content to obtain the encrypted screen projection content, and sending the encrypted screen projection content to the screen projection device for screen projection display, specifically includes: Obtain the user's screen projection requirement information and the device identification information of the screen projection device, and generate an encrypted password according to the screen projection requirement information and the device identification information; Encrypt the target screen projection content according to the encryption password to obtain encrypted screen projection content; The encrypted projection content is sent to the projection device through the distributed soft bus, and the projection device is controlled to decrypt and decode the encrypted projection content to obtain the target projection content, and the target projection content is projected and displayed on the projection device.
7. The distributed screen projection method across devices according to claim 1, characterized in that: The target screen projection content is encrypted to obtain the encrypted screen projection content, and the encrypted screen projection content is sent to the screen projection device for screen projection display, and then further includes: Obtain the first clock information corresponding to the screen projection device and the second clock information of the projected screen device, and use the clock technology of the distributed soft bus to correct the second clock information according to the first clock information to control the screen projection device and the projected screen device to perform synchronous screen projection and display.
8. A distributed screen projection system across devices, characterized in that: The cross-device distributed screen projection system includes: A device discovery processing module, configured to, when receiving a device networking instruction, obtain a device communication protocol of a source device according to the device networking instruction, and control the source device to perform device discovery processing according to the device communication protocol to obtain a plurality of target devices within a preset signal range; A device networking connection module, used for acquiring a distributed soft bus, and networking the source device and the plurality of target devices according to the distributed soft bus to obtain a soft bus network; The coding and compression processing module is used for, when receiving a device screen projection instruction, obtaining the projection content of the screen projection device in the soft bus network and the device network status between the screen projection device and the projected device according to the device screen projection instruction, and encoding and compressing the projection content according to the device network status to obtain the target projection content; The device screen projection and display module is used to encrypt the target screen projection content to obtain the encrypted screen projection content, and send the encrypted screen projection content to the projected screen device for screen projection and display.
9. A terminal, characterized in that: The terminal includes: a memory, a processor, and a cross-device distributed screen projection program stored in the memory and executable on the processor. When the cross-device distributed screen projection program is executed by the processor, the steps of the cross-device distributed screen projection method as described in any one of claims 1-7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a cross-device distributed screen projection program, and when the cross-device distributed screen projection program is executed by the processor, the steps of the cross-device distributed screen projection method as described in any one of claims 1-7 are implemented.