Screen projection method, electronic equipment, storage medium and program product

By adding two associated data packets to the BLE Bluetooth broadcast data of the screen projection target device, using BLE Bluetooth search and verification information to determine the packet relationship, decrypting and obtaining device information and wireless connection information, the problem of existing screen projection technology requiring the device to be connected to the same local area network is solved, and more flexible screen projection scenarios and higher security are achieved.

CN119893200AActive Publication Date: 2025-04-25HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311395705.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25
Estimated Expiration
2043-10-25

AI Technical Summary

Technical Problem

The existing screen projection technology requires the screen projection equipment to be connected to the same LAN, which limits the usage scenarios and flexibility of screen projection.

Method used

By adding two associated data packets to the BLE Bluetooth broadcast data of the screen projection target device, the two associated data packets are determined through the BLE Bluetooth search and verification information during the screen projection process of the screen projection source device, and the encryption information of the other is decrypted based on the key of one of them, thereby obtaining device information and wireless connection information, realizing device discovery and screen projection.

Benefits of technology

It realizes screen projection without connecting to the same LAN without requiring the screen projection device to be connected to the same LAN, reducing the limitations of screen projection, increasing the flexibility of usage scenarios, and improving the security of the screen projection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893200A_ABST
    Figure CN119893200A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a screen projection method, electronic equipment, a storage medium and a program product, relates to the technical field of video screen projection and whole house intelligence, and aims to reduce the limitation of screen projection and enable the use scene of the screen projection to be more flexible by connecting double-end equipment which does not need screen projection to the same local area network. The screen projection method comprises the following steps: in response to an operation of initiating screen projection, initiating low power consumption BLE Bluetooth broadcast search; a first data packet and a second data packet are obtained from the BLE Bluetooth broadcast data, the first data packet comprises first verification information and encrypted information, and the second data packet comprises second verification information and a secret key; decrypting the encrypted information according to the key; determining that the first data packet and the second data packet are associated screen projection information; displaying a screen projection equipment selection interface; establishing a wireless connection with the screen projection target device in response to a selection operation on the option of the screen projection target device; and initiating video screen projection to the screen projection target device based on the wireless connection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of screen projection technology, and specifically to a screen projection method, electronic device, storage medium and program product. Background Art

[0002] With the increase in interactive functions between electronic devices, more and more users are using the screen projection function. For example, when a user uses a video playback application on a mobile phone, the screen projection function can be used to play the video on the TV. Among them, screen projection can be achieved between the mobile phone and the TV through the Digital Living Network Alliance (DLNA) protocol. During the screen projection process, it is first necessary to discover the device through the Simple Service Discovery Protocol (SSDP). This process requires that the mobile phone and the TV are connected to the same local area network. This results in the screen projection function being limited, and it is impossible to cast the screen based on dual-end devices that are not connected to the same Wireless Fidelity (Wi-Fi) local area network. Summary of the Invention

[0003] In view of this, the present application provides a screen projection method, electronic device, storage medium and program product, which can eliminate the need for dual-end devices for screen projection to be connected to the same local area network, thereby reducing the limitations of screen projection and making the use scenarios of screen projection more flexible.

[0004] In a first aspect, an embodiment of the present application provides a screen projection method, which is applied to a screen projection source device, and the method includes: in response to an operation of initiating screen projection, initiating a low-power BLE Bluetooth broadcast search; receiving the searched BLE Bluetooth broadcast data, and obtaining a first data packet and a second data packet from the BLE Bluetooth broadcast data, the first data packet including first verification information and encryption information, and the second data packet including second verification information and a key; decrypting the encrypted information according to the key, and obtaining device information and wireless connection information from the decrypted encrypted information; determining that the first data packet and the second data packet are associated screen projection information based on the first verification information and the second verification information; displaying a screen projection device selection interface, the screen projection device selection interface displays alternative device options corresponding to one or more screen projection information determined in the BLE Bluetooth broadcast data, wherein the alternative device options include device information in the corresponding one or more screen projection information; in response to a selection operation of a screen projection target device option in at least one alternative device option, sending a wireless connection request to the screen projection target device based on the wireless connection information in the screen projection information corresponding to the screen projection target device option, and establishing a wireless connection with the screen projection target device; initiating video screen projection to the screen projection target device based on the wireless connection.

[0005] By adding two related data packets to the BLE Bluetooth broadcast data of the target device, the two related data packets are determined through BLE Bluetooth search and verification information during the screen projection process of the source device, and the encrypted information in one of them is decrypted based on the key of the other to obtain device information and wireless connection information, so as to discover the target device, and then establish a wireless connection based on the wireless connection information and realize screen projection. Since the device is discovered by BLE Bluetooth search, there is no need for both ends to be connected to the same local area network, so there are fewer restrictions on screen projection and the usage scenarios are more flexible. In addition, the BLE Bluetooth search method has a lower probability of not finding a device than the SSDP method of discovering devices. In addition, since the BLE Bluetooth search has a small distance range, it is not easy to search for irrelevant devices, and it is easier to determine the target device for screen projection, and it is not easy to cause screen projection confusion due to a large number of searched devices. Moreover, the encrypted information in one of the two data packets is decrypted by the plaintext information of the other, rather than just verification by the plaintext information, thereby improving the security of the screen projection process and avoiding the data packet being misidentified by other devices.

[0006] In one possible embodiment, obtaining device information and wireless connection information from the decrypted encrypted information includes: obtaining device information, wireless connection information and third verification information from the decrypted encrypted information; the process of determining that the first data packet and the second data packet are associated screen projection information based on the first verification information and the second verification information includes: determining that the first data packet and the second data packet are associated screen projection information based on the first verification information, the second verification information and the third verification information. In the process of determining the screen projection information from the BLE Bluetooth broadcast data, in addition to verification based on the first verification information and the second verification information in plain text, verification can also be performed based on the third verification information in the encrypted information. The third verification information in the first data packet can only be verified after being decrypted by the key in the second data packet, thereby further improving security.

[0007] In one possible implementation, the first verification information includes a universally unique identifier (UUID), the second verification information includes the UUID, the service identifier (serviceID), and information about starting screen projection. The third verification information includes the serviceID, which is used to indicate the screen projection service. Verification using UUID and serviceID can improve the scalability of the overall process, and based on different serviceID verification results, the data packet can be expanded for use in other scenarios.

[0008] In one possible embodiment, the method further includes: in response to an operation of initiating screen projection, sending a BLE Bluetooth broadcast including a third data packet, the third data packet including third verification information; obtaining a fourth data packet from the BLE Bluetooth broadcast data, the fourth data packet including fourth verification information, device information, and wireless connection information; and determining that the fourth data packet is screen projection information based on the fourth verification information. The process of determining screen projection information based on the first data packet and the second data packet is passive device discovery, and the process of determining screen projection information based on the fourth data packet is active device discovery. The process of active device discovery and the process of passive device discovery are performed simultaneously, thereby improving the probability and speed of device discovery.

[0009] In one possible implementation, after the first and second data packets are determined to be related projection information based on the first and second verification information, the third data packet is stopped from being sent. That is, if the passive device discovery process has already discovered a device, the third data packet for active device discovery is no longer sent, thereby achieving a logically closed loop for the overall process and improving security.

[0010] In one possible implementation, the screen projection source device is a file sharing source device, the operation of initiating screen projection is the operation of initiating file sharing, serviceID is used to represent the file sharing service, the screen projection information is file sharing information, the screen projection device selection interface is the sharing device selection interface, the screen projection target device option is the file sharing target device option, the screen projection target device is the file sharing target device, initiating video screen projection is initiating file sharing, and the action information of starting screen projection is the action information of starting file sharing. In the file sharing scenario, dual-end devices can implement device discovery based on BLE Bluetooth broadcast, that is, determine file sharing information based on BLE Bluetooth broadcast, and then establish a wireless connection based on the device information and wireless connection information in the file sharing information and implement file sharing based on the wireless connection, which expands the application scenario of the interaction process.

[0011] In one possible implementation, either the first data packet or the second data packet is the same broadcast structure of a protocol data unit in Bluetooth broadcast data. In this way, no major changes to the existing Bluetooth protocol are required; simply by adding screen projection capability information to the reserved fields in the protocol to enable discovery of devices with screen projection capabilities.

[0012] In one possible implementation, the wireless connection is a low-power BLE Bluetooth connection or a wireless fidelity Wi-Fi point-to-point P2P connection. Device discovery can be achieved through the above-mentioned Bluetooth search method. Wireless screen projection can be achieved through more than one connection method. BLE Bluetooth connection can be directly achieved based on the discovered device, and video projection can be initiated based on the BLE Bluetooth connection; Wi-Fi P2P connection can also be achieved based on the discovered device, and video projection can be initiated based on the Wi-Fi P2P connection.

[0013] In one possible implementation, the wireless connection is a BLE Bluetooth connection; initiating video projection to the target device based on the wireless connection includes sending an online video address to the target device based on the BLE Bluetooth connection, thereby enabling online video projection. That is, both the device discovery and the established wireless connection are implemented via Bluetooth, which reduces restrictions on devices on both ends of the projection, and the BLE Bluetooth implementation has low power consumption.

[0014] In one possible implementation, the wireless connection is a Wi-Fi P2P connection; initiating video projection to the target device based on the wireless connection includes: sending an online video address or a local video to the target device based on the Wi-Fi P2P connection. Since the bandwidth of the Wi-Fi P2P connection is large, projection including local videos can be achieved. Therefore, the Wi-Fi P2P connection can be achieved based on the device discovered via Bluetooth, and the projection of the local video can be achieved based on the Wi-Fi P2P connection.

[0015] In the second aspect, an embodiment of the present application provides a screen projection method, which is applied to a screen projection target device, and the method includes: in response to an operation of initiating a Bluetooth broadcast, initiating a low-power BLE Bluetooth broadcast, the data of the BLE Bluetooth broadcast includes a first data packet and a second data packet, the first data packet includes first verification information and encryption information, the second data packet includes second verification information and a key, the key is used to decrypt the encrypted information, and the encrypted information includes device information and wireless connection information; receiving a wireless connection request sent by a screen projection source device, and establishing a wireless connection with the screen projection source device based on the wireless connection request; and performing video screen projection based on the wireless connection.

[0016] In one possible implementation, the encrypted information also includes third verification information. In the process of determining the projection information from the BLE Bluetooth broadcast data, in addition to verification based on the first verification information and the second verification information in plain text, verification can also be performed based on the third verification information in the encrypted information. The third verification information in the first data packet can only be verified after being decrypted by the key in the second data packet, thereby further improving security.

[0017] In one possible implementation, the first verification information includes a universally unique identifier (UUID), the second verification information includes the UUID, the service identifier (serviceID), and information about the action to start screen projection, and the third verification information includes the serviceID. Verification using UUID and serviceID can improve the scalability of the overall process, and based on different serviceID verification results, the data packet can be expanded for use in other scenarios.

[0018] In one possible implementation, the method further includes: receiving a third data packet sent by the screen projection source device via BLE Bluetooth broadcast; obtaining third verification information from the third data packet; and in response to obtaining the third verification information, sending a fourth data packet via BLE Bluetooth broadcast, wherein the fourth data packet includes fourth verification information, device information, and wireless connection information. The process of determining the screen projection information based on the first data packet and the second data packet is passive device discovery, and the process of determining the screen projection information based on the fourth data packet is active device discovery. The process of active device discovery and the process of passive device discovery are performed simultaneously, thereby improving the probability and speed of device discovery.

[0019] In one possible implementation, in response to obtaining the third verification information, the first and second data packets are stopped from being sent. That is, if the active device discovery process has already discovered a device, the first and second data packets used for passive device discovery are no longer sent, thereby achieving a logically closed loop for the overall process and improving security.

[0020] In one possible implementation, the screen projection target device is a file sharing target device, serviceID is used to represent the file sharing service, the screen projection source device is a file sharing source device, executing video screen projection is executing file sharing, and the action information for starting screen projection is the action information for starting file sharing, which expands the application scenarios of the interaction process.

[0021] In one possible implementation, either the first data packet or the second data packet is the same broadcast structure of a protocol data unit in Bluetooth broadcast data. In this way, no major changes to the existing Bluetooth protocol are required; simply by adding screen projection capability information to the reserved fields in the protocol to enable discovery of devices with screen projection capabilities.

[0022] In a possible implementation, the wireless connection is a low-power Bluetooth BLE connection or a Wireless Fidelity Wi-Fi point-to-point P2P connection.

[0023] In one possible implementation, the wireless connection is a Bluetooth Low Energy (BLE) connection; initiating video projection to the target device based on the wireless connection includes sending an online video address to the target device based on the BLE connection. This means that both the device discovery and the established wireless connection are implemented using Bluetooth, which reduces device restrictions on both ends of the projection, and the BLE implementation offers lower power consumption.

[0024] In one possible implementation, the wireless connection is a Wi-Fi P2P connection; initiating video projection to a target device based on the wireless connection includes sending an online video address or a local video to the target device based on the Wi-Fi P2P connection. Because Wi-Fi P2P connections have a large bandwidth and can include projection of local videos, a Wi-Fi P2P connection can be established based on devices discovered via Bluetooth, and projection of local videos can be achieved based on the Wi-Fi P2P connection.

[0025] According to a third aspect, a screen projection method is provided, which is applied to a screen projection source device. The method includes: in response to an operation of initiating screen projection, initiating a low-power BLE Bluetooth broadcast, the data of the low-power BLE Bluetooth broadcast includes a first data packet and a second data packet, the first data packet includes first verification information and encryption information, the second data packet includes second verification information and a key, the key is used to decrypt the encrypted information, and the encrypted information includes device information and wireless connection information; receiving a wireless connection request sent by a screen projection target device, and establishing a wireless connection with the screen projection source device based on the wireless connection request; and initiating video screen projection to the screen projection target device based on the wireless connection.

[0026] In a possible implementation, the encrypted information further includes third verification information.

[0027] In one possible implementation, the first verification information includes a universally unique identifier UUID, the second verification information includes the UUID, a service identifier serviceID, and action information for starting screen projection, and the third verification information includes serviceID.

[0028] In a possible embodiment, the method also includes: receiving a third data packet sent by the screen projection target device via BLE Bluetooth broadcast; obtaining third verification information from the third data packet; in response to obtaining the third verification information, sending a fourth data packet via BLE Bluetooth broadcast, the fourth data packet including fourth verification information, device information and wireless connection information.

[0029] In a possible implementation, in response to obtaining the third verification information, sending the first data packet and the second data packet is stopped.

[0030] In one possible implementation, the screen projection target device is a file sharing target device, serviceID is used to represent the file sharing service, the screen projection source device is a file sharing source device, initiating video screen projection is initiating file sharing, and the action information for starting screen projection is the action information for starting file sharing.

[0031] In one possible implementation, either the first data packet or the second data packet is the same broadcast structure of a protocol data unit in Bluetooth broadcast data. In this way, no major changes to the existing Bluetooth protocol are required; simply by adding screen projection capability information to the reserved fields in the protocol to enable discovery of devices with screen projection capabilities.

[0032] In one possible implementation, the wireless connection is a low-power BLE Bluetooth connection or a wireless fidelity Wi-Fi point-to-point P2P connection. Device discovery can be achieved through the above-mentioned Bluetooth search method. Wireless screen projection can be achieved through more than one connection method. BLE Bluetooth connection can be directly achieved based on the discovered device, and video projection can be initiated based on the BLE Bluetooth connection; Wi-Fi P2P connection can also be achieved based on the discovered device, and video projection can be initiated based on the Wi-Fi P2P connection.

[0033] In one possible implementation, the wireless connection is a BLE Bluetooth connection; initiating video projection to the target device based on the wireless connection includes sending an online video address to the target device based on the BLE Bluetooth connection, thereby enabling online video projection. That is, both the device discovery and the established wireless connection are implemented via Bluetooth, which reduces restrictions on devices on both ends of the projection, and the BLE Bluetooth implementation has low power consumption.

[0034] In one possible implementation, the wireless connection is a Wi-Fi P2P connection; initiating video projection to the target device based on the wireless connection includes: sending an online video address or a local video to the target device based on the Wi-Fi P2P connection. Since the bandwidth of the Wi-Fi P2P connection is large, projection including local videos can be achieved. Therefore, the Wi-Fi P2P connection can be achieved based on the device discovered via Bluetooth, and the projection of the local video can be achieved based on the Wi-Fi P2P connection.

[0035] In a fourth aspect, a screen projection method is provided, which is applied to a screen projection target device, and the method includes: in response to an operation of initiating a Bluetooth search, initiating a low-power BLE Bluetooth broadcast search; receiving the searched BLE Bluetooth broadcast data, and obtaining a first data packet and a second data packet from the BLE Bluetooth broadcast data, the first data packet including first verification information and encryption information, and the second data packet including second verification information and a key; decrypting the encrypted information according to the key, and obtaining device information and wireless connection information from the decrypted encrypted information; determining that the first data packet and the second data packet are associated screen projection information based on the first verification information and the second verification information; displaying a screen projection device selection interface, the screen projection device selection interface displays alternative device options corresponding to one or more screen projection information determined in the BLE Bluetooth broadcast data, wherein the alternative device options include device information in the corresponding one or more screen projection information; in response to a selection operation of a screen projection source device option in at least one alternative device option, sending a wireless connection request to the screen projection source device based on the wireless connection information in the screen projection information corresponding to the screen projection source device option, and establishing a wireless connection with the screen projection source device; performing video screen projection based on the wireless connection.

[0036] In one possible embodiment, obtaining device information and wireless connection information from the decrypted encrypted information includes: obtaining device information, wireless connection information and third verification information from the decrypted encrypted information; the process of determining that the first data packet and the second data packet are associated projection information based on the first verification information and the second verification information includes: determining that the first data packet and the second data packet are associated projection information based on the first verification information, the second verification information and the third verification information.

[0037] In one possible implementation, the first verification information includes the universal unique identifier UUID, the second verification information includes the UUID, the service identifier serviceID and the action information for starting screen projection, and the third verification information includes serviceID, where serviceID is used to represent the screen projection service.

[0038] In a possible embodiment, the method also includes: in response to an operation of initiating a Bluetooth search, sending a BLE Bluetooth broadcast including a third data packet, the third data packet including third verification information; obtaining a fourth data packet from the BLE Bluetooth broadcast data, the fourth data packet including fourth verification information, device information and wireless connection information; and determining that the fourth data packet is screen projection information based on the fourth verification information.

[0039] In a possible implementation, after determining that the first data packet and the second data packet are associated screen projection information based on the first verification information and the second verification information, sending the third data packet is stopped.

[0040] In one possible implementation, the screen projection source device is a file sharing source device, serviceID is used to represent the file sharing service, the screen projection information is file sharing information, the screen projection device selection interface is a sharing device selection interface, the screen projection target device option is a file sharing target device option, the screen projection target device is a file sharing target device, executing video screen projection is executing file sharing, and the action information for starting screen projection is the action information for starting file sharing.

[0041] In one possible implementation, either the first data packet or the second data packet is the same broadcast structure of a protocol data unit in Bluetooth broadcast data. In this way, no major changes to the existing Bluetooth protocol are required; simply by adding screen projection capability information to the reserved fields in the protocol to enable discovery of devices with screen projection capabilities.

[0042] In a possible implementation, the wireless connection is a low-power Bluetooth BLE connection or a Wireless Fidelity Wi-Fi point-to-point P2P connection.

[0043] In one possible implementation, the wireless connection is a Bluetooth Low Energy (BLE) connection; initiating video projection to the target device based on the wireless connection includes sending an online video address to the target device based on the BLE connection. This means that both the device discovery and the established wireless connection are implemented using Bluetooth, which reduces device restrictions on both ends of the projection, and the BLE implementation offers lower power consumption.

[0044] In one possible implementation, the wireless connection is a Wi-Fi P2P connection; initiating video projection to a target device based on the wireless connection includes sending an online video address or a local video to the target device based on the Wi-Fi P2P connection. Because Wi-Fi P2P connections have a large bandwidth and can include projection of local videos, a Wi-Fi P2P connection can be established based on devices discovered via Bluetooth, and projection of local videos can be achieved based on the Wi-Fi P2P connection.

[0045] In a fifth aspect, an electronic device is provided, comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device executes the above-mentioned screen projection method.

[0046] In a sixth aspect, a computer-readable storage medium is provided, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned screen projection method.

[0047] In a seventh aspect, a computer program product is provided, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes the above-mentioned screen projection method. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0049] Figure 1 A schematic diagram of an architecture involving multicast in related technologies;

[0050] Figure 2 A schematic diagram of a process for discovering a device in the related art;

[0051] Figure 3 This is a structural block diagram of an electronic device according to an embodiment of the present application;

[0052] Figure 4 This is a software architecture diagram of an electronic device in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of screen projection between a screen projection source device and a screen projection target device in an embodiment of the present application;

[0054] Figure 6 A schematic diagram of an interaction process between a screen projection source device and a screen projection target device in an embodiment of the present application;

[0055] Figure 7 A schematic diagram of a device discovery process between a screen projection source device and a screen projection target device in an embodiment of the present application;

[0056] Figure 8 This is a schematic diagram of the structure of Bluetooth broadcast data in an embodiment of the present application;

[0057] Figure 9 Schematic diagram of another interaction process between a screen projection source device and a screen projection target device in an embodiment of the present application;

[0058] Figure 10 This is a schematic diagram of a system involved in online video projection in an embodiment of the present application;

[0059] Figure 11 Schematic diagram of another interaction process between a screen projection source device and a screen projection target device in an embodiment of the present application;

[0060] Figure 12This is a schematic diagram of another interaction process between the screen projection source device and the screen projection target device in an embodiment of the present application. DETAILED DESCRIPTION

[0061] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0062] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0063] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.

[0064] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.

[0065] Before explaining the technical solution of the embodiment of the present application, the related technology and its technical problems are first introduced. In the related technology, the Digital Living Network Alliance (DLNA) protocol is used for screen projection. Screen projection requires the use of SSDP to discover the device, and then the video playback link, that is, the Uniform Resource Locator (URL) is passed to the large screen through the Simple Object Access Protocol (SOAP) remote call. After the large screen receives the URL, it starts the local player to play the video based on the URL. SSDP provides a mechanism for discovering devices in a local area network. The control point can use SSDP to query the devices that provide specific services in its local network according to its needs. The device can also use SSDP to declare its existence to the control point in its local network. Taking the discovery between a mobile phone and a TV as an example, Figure 1 As shown in the figure, the mobile phone can use the multicast address 239.255.255.250 and port 1900 to realize device discovery. There are two ways to discover devices: active discovery and passive discovery. Figure 2As shown, during the active discovery process, the mobile phone initiates a multicast search (M-Search) message. After the TV listens to the M-Search message of the mobile phone at the multicast address and port, it replies to the message. The mobile phone reads the device information of the TV through the reply message, thereby discovering the device. During the passive discovery process, the TV sends a notification online message to the multicast address and port to notify the mobile phone in the network that the TV is online. The mobile phone listens to the multicast address and port for messages. After listening to the TV online message, the mobile phone requests the TV to describe the problem of the device, thereby discovering the device. However, this method of discovering devices requires that the devices are connected to the same local area network. If the devices are not connected to the same local area network, they cannot be projected based on this method, which limits the projection scenario. In addition, this method is prone to failure to search for devices due to routers, network packet loss, virtual private networks (VPNs), port occupation, etc. In some scenarios such as hotels, many users are connected to the same local area network. When a user projects the screen to the TV in his room, but searches for many devices, the user cannot distinguish between the room and the corresponding device name, resulting in a problem of screen projection confusion.

[0066] In order to solve the above problems, a technical solution of the embodiment of the present application is provided. The technical solution of the embodiment of the present application is described below.

[0067] First, the electronic device involved in the embodiment of the present application is described. Figure 3 A schematic structural diagram of the electronic device 100 is shown.

[0068] The electronic device 100 may include a processor 110 , an external memory interface 120 , an internal memory 121 , a wireless communication module 160 , a display screen 194 , an antenna 1 , and the like.

[0069] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0070] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The processor 110 may be used for functions such as encoding and decoding audio and video streams.

[0071] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0072] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0073] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the wireless communication module 160, the modem processor and the baseband processor.

[0074] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 1, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 1. The wireless communication module 160 includes, for example, a Bluetooth chip.

[0075] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0076] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0077] In some embodiments, the electronic device 100 may include a touch sensor on the display screen 194. The touch sensor and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor is configured to detect touch operations applied thereto or in the vicinity thereof. The touch sensor may transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations may be provided via the display screen 194. In other embodiments, the touch sensor may be located on the surface of the electronic device 100, at a location different from that of the display screen 194.

[0078] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0079] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0080] Figure 4 1 is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.

[0081] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0082] The application layer can include a series of application packages.

[0083] like Figure 4 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0084] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0085] like Figure 4 As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, and the like.

[0086] The window manager manages window applications. Content providers store and retrieve data and make it accessible to applications. This data can include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and phone books.

[0087] The view system includes visual controls, such as controls for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views.

[0088] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0089] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0090] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0091] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0092] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0093] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0094] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0095] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0096] A 2D graphics engine is a drawing engine for 2D drawings.

[0097] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, Bluetooth driver, audio driver, and sensor driver.

[0098] The electronic devices involved in the embodiments of the present application may be any product such as smart TVs, mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, drone devices, smart cars, smart speakers, robots, smart glasses, etc.

[0099] like Figure 5 As shown, the system involved in the embodiment of the present application includes two electronic devices, a screen projection source device 101 and a screen projection target device 102, both of which can be Figure 3 The electronic device 100 shown in FIG. Figure 4 The software architecture shown is different in that the target device 102 is generally a device with a larger screen size than the source device 101, so that when the user is using an electronic device with a small screen, the screen can be projected to an electronic device with a large screen size for viewing. For example, the source device 101 is a mobile phone, and the target device 102 is a TV. The source device 101 refers to the electronic device that initiates the screen projection, and the target device 102 refers to the electronic device that receives the screen projection. Take a specific scenario as an example to illustrate, the user is watching a video using the video application of the source device 101, and now wants to project the video to the TV, that is, to watch it on the target device 102. You can click the TV button 1011 in the video application, and the projection source device 101 will initiate a Bluetooth broadcast search, that is, scan for Bluetooth devices. When the projection target device is found, the projection device selection interface 201 will be displayed in the interface of the projection source device 101. The projection device selection interface displays an alternative device option 202 corresponding to the projection target device 102. The alternative device option 202 includes the name of the projection target device 102, such as "xx TV xx". After the user clicks the alternative device option 202, video projection is performed between the projection source device 101 and the projection target device 102, that is, the video currently playing on the projection source device 101 can be projected to the projection target device 102 for playback.

[0100] The following describes the embodiment of the present application based on the interaction process between the screen projection source device 101 and the screen projection target device 102. Figure 6 and Figure 7As shown, the embodiment of the present application provides a screen projection interaction method, including a screen projection method applied to a screen projection source device 101 and a screen projection method applied to a screen projection target device 102. The screen projection method applied to the screen projection source device 101 includes steps 301 to 308, and the screen projection method applied to the screen projection target device 102 includes steps 401 to 403. The following description takes the screen projection source device 101 as a mobile phone and the screen projection target device 102 as a TV as an example.

[0101] The interaction process includes:

[0102] The user initiates a BLE broadcast on the target device 102. For example, the user turns on the Bluetooth function in the settings interface of the target device 102, so that the target device 102 is discoverable via Bluetooth. It should be noted that the BLE broadcast can be initiated in various ways, such as by pressing a button on a remote control. This is not limited to this in the present embodiment and is only illustrated here as an example.

[0103] The screen projection target device 102 detects the user's operation of initiating a BLE Bluetooth broadcast on the screen projection target device 102. In response to the operation of initiating a BLE Bluetooth broadcast, the screen projection target device 102 executes step 401 and initiates a BLE Bluetooth broadcast.

[0104] Step 401 specifically includes:

[0105] The upper-layer software of the screen projection target device 102 will execute step 4011 and register the broadcast. The registered broadcast content includes a first data packet and a second data packet. The first data packet includes first verification information and encryption information, and the second data packet includes second verification information and a key. The key is used to decrypt the encrypted information, and the encrypted information includes device information and wireless connection information. In an embodiment of the present application, a first data packet and a second data packet are added to the reserved field of the Bluetooth general protocol of the screen projection target device 102, which are used to identify the corresponding device and establish a connection in the interaction process. The first data packet and the second data packet can be two data packets in the message structure respectively. For example, the data of the Bluetooth broadcast is a BLE broadcast message, and the structure of the BLE broadcast message is as follows: Figure 8As shown, octet represents an eight-bit byte, and the PDU of the BLE broadcast message includes multiple structures ADStructure. In an embodiment of the present application, a structure in the PDU can be used as a data packet. The first verification information and the second verification information may include a universally unique identifier (UUID), such as "BLECast"; device information such as the device name "xx TV xx", so that the user can select the target device for screen casting based on the device name; wireless connection information such as the Media Access Control Address (MAC) "86:xx:xx:xx:17:DB" and Bluetooth BrMAC "74:xx:xx:xx:32:40". In addition, the encrypted information may also include a service name and a callback function, which can facilitate the screen casting source device to call the callback function to execute some steps in the interaction process. The second verification information may also include action information for starting screen casting, such as "startCast", which is used to indicate the start of the screen casting action. The key is, for example, "2", which means that the encryption type solveType is 2, and the above encrypted information can be decrypted by this key. Figure 8 The broadcast message structure is only an example and is not limited to this embodiment of the present application.

[0106] The Bluetooth driver of the screen projection target device 102 executes step 4012 and initiates a BLE Bluetooth broadcast, wherein the data of the BLE Bluetooth broadcast includes the above-mentioned first data packet and second data packet. The first data packet and the second data packet can be adjacent data packets in the broadcast message, and the two can be sent alternately.

[0107] The user initiates the screen projection operation on the screen projection source device 101, for example, Figure 5 As shown, the screen projection source device 101 is running a video application. The user clicks the "TV" button 1011 in the upper right corner of the video playback interface of the screen projection source device 101. Clicking the button 1011 initiates the screen projection operation. It should be noted that the operation of initiating screen projection can be implemented in different ways, for example, it can also be triggered by a gesture operation, etc. This embodiment of the application does not limit this, and is only used as an example here.

[0108] Upon detecting a user's initiation of screen projection on source device 101, the upper-layer software of source device 101 invokes the Bluetooth driver, causing the Bluetooth driver of source device 101 to respond to the screen projection initiation and execute step 301 to initiate a BLE Bluetooth broadcast search, also known as a Bluetooth scan. For example, after a user clicks the "TV" button 1011, the video application of source device 101 invokes the Bluetooth driver, initiating a BLE Bluetooth broadcast search via the Bluetooth chip.

[0109] The Bluetooth driver of the screen projection source device 101 executes step 302 and receives the searched BLE Bluetooth broadcast data, where the BLE Bluetooth broadcast data includes multiple data packets.

[0110] The Bluetooth driver of the screen projection source device 101 can execute step 303 through the callback function and feed back the full amount of BLE Bluetooth broadcast data, that is, the at least one data packet searched, to the upper-layer software, that is, the video application;

[0111] The upper-layer software of the screen projection source device 101 executes step 304, traverses the full amount of BLE Bluetooth broadcast data searched, and obtains the first data packet and the second data packet from the searched BLE Bluetooth broadcast data, wherein the first verification information and the second verification information are plain text. According to the two verification information, verification can be performed to determine that the two data packets are related information. The encrypted information in the first data packet can be decrypted according to the key in the second data packet, and the device information and wireless connection information can be obtained from the decrypted encrypted information. The encrypted information can also have a callback function. According to the first verification information and the second verification information, the first data packet and the second data packet are determined to be related screen projection information. After the screen projection information is determined, the subsequent screen projection process will be performed, that is, if the device information and the wireless connection information are decrypted from the first data packet according to the key in the second data packet, and the verification based on the first verification information and the second verification information is successful, the subsequent step 305 is executed.

[0112] The upper-layer software of the screen projection source device 101 executes step 305 and passes the device information and wireless connection information in the screen projection information to the user interface (UI) thread.

[0113] The UI thread of the screen projection source device 101 executes step 306 and displays the screen projection device selection interface 201. The screen projection device selection interface 201 displays alternative device options 202 corresponding to one or more screen projection information determined in the BLE Bluetooth broadcast data. The alternative device options 202 include the device information in the corresponding one or more screen projection information. For example, in this embodiment, only the screen projection information corresponding to the screen projection target device 102 is searched, so only the alternative device option 202 including the device name "xx TV xx" is displayed.

[0114] The user clicks on the alternative device option 202 on the projection source device 101, that is, performs a selection operation on the projection target device option in at least one alternative device option 202. The alternative device option 202 clicked by the user is the projection target device option selected by the user. The user's selection operation on the projection target device option in at least one alternative device option 202 on the projection source device 101 is detected. The projection source device 101 executes step 307 based on the wireless connection information in the projection information corresponding to the projection target device option, sends a wireless connection request to the projection target device 102, and establishes a wireless connection with the projection target device.

[0115] The screen projection target device 102 executes step 402, receives the wireless connection request sent by the screen projection source device 101, and establishes a wireless connection with the screen projection source device based on the wireless connection request.

[0116] The screen projection source device 101 executes step 308 and initiates video screen projection to the screen projection target device 102 based on the wireless connection.

[0117] The screen projection target device 102 executes step 403 and performs video projection based on the wireless connection.

[0118] The screen projection method in the embodiment of the present application adds two related data packets to the BLE Bluetooth broadcast data of the screen projection target device, determines the two related data packets through BLE Bluetooth search and verification information during the screen projection process of the screen projection source device, decrypts the encrypted information in one of the data packets based on the key of the other to obtain device information and wireless connection information, thereby discovering the screen projection target device, and then establishes a wireless connection based on the wireless connection information to realize screen projection. Since the device is discovered by BLE Bluetooth search, there is no need for both ends to be connected to the same local area network, so there are fewer restrictions on screen projection and the usage scenarios are more flexible; in addition, the probability of not finding a device when discovering the device by BLE Bluetooth search is lower than that of discovering the device by SSDP; in addition, since the distance range of BLE Bluetooth search is small, it is not easy to search for irrelevant devices, it is easier to determine the screen projection target device, and it is not easy to cause screen projection confusion due to a large number of searched devices; and, the encrypted information in one of the two data packets is decrypted by the plaintext information of the other, rather than just verifying by the plaintext information, thereby improving the security of the screen projection process and avoiding the data packet being misidentified by other devices.

[0119] In some embodiments, the encrypted information also includes third verification information. The above-mentioned acquisition of device information and wireless connection information from the decrypted encrypted information includes: acquiring device information, wireless connection information and third verification information from the decrypted encrypted information; the above-mentioned process of determining that the first data packet and the second data packet are associated projection information based on the first verification information and the second verification information includes: determining that the first data packet and the second data packet are associated projection information based on the first verification information, the second verification information and the third verification information. That is to say, in the process of determining the projection information from the BLE Bluetooth broadcast data, in addition to verification based on the first verification information and the second verification information in plain text, verification can also be performed based on the third verification information in the encrypted information. For the third verification information in the first data packet, verification can only be performed after decryption by the key in the second data packet, thereby further improving security.

[0120] In some embodiments, the first verification information includes a universally unique identifier UUID, the second verification information includes the UUID and the service identifier serviceID and the action information for starting screen projection, and the third verification information includes serviceID. The UUID can be used to represent the BLE Bluetooth device discovery service, and the serviceID is used to represent the screen projection service. For example, the first verification information includes the UUID "BLECAST", the second verification information includes the UUID "BLECAST", the serviceID "HwBLeCast" and the action information for starting screen projection "startCast", and the third verification information includes serviceID "HwBLeCast". The screen projection source device determines that the UUIDs in the first verification information and the second verification information are the same, both are "BLECAST", then it is determined that the service corresponding to the two data packets is the BLE Bluetooth device discovery service, and the serviceIDs in the second verification information and the third verification information are the same, both are "HwBLeCast", then it is determined that the service corresponding to the two data packets is the screen projection service. In addition, according to the action information "startCast" for starting screen projection in the second data packet, the screen projection process is started, and it is determined that the first data packet and the second data packet are related screen projection information. Verification through UUID and serviceID can improve the scalability of the overall process. Based on different serviceID verification results, the data packet can be expanded for use in other scenarios. For example, in other possible implementations, the UUID in the two data packets is determined to be the field corresponding to the BLE Bluetooth discovery service, and the serviceID is determined to be the field corresponding to the file sharing service. Then, it is determined that the two data packets are not related screen projection information, but related file sharing information, which is used to implement the file sharing service.

[0121] In some embodiments, as Figure 9 As shown, the screen projection method applied to the screen projection source device 101 also includes steps 701 to 703, and the screen projection method applied to the screen projection target device 102 also includes steps 801 to 802.

[0122] The interaction process also includes:

[0123] In response to the operation of initiating screen projection, the screen projection source device 101 executes step 701 and sends a BLE Bluetooth broadcast including a third data packet. The third data packet includes third verification information. The third verification information includes, for example, UUID "BLECAST" and action information for searching for the device, such as "searchDevice".

[0124] The screen projection target device 102 executes step 801, receives the third data packet sent by the screen projection source device 101 through BLE Bluetooth broadcast, and obtains third verification information from the third data packet.

[0125] In response to obtaining the third verification information, the screen projection target device 102 executes step 802 and sends a fourth data packet via BLE Bluetooth broadcast. The fourth data packet includes fourth verification information, device information and wireless connection information. The fourth verification information includes, for example, UUID "BLECAST" and serviceID "HwBLeCast", the device information is, for example, the device name "xx TV xx", and the wireless connection information includes, for example, MAC address "86:xx:xx:xx:17:DB" and Bluetooth BrMAC address "74:xx:xx:xx:32:40".

[0126] The screen projection source device 101 executes step 702 and obtains a fourth data packet from the BLE Bluetooth broadcast data.

[0127] The screen projection source device 101 executes step 703 and determines that the fourth data packet is screen projection information based on the fourth verification information.

[0128] exist Figure 6 and Figure 7 In the interactive process shown, before discovering the device, that is, before determining the projection information, the projection source device 101 does not need to actively send data packets. The projection target device 102 can periodically initiate BLE Bluetooth broadcasts. The projection source device 101 only searches for projection information from the searched BLE Bluetooth broadcast data. After determining the projection information, it can perform wireless connection and video projection based on the projection information. In other words, Figure 6 and Figure 7 The process of passively discovering devices and casting screens based on passively discovered devices is recorded in Figure 9 In the interactive process shown, the screen projection source device 101 will actively send the third data packet through BLE Bluetooth broadcast. When the screen projection target device 101 receives the third data packet, it will reply with a fourth data packet to the screen projection source device 101. The screen projection source device 101 determines the screen projection information based on the fourth data packet. The screen projection information determined based on the fourth data packet and the screen projection information determined based on the first data packet and the second data packet all have the device information and wireless connection information required in the subsequent process. Therefore, after step 703, the screen projection source device 101 can execute steps 306 to 308 to implement the subsequent screen projection process based on the device information and wireless connection information in the fourth data packet. Among them, step 306 can display the device information in the fourth data packet in the device selection interface, corresponding to the alternative device option. When the user clicks the option, a wireless connection request is sent to the screen projection target device 102 based on the wireless connection information in the fourth data packet to establish a wireless connection. In other words, Figure 9 What is recorded is the process of actively discovering devices and casting screens based on the actively discovered devices. Figure 9 and Figure 6The processes of steps 306 to 308 and steps 402 to 403 are the same, except that the projection information used is different. Figure 6 The projection screen information is the first data packet and the second data packet. Figure 9 The screen projection information in is the fourth data packet. In the overall interactive process, the screen projection source device 101 will execute steps 301 and 701 in response to the operation of initiating screen projection, and the screen projection target device 102 will execute steps 401 and 801 in response to the operation of initiating Bluetooth broadcast. That is to say, both ends will synchronously execute the process of actively discovering devices and the process of passively discovering devices. When the screen projection information is obtained based on any of the methods, that is, device discovery is achieved, the subsequent wireless connection and screen projection processes can be executed. Whichever process obtains the screen projection information first, the subsequent wireless connection and screen projection processes will use the screen projection information obtained by that process. The process of actively discovering devices and the process of passively discovering devices are carried out simultaneously, so the probability and speed of device discovery can be improved.

[0129] In some embodiments, during the simultaneous execution of the active and passive device discovery processes, the screen projection source device 101 stops sending the third data packet after determining, based on the first verification information and the second verification information, that the first and second data packets are related screen projection information. In other words, if the passive device discovery process has already discovered a device, the third data packet for active device discovery will no longer be sent, thereby achieving a logically closed loop for the overall process and improving security.

[0130] In some embodiments, while the active device discovery process and the passive device discovery process are being performed simultaneously, the projection target device 102 stops sending the first and second data packets in response to receiving the third verification information. In other words, if the active device discovery process has already discovered a device, the first and second data packets for passive device discovery are no longer sent, thus achieving a logically closed loop for the overall process and improving security.

[0131] In some embodiments, any one of the first data packet, the second data packet, the third data packet and the fourth data packet is the same broadcast structure of the protocol data unit in the Bluetooth broadcast data. In this way, there is no need to make major changes to the existing Bluetooth protocol. Only by adding screen projection capability information to the reserved fields in the protocol can the discovery of devices with screen projection capabilities be achieved.

[0132] In some embodiments, the wireless connection is a low-power Bluetooth (BLE) connection or a wireless fidelity (Wi-Fi) point-to-point (P2P) connection.

[0133] In some embodiments, the wireless connection is a BLE Bluetooth connection; the step 308 of initiating video projection to the projection target device 102 based on the wireless connection includes: sending an online video address to the projection target device 102 based on the BLE Bluetooth connection. The step 403 of executing video projection based on the wireless connection includes: receiving an online resource address sent by the projection source device based on the wireless connection; requesting and receiving an online video based on the online resource address; and playing the online video. Figure 10 As shown, in the screen projection process based on online video, the screen projection source device 101 will send the online video address to the screen projection target device 102 in step 308, and the screen projection target device 102 will request the video from the server 103 based on the online video address. The server 103 here can be a cloud server, that is, the screen projection target device 102 can request and obtain video resources from the cloud server through the Internet, and play the video obtained from the cloud on the screen projection target device 102 to realize the screen projection function; in addition, the server 103 can also be a local server, that is, the screen projection target device 102 can request and obtain video resources from the local server through the local area network, and play the video obtained from the local server on the screen projection target device 102.

[0134] In some embodiments, the wireless connection is a Wi-Fi P2P connection; the step 308 of initiating video projection to the projection target device 102 based on the wireless connection includes: sending an online video address or a local video to the projection target device based on the Wi-Fi P2P connection. The step 403 of executing video projection based on the wireless connection includes: receiving a local video sent by the projection source device based on the wireless connection; and playing the local video. Alternatively, the step 403 of executing video projection based on the wireless connection includes: receiving an online resource address sent by the projection source device based on the wireless connection; requesting and receiving an online video based on the online resource address; and playing the online video. The Wi-Fi P2P connection has a larger bandwidth than the BLE Bluetooth connection. Therefore, in addition to transmitting the online video address through the Wi-Fi P2P connection to realize the projection and playback of the online video, the projection source device 101 can also directly send the video stream to the projection target device 102 through the Wi-Fi P2P connection, and then decode and play the video stream to realize the projection and playback of the local video.

[0135] With the development of technology, BLE Bluetooth connection may also be used to directly transmit local video streams, so that local video can be cast and played through BLE Bluetooth connection.

[0136] In some embodiments, the online video address can be a Uniform Resource Locator (URL) or a Uniform Resource Identifier (URI). In addition, in addition to being used to transmit addresses and video streams, the above-mentioned wireless connection can also be used to transmit playback control instructions, so that the video playback of the screen projection target device can be controlled by the screen projection source device.

[0137] In some embodiments, the above-mentioned interaction process can be applied not only in the screen projection scenario, but also in other scenarios, such as in the file sharing scenario. In the file sharing scenario, the above-mentioned screen projection source device is a file sharing source device, the operation of initiating screen projection is the operation of initiating file sharing, serviceID is used to represent the file sharing service, the screen projection information is the file sharing information, the screen projection device selection interface is the sharing device selection interface, the screen projection target device option is the file sharing target device option, the screen projection target device is the file sharing target device, initiating video screen projection is initiating file sharing, executing video screen projection is executing file sharing, and the action information of starting screen projection is the action information of starting file sharing. The specific step logic and principles are the same as those in the above-mentioned embodiment, and the only difference lies in the difference brought about by the application scenario. In the file sharing scenario, the two-end device can realize device discovery based on BLE Bluetooth broadcast, that is, determine the file sharing information based on BLE Bluetooth broadcast, and then establish a wireless connection based on the device information and wireless connection information in the file sharing information and realize file sharing based on the wireless connection, that is, expand the application scenario of the interaction process. The specific process and principle of the interaction process of the file sharing scenario and the screen projection scenario are similar, which will not be repeated here.

[0138] The passive discovery process in the above embodiments is that the screen projection target device initiates BLE Bluetooth broadcast, and the screen projection source device performs BLE Bluetooth broadcast search to achieve device discovery. In fact, the screen projection source device can also initiate BLE Bluetooth broadcast, and the screen projection target device performs BLE Bluetooth broadcast search to achieve device discovery. The following example illustrates, Figure 11 As shown, an embodiment of the present application also provides a screen projection interaction method, including a screen projection method applied to a screen projection source device and a screen projection method applied to a screen projection target device. The screen projection method applied to the screen projection source device includes steps 501 to 503, and the screen projection method applied to the screen projection target device includes steps 601 to 607.

[0139] The interaction process includes:

[0140] The user initiates the screen projection operation on the screen projection source device 101. For example, if the screen projection source device 101 is running a video application, the user clicks the "TV" button in the upper right corner of the video playback interface of the screen projection source device 101. Clicking this button initiates the screen projection operation. It should be noted that the screen projection operation can be implemented in different ways, such as by triggering a gesture operation, etc. This embodiment of the present application does not limit this, and is only used as an example.

[0141] Upon detecting a user initiating screen projection on screen projection source device 101, screen projection source device 101 executes step 501 and initiates a BLE broadcast. The BLE broadcast data includes a first data packet and a second data packet. The first data packet includes first verification information and encryption information, and the second data packet includes second verification information and a key.

[0142] The user turns on the Bluetooth function on the screen projection target device 102.

[0143] When it is detected that the user turns on the Bluetooth function on the screen projection target device 102, the screen projection target device 102 executes step 601 and initiates a BLE Bluetooth broadcast search, which can also be called Bluetooth scanning.

[0144] The screen projection target device 102 executes step 602 and receives the searched BLE Bluetooth broadcast data, where the BLE Bluetooth broadcast data includes a first data packet and a second data packet.

[0145] The screen projection target device 102 executes step 604, traverses the full amount of searched BLE Bluetooth broadcast data, and obtains the first data packet and the second data packet from the searched BLE Bluetooth broadcast data, wherein the first verification information and the second verification information are plain text. The two data packets are verified based on the two verification information, and it can be determined that the two data packets are related information. The encrypted information in the first data packet can be decrypted according to the key in the second data packet, and the device information and wireless connection information can be obtained from the decrypted encrypted information. The encrypted information can also have a callback function. The first data packet and the second data packet are determined to be related screen projection information based on the first verification information and the second verification information. After the screen projection information is determined, the subsequent screen projection process will be carried out, that is, if the device information and wireless connection information are decrypted from the first data packet according to the key in the second data packet, and it is determined that the second data packet contains action information for starting screen projection, the subsequent step 605 is executed.

[0146] The screen projection target device 102 executes step 605 and displays a screen projection device selection interface. The screen projection device selection interface displays alternative device options corresponding to one or more screen projection information determined in the BLE Bluetooth broadcast data. The alternative device options include the device information in the corresponding one or more screen projection information. For example, in this embodiment, only the screen projection information corresponding to the screen projection source device 101 is searched, so only the alternative device options including the device name "xx mobile phone xx" are displayed.

[0147] The user clicks on the alternative device option on the projection target device 102, that is, performs a selection operation on the projection source device option in at least one alternative device option. The alternative device option clicked by the user is the projection source device option selected by the user. The user's selection operation on the projection source device option in at least one alternative device option on the projection target device 102 is detected. The projection target device 102 executes step 606 based on the wireless connection information in the projection information corresponding to the projection source device option, sends a wireless connection request to the projection source device 101, and establishes a wireless connection with the projection target device.

[0148] The screen projection source device 101 executes step 502, receives the wireless connection request sent by the screen projection target device 102, and establishes a wireless connection with the screen projection source device based on the wireless connection request.

[0149] The screen projection target device 102 executes step 503 and initiates video projection to the screen projection source device 101 based on the wireless connection.

[0150] The screen projection source device 101 executes step 607 and performs video screen projection based on the wireless connection.

[0151] The specific method of wireless connection and the specific method of executing video projection can be the same as the above embodiment. Figure 11 The interaction method shown is the same as Figure 6 Compared with the interaction method shown, the principle is the same, which is to add two related data packets in the BLE Bluetooth broadcast data, determine the two related data packets through BLE Bluetooth search and verification information during the screen projection process, and decrypt the encrypted information in one of them based on the key of the other to obtain device information and wireless connection information, so as to find the target device for screen projection, and then establish a wireless connection based on the wireless connection information and realize screen projection. Figure 11 and Figure 6 The difference is that Figure 6 It initiates BLE Bluetooth broadcast on the screen projection source device side and performs BLE Bluetooth broadcast search on the screen projection target device side; Figure 11 It initiates a BLE broadcast on the target device side and performs a BLE broadcast search on the source device side.

[0152] Whether Figure 6 The interaction flow shown is still Figure 11 The interaction processes shown are all due to the use of BLE Bluetooth search to discover devices, which does not require both ends to be connected to the same local area network, so there are fewer restrictions on screen projection and more flexible usage scenarios; in addition, the BLE Bluetooth search method to discover devices has a lower probability of not finding a device than the method of using SSDP to discover devices; in addition, since the BLE Bluetooth search distance range is small, it is not easy to search for irrelevant devices, and it is easier to determine the source device for screen projection, and it is not easy to have screen projection confusion due to a large number of searched devices; and, the encrypted information in one of the two data packets is decrypted by the plaintext information of the other, rather than just verifying through the plaintext information, thereby improving the security of the screen projection process and avoiding the data packet being misidentified by other devices.

[0153] In some embodiments, Figure 11 In the interactive process shown, the encrypted information also includes third verification information. The above-mentioned acquisition of device information and wireless connection information from the decrypted encrypted information includes: acquiring device information, wireless connection information and third verification information from the decrypted encrypted information; the above-mentioned process of determining the first data packet and the second data packet as related projection information based on the first verification information and the second verification information includes: determining the first data packet and the second data packet as related projection information based on the first verification information, the second verification information and the third verification information. That is to say, in the process of determining the projection information from the BLE Bluetooth broadcast data, in addition to verification based on the first verification information and the second verification information in plain text, verification can also be performed based on the third verification information in the encrypted information. For the third verification information in the first data packet, verification can only be performed after decryption by the key in the second data packet, thereby further improving security.

[0154] In some embodiments, Figure 11In the interaction process shown, the first verification information includes the universal unique identifier UUID, the second verification information includes the UUID, the service identifier serviceID and the action information for starting screen projection, and the third verification information includes serviceID. The UUID can be used to indicate the BLE Bluetooth device discovery service, and the serviceID is used to indicate the screen projection service. For example, the first verification information includes the UUID "BLECAST", the second verification information includes the UUID "BLECAST", the serviceID "HwBLeCast" and the action information for starting screen projection "startCast", and the third verification information includes serviceID "HwBLeCast". The screen projection target device determines that the UUIDs in the first verification information and the second verification information are the same, both are "BLECAST", then it is determined that the services corresponding to the two data packets are the BLE Bluetooth device discovery service, and the serviceIDs in the second verification information and the third verification information are the same, both are "HwBLeCast", then it is determined that the services corresponding to the two data packets are the screen projection service. In addition, according to the action information "startCast" for starting screen projection in the second data packet, the screen projection process is started, and the first data packet and the second data packet are determined to be related screen projection information. Verification through UUID and serviceID can improve the scalability of the overall process. For example, in other possible implementation methods, the UUID in the two data packets is determined to be the field corresponding to the BLE Bluetooth discovery service, and the serviceID is determined to be the field corresponding to the file sharing service. Then, it is determined that the two data packets are not mutually related screen projection information, but mutually related file sharing information, which is used to implement the file sharing service.

[0155] In some embodiments, as Figure 12 As shown, in Figure 11 On the basis of, the screen projection method applied to the screen projection source device 101 also includes steps 901 to 903, and the screen projection method applied to the screen projection target device 102 also includes steps 1001 to 1002.

[0156] The interaction process also includes:

[0157] In response to the operation of initiating a Bluetooth search, the screen projection target device 102 executes step 901 and sends a BLE Bluetooth broadcast including a third data packet. The third data packet includes third verification information. The third verification information includes, for example, the UUID "BLECAST" and the action information of the search device. The action information of the search device is, for example, "searchDevice".

[0158] The screen projection source device 101 executes step 1001, receives the third data packet sent by the screen projection target device 102 through BLE Bluetooth broadcast, and obtains the third verification information and the action information of the search device from the third data packet.

[0159] In response to obtaining the third verification information and the action information of the search device, the screen projection source device 101 executes step 1002 and sends a fourth data packet through BLE Bluetooth broadcast. The fourth data packet includes fourth verification information, device information and wireless connection information. The fourth verification information includes, for example, UUID "BLECAST" and serviceID "HwBLeCast", the device information is, for example, the device name "xx TV xx", and the wireless connection information includes, for example, MAC address "86:xx:xx:xx:17:DB" and Bluetooth BrMAC address "74:xx:xx:xx:32:40".

[0160] The screen projection target device 102 executes step 902 and obtains a fourth data packet from the BLE Bluetooth broadcast data.

[0161] The screen projection target device 102 executes step 903 and determines that the fourth data packet is screen projection information based on the fourth verification information.

[0162] exist Figure 11 and Figure 12 The method of determining the projection screen information is different. Figure 11 Processes involving passive device discovery, Figure 12 The active device discovery process determines the projection information after device discovery. Subsequent wireless connection and projection processes are the same, and the active and passive device discovery processes are executed simultaneously. Whichever process first obtains the projection information will be used for subsequent wireless connection and projection processes. The simultaneous active and passive device discovery processes improve the probability and speed of device discovery.

[0163] In some embodiments, based on Figure 11 and Figure 12 In the interactive process involved, while the active device discovery process and the passive device discovery process are being performed simultaneously, the screen projection target device 102 stops sending the third data packet after determining that the first data packet and the second data packet are related screen projection information based on the first verification information and the second verification information. In other words, if the passive device discovery process has already discovered a device, the third data packet for active device discovery will no longer be sent, thus achieving a logically closed loop for the overall process and improving security.

[0164] In some embodiments, based on Figure 11 and Figure 12In the interactive process involved, while the active device discovery process and the passive device discovery process are being carried out simultaneously, the screen projection source device 101 stops sending the first and second data packets in response to obtaining the third verification information. In other words, if the active device discovery process has already discovered a device, the first and second data packets used for passive device discovery will no longer be sent, thus achieving a logically closed loop for the entire process and improving security.

[0165] An embodiment of the present application provides a screen projection device, which is applied to a screen projection source device. The screen projection device includes: a Bluetooth module for initiating a low-power BLE Bluetooth broadcast search in response to an operation of initiating screen projection; the Bluetooth module is also used to receive the searched BLE Bluetooth broadcast data, and obtain a first data packet and a second data packet from the BLE Bluetooth broadcast data, the first data packet including first verification information and encryption information, and the second data packet including second verification information and a key; a device discovery module for decrypting the encrypted information according to the key, and obtaining device information and wireless connection information from the decrypted encrypted information; and determining that the first data packet and the second data packet are the same according to the first verification information and the second verification information. Associated screen projection information; a display module for displaying a screen projection device selection interface, which displays alternative device options corresponding to one or more screen projection information determined in the BLE Bluetooth broadcast data, wherein the alternative device options include device information in the corresponding one or more screen projection information; a wireless connection module for responding to a selection operation of a screen projection target device option in at least one alternative device option, based on the wireless connection information in the screen projection information corresponding to the screen projection target device option, sending a wireless connection request to the screen projection target device and establishing a wireless connection with the screen projection target device; a screen projection module for initiating video projection to the screen projection target device based on the wireless connection.

[0166] The screen projection device can apply the screen projection method in the above embodiment. The specific process and principle are the same as those in the above embodiment and will not be repeated here.

[0167] It should be understood that the division of the above projection device is only a division of logical functions. In actual implementation, it can be fully or partially integrated into one physical entity, or it can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, any one of the Bluetooth module, device discovery module, display module, wireless connection module and projection module can be a separately established processing element, or it can be integrated into the projection device, such as being integrated into a certain chip of the projection device. In addition, it can also be stored in the memory of the projection device in the form of a program, and called and executed by a certain processing element of the projection device to perform the functions of the above modules. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.

[0168] For example, the Bluetooth module, device discovery module, display module, wireless connection module and screen projection module can be one or more integrated circuits configured to implement the above method, such as one or more specific integrated circuits (Application Specific Integrated Circuit, ASIC), or one or more microprocessors (digital signal processor, DSP), or one or more field programmable gate arrays (Field Programmable Gate Array, FPGA), etc. For another example, when one of the above modules is implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call a program. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0169] An embodiment of the present application also provides a screen projection device, which is applied to a screen projection target device. The screen projection device includes: a Bluetooth broadcast module, which is used to initiate a low-power BLE Bluetooth broadcast in response to an operation of initiating a Bluetooth broadcast. The data of the BLE Bluetooth broadcast includes a first data packet and a second data packet. The first data packet includes first verification information and encryption information, and the second data packet includes second verification information and a key. The key is used to decrypt the encrypted information. The encrypted information includes device information and wireless connection information; a wireless connection module, which is used to receive a wireless connection request sent by a screen projection source device, and establish a wireless connection with the screen projection source device based on the wireless connection request; a screen projection module, which is used to perform video screen projection based on a wireless connection.

[0170] An embodiment of the present application also provides a screen projection device, which is applied to a screen projection source device. The screen projection device includes: a Bluetooth broadcast module, which is used to initiate a low-power BLE Bluetooth broadcast in response to an operation of initiating screen projection, and the data of the low-power BLE Bluetooth broadcast includes a first data packet and a second data packet, the first data packet includes first verification information and encryption information, the second data packet includes second verification information and a key, the key is used to decrypt the encrypted information, and the encrypted information includes device information and wireless connection information; a wireless connection module, which is used to receive a wireless connection request sent by a screen projection target device, and establish a wireless connection with the screen projection source device based on the wireless connection request; a screen projection module, which is used to initiate video screen projection to the screen projection target device based on the wireless connection.

[0171] The embodiment of the present application also provides a screen projection device, which is applied to a screen projection target device. The screen projection device includes: a Bluetooth module for initiating a low-power BLE Bluetooth broadcast search in response to an operation of initiating a Bluetooth search; the Bluetooth module is also used to receive the searched BLE Bluetooth broadcast data; a discovery module is used to obtain a first data packet and a second data packet from the BLE Bluetooth broadcast data, the first data packet including first verification information and encryption information, and the second data packet including second verification information and a key; decrypt the encrypted information according to the key, and obtain device information and wireless connection information from the decrypted encrypted information; determine the first data packet and the second data packet according to the first verification information and the second verification information The two data packets are associated screen projection information; a display module is used to display a screen projection device selection interface, which displays alternative device options corresponding to one or more screen projection information determined in the BLE Bluetooth broadcast data, wherein the alternative device options include device information in the corresponding one or more screen projection information; a wireless connection module is used to respond to a selection operation of a screen projection source device option in at least one alternative device option, based on the wireless connection information in the screen projection information corresponding to the screen projection source device option, send a wireless connection request to the screen projection source device, and establish a wireless connection with the screen projection source device; a screen projection module is used to perform video screen projection based on a wireless connection.

[0172] An embodiment of the present application further provides a chip including a processor configured to read and execute a computer program stored in a memory to execute the screen projection method in any of the above embodiments.

[0173] An embodiment of the present application also provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the screen projection method in any of the above embodiments.

[0174] An embodiment of the present application also provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes the screen projection method in any of the above embodiments.

[0175] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).

[0176] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0177] The above are merely preferred embodiments of the present application and are not intended to limit the present application. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A screen projection method, characterized in that: Applied to a screen projection source device, the method includes: In response to the operation of initiating screen projection, a low-power BLE Bluetooth broadcast search is initiated; Receive the searched BLE Bluetooth broadcast data, and obtain a first data packet and a second data packet from the BLE Bluetooth broadcast data, wherein the first data packet includes first verification information and encryption information, and the second data packet includes second verification information and a key; decrypting the encrypted information according to the key, and obtaining device information and wireless connection information from the decrypted encrypted information; Determining, according to the first verification information and the second verification information, that the first data packet and the second data packet are associated screen projection information; Displaying a screen projection device selection interface, wherein the screen projection device selection interface displays alternative device options corresponding to one or more screen projection information determined in the BLE Bluetooth broadcast data, wherein the alternative device options include the device information in the corresponding one or more screen projection information; In response to a selection operation of a projection target device option in at least one of the candidate device options, based on the wireless connection information in the projection information corresponding to the projection target device option, a wireless connection request is sent to the projection target device, and a wireless connection is established with the projection target device; Initiate video projection to the projection target device based on the wireless connection.

2. The method according to claim 1, characterized in that: The acquiring device information and wireless connection information from the decrypted encrypted information comprises: acquiring device information, wireless connection information and third verification information from the decrypted encrypted information; The process of determining that the first data packet and the second data packet are associated screen projection information according to the first verification information and the second verification information includes: According to the first verification information, the second verification information and the third verification information, it is determined that the first data packet and the second data packet are associated screen projection information.

3. The method according to claim 2, characterized in that The first verification information includes the universal unique identifier UUID, the second verification information includes the UUID, the service identifier serviceID and the action information for starting screen projection, and the third verification information includes serviceID, and the serviceID is used to represent the screen projection service.

4. The method according to claim 1, characterized in that Also includes: In response to the operation of initiating screen projection, sending a BLE Bluetooth broadcast including a third data packet, wherein the third data packet includes third verification information; Acquire a fourth data packet from the BLE Bluetooth broadcast data, wherein the fourth data packet includes fourth verification information, device information, and wireless connection information; Determine that the fourth data packet is screen projection information based on the fourth verification information.

5. The method according to claim 4, characterized in that After the process of determining that the first data packet and the second data packet are associated screen projection information based on the first verification information and the second verification information, stop sending the third data packet.

6. The method according to claim 3, characterized in that The screen projection source device is a file sharing source device, the operation of initiating screen projection is an operation of initiating file sharing, the serviceID is used to represent a file sharing service, the screen projection information is file sharing information, the screen projection device selection interface is a sharing device selection interface, the screen projection target device option is a file sharing target device option, the screen projection target device is a file sharing target device, initiating video screen projection is initiating file sharing, and the action information of starting screen projection is action information of starting file sharing.

7. The method according to claim 1, characterized in that Any one of the first data packet and the second data packet is a same broadcast structure of a protocol data unit in Bluetooth broadcast data.

8. The method according to claim 1, characterized in that The wireless connection is a low-power BLE Bluetooth connection or a wireless fidelity Wi-Fi point-to-point P2P connection.

9. The method according to claim 8, characterized in that The wireless connection is a BLE Bluetooth connection; The initiating video projection to the projection target device based on the wireless connection includes: sending an online video address to the projection target device based on the BLE Bluetooth connection.

10. The method according to claim 8, characterized in that The wireless connection is a Wi-Fi P2P connection; Initiating video projection to the projection target device based on the wireless connection includes: sending an online video address or a local video to the projection target device based on the Wi-Fi P2P connection.

11. A screen projection method, characterized in that: Applied to a screen projection target device, the method includes: In response to the operation of initiating Bluetooth broadcast, a low-power BLE Bluetooth broadcast is initiated, wherein the data of the BLE Bluetooth broadcast includes a first data packet and a second data packet, wherein the first data packet includes first verification information and encryption information, and the second data packet includes second verification information and a key, wherein the key is used to decrypt the encryption information, and the encryption information includes device information and wireless connection information; Receive a wireless connection request sent by a screen projection source device, and establish a wireless connection with the screen projection source device based on the wireless connection request; Video projection is performed based on the wireless connection.

12. The method according to claim 11, characterized in that The encrypted information also includes third verification information.

13. The method according to claim 12, characterized in that The first verification information includes the universal unique identifier UUID, the second verification information includes the UUID, the service identifier serviceID and the action information for starting screen projection, and the third verification information includes serviceID.

14. The method according to claim 11, characterized in that Also includes: Receive a third data packet sent by the screen projection source device through BLE Bluetooth broadcast; Acquire third verification information from the third data packet; In response to acquiring the third verification information, a fourth data packet is sent via BLE Bluetooth broadcast, where the fourth data packet includes fourth verification information, device information, and wireless connection information.

15. The method according to claim 14, characterized in that In response to acquiring the third verification information, stopping sending the first data packet and the second data packet.

16. The method according to claim 13, characterized in that The screen projection target device is a file sharing target device, the serviceID is used to represent a file sharing service, the screen projection source device is a file sharing source device, the execution of video screen projection is the execution of file sharing, and the action information for starting screen projection is the action information for starting file sharing.

17. The method according to claim 11, characterized in that Any one of the first data packet and the second data packet is a same broadcast structure of a protocol data unit in the Bluetooth broadcast data.

18. The method according to claim 11, characterized in that The wireless connection is a low-power BLE Bluetooth connection or a wireless fidelity Wi-Fi point-to-point P2P connection; The performing of video projection based on the wireless connection comprises: Receiving an online resource address sent by the screen projection target device based on the wireless connection; Requesting and receiving an online video based on the online resource address; Play the online video.

19. The method according to claim 11, characterized in that The wireless connection is a Wi-Fi P2P connection; The performing of video projection based on the wireless connection comprises: Receiving a local video sent by the screen projection target device based on the wireless connection; Play the local video.

20. A screen projection method, characterized in that: Applied to a screen projection source device, the method includes: In response to the operation of initiating screen projection, a low-power BLE Bluetooth broadcast is initiated, wherein the data of the low-power BLE Bluetooth broadcast includes a first data packet and a second data packet, wherein the first data packet includes first verification information and encryption information, and the second data packet includes second verification information and a key, wherein the key is used to decrypt the encrypted information, and the encrypted information includes device information and wireless connection information; Receive a wireless connection request sent by the screen projection target device, and establish a wireless connection with the screen projection source device based on the wireless connection request; Initiate video projection to the projection target device based on the wireless connection.

21. The method according to claim 20, characterized in that The encrypted information also includes third verification information.

22. The method according to claim 21, characterized in that The first verification information includes the universal unique identifier UUID, the second verification information includes the UUID, the service identifier serviceID and the action information for starting screen projection, and the third verification information includes serviceID.

23. The method according to claim 20, characterized in that Also includes: Receive a third data packet sent by the screen projection target device through BLE Bluetooth broadcast; Acquire third verification information from the third data packet; In response to acquiring the third verification information, a fourth data packet is sent via BLE Bluetooth broadcast, where the fourth data packet includes fourth verification information, device information, and wireless connection information.

24. The method according to claim 23, characterized in that In response to acquiring the third verification information, stopping sending the first data packet and the second data packet.

25. The method according to claim 22, characterized in that The screen projection target device is a file sharing target device, the serviceID is used to represent a file sharing service, the screen projection source device is a file sharing source device, the initiation of video screen projection is the initiation of file sharing, and the action information for starting screen projection is the action information for starting file sharing.

26. The method according to claim 20, characterized in that Any one of the first data packet and the second data packet is a same broadcast structure of a protocol data unit in Bluetooth broadcast data.

27. The method according to claim 20, characterized in that The wireless connection is a low-power BLE Bluetooth connection or a wireless fidelity Wi-Fi point-to-point P2P connection.

28. The method according to claim 27, characterized in that The wireless connection is a BLE Bluetooth connection; The initiating video projection to the projection target device based on the wireless connection includes: sending an online video address to the projection target device based on the BLE Bluetooth connection.

29. The method according to claim 27, characterized in that The wireless connection is a Wi-Fi P2P connection; Initiating video projection to the projection target device based on the wireless connection includes: sending an online video address or a local video to the projection target device based on the Wi-Fi P2P connection.

30. A screen projection method, characterized in that: Applied to a screen projection target device, the method includes: In response to the operation of initiating a Bluetooth search, initiating a low-power BLE Bluetooth broadcast search; Receive the searched BLE Bluetooth broadcast data, Acquire a first data packet and a second data packet from the BLE Bluetooth broadcast data, wherein the first data packet includes first verification information and encryption information, and the second data packet includes second verification information and a key; decrypting the encrypted information according to the key, and obtaining device information and wireless connection information from the decrypted encrypted information; Determining, according to the first verification information and the second verification information, that the first data packet and the second data packet are associated screen projection information; Displaying a screen projection device selection interface, wherein the screen projection device selection interface displays alternative device options corresponding to one or more screen projection information determined in the BLE Bluetooth broadcast data, wherein the alternative device options include the device information in the corresponding one or more screen projection information; In response to a selection operation of a screen projection source device option in at least one of the candidate device options, based on the wireless connection information in the screen projection information corresponding to the screen projection source device option, a wireless connection request is sent to the screen projection source device, and a wireless connection is established with the screen projection source device; Video projection is performed based on the wireless connection.

31. The method according to claim 30, characterized in that The acquiring device information and wireless connection information from the decrypted encrypted information comprises: acquiring device information, wireless connection information and third verification information from the decrypted encrypted information; The process of determining that the first data packet and the second data packet are associated screen projection information according to the first verification information and the second verification information includes: According to the first verification information, the second verification information and the third verification information, it is determined that the first data packet and the second data packet are associated screen projection information.

32. The method according to claim 31, characterized in that The first verification information includes the universal unique identifier UUID, the second verification information includes the UUID, the service identifier serviceID and the action information for starting screen projection, and the third verification information includes serviceID, and the serviceID is used to represent the screen projection service.

33. The method according to claim 30, characterized in that Also includes: In response to the operation of initiating a Bluetooth search, sending a BLE Bluetooth broadcast including a third data packet, wherein the third data packet includes third verification information and action information of the search device; Acquire a fourth data packet from the BLE Bluetooth broadcast data, wherein the fourth data packet includes fourth verification information, device information, and wireless connection information; Determine that the fourth data packet is screen projection information based on the fourth verification information.

34. The method according to claim 33, characterized in that After the process of determining that the first data packet and the second data packet are associated screen projection information based on the first verification information and the second verification information, stop sending the third data packet.

35. The method according to claim 32, characterized in that The screen projection source device is a file sharing source device, the serviceID is used to represent a file sharing service, the screen projection information is file sharing information, the screen projection device selection interface is a sharing device selection interface, the screen projection target device option is a file sharing target device option, the screen projection target device is a file sharing target device, the execution of video screen projection is the execution of file sharing, and the action information for starting screen projection is the action information for starting file sharing.

36. The method according to claim 30, characterized in that Any one of the first data packet and the second data packet is a same broadcast structure of a protocol data unit in the Bluetooth broadcast data.

37. The method according to claim 30, characterized in that The wireless connection is a low-power BLE Bluetooth connection or a wireless fidelity Wi-Fi point-to-point P2P connection; The performing of video projection based on the wireless connection comprises: Receiving an online resource address sent by the screen projection target device based on the wireless connection; Requesting and receiving an online video based on the online resource address; Play the online video.

38. The method according to claim 30, characterized in that The wireless connection is a Wi-Fi P2P connection; The performing of video projection based on the wireless connection comprises: Receiving a local video sent by the screen projection target device based on the wireless connection; Play the local video.

39. An electronic device, characterized in that: It comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 38.

40. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 38.

41. A computer program product, characterized in that The computer program product comprises executable instructions, and when the executable instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 38.

Citation Information

Patent Citations

  • Screen transmission method and device and storage medium

    CN111459433A

  • Wirelessly streaming venue-based data to client devices

    US20170318325A1

  • Screen projection device, method and system, and computer-readable storage medium

    WO2022007557A1