Screen projection method, device and electronic device

By establishing a second channel connection between the screen projection application and the screen projection device, and directly transmitting the data to be projected, the problem of low screen projection efficiency in the existing technology is solved, and more efficient data transmission and user experience improvement is achieved.

CN115665468BActive Publication Date: 2025-08-15HISENSE VISUAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211153830.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2025-08-15
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

The screen projection efficiency in the prior art is low, and it is necessary to wait for the application extension to be started and the channel connection is established before the screen projection data can be transmitted, resulting in delay and inefficiency.

Method used

Before the target application expansion and the target screen projection device are established, a second channel connection is established between the screen projection application and the target screen projection device, and the data to be projected are directly transmitted, and the shared memory is stopped after the first channel connection is completed, and the data is transmitted directly through the first channel connection.

Benefits of technology

Improves screen projection efficiency, improves user experience, and reduces waiting time and data transmission delay.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665468B_ABST
    Figure CN115665468B_ABST
Patent Text Reader

Abstract

The present invention relates to a screen projection method, device and electronic device, and to the field of display technology, including: when it is determined that a target screen projection device is in a screen projection mode, before a target application extension associated with a screen projection application completes establishing a first channel connection with a target screen projection device, target screen data to be projected is obtained through the target application extension, and the target screen data to be projected is written into a preset shared memory; the target screen data to be projected in the preset shared memory is transmitted to the target screen projection device through a second channel connection through the screen projection application; after the first channel connection is established, the target application extension is stopped from writing the target screen data to the preset shared memory, and the target application extension is started to directly transmit the obtained target screen data to the target screen projection device through the first channel connection. The adoption of this method can improve screen projection efficiency and enhance user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of display technology, and in particular to a screen projection method, device and electronic device. Background Art

[0002] Wireless screen projection is a mode of interaction between multiple screens. Common multi-screen interactions include mobile phones, tablets, TVs, computers, all-in-one screens, etc. It projects the content of the source device to another display device for users to watch.

[0003] In the prior art, a third-party application is usually installed on the source device, and the screen projection service is implemented using the third-party application and its associated application extension. The main process is to search for the display device for projection by sending a broadcast packet including the display device information for projection through the source device, determine the display device for projection based on the display device information, and after determining the display device, obtain the network Internet protocol, port number and current status information of the display device. When it is determined that the display device is in the projection state, start the countdown and enter the countdown waiting for the start of the application extension associated with the third-party application. When the countdown ends, start the application extension associated with the third-party application, obtain the video and audio data to be projected, and after obtaining the data to be projected, establish a channel connection between the application extension and the projection device. When the channel connection is successfully established, use the channel connection to transmit the data to be projected so that the projection device plays the data to be projected.

[0004] However, using the existing technology, it takes a certain amount of time to start the application extension, and it is necessary to further establish a channel connection. Only after the channel connection is successfully established can the data to be projected be transmitted to the display device for playback, resulting in low screen projection efficiency. Summary of the Invention

[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present invention provides a screen projection method, device and electronic device, which can transmit the target number of screens to be projected to the target screen projection device by using the second channel connection established between the screen projection application and the target screen projection device before the first channel connection between the target application extension and the target screen projection device is established. There is no need to wait for the first channel connection between the target application extension and the target screen projection device to be established before the target number of screens to be projected is transmitted to the target screen projection device. After the first channel connection is successfully established, there is no need to write the target number of screens to be projected into the preset shared memory again, but the target number of screens to be projected is directly transmitted to the target screen projection device through the first channel connection, thereby improving the screen projection efficiency and enhancing the user experience.

[0006] In order to achieve the above objectives, the technical solutions provided by the embodiments of the present invention are as follows:

[0007] In a first aspect, a screen projection method is provided, which is applied to a terminal device and includes:

[0008] When it is determined that the target screen projection device is in screen projection mode, before the target application extension associated with the screen projection application completes establishing a first channel connection with the target screen projection device, the target screen data to be projected is obtained through the target application extension, and the target screen data to be projected is written into the preset shared memory;

[0009] The screen projection application transmits the target screen projection data in the preset shared memory to the target screen projection device through the second channel connection;

[0010] After the establishment of the first channel connection is completed, the target application extension is stopped from writing the target screen projection data into the preset shared memory, and the target application extension is started to directly transmit the acquired target screen projection data to the target screen projection device through the first channel connection.

[0011] As an optional implementation of the embodiment of the present invention, before determining that the target screen projection device is in the screen projection mode, the method further includes:

[0012] In response to a screen projection request instruction input by a user, determining the target screen projection device in at least one display device and obtaining parameter information of the target screen projection device, wherein the screen projection request instruction carries identification information of the screen projection device, and the parameter information includes status information;

[0013] Based on the status information, determine whether the target screen projection device is in screen projection mode.

[0014] As an optional implementation of the embodiment of the present invention, before obtaining the screen data to be projected through the target application extension associated with the screen projection application and writing the target screen data to be projected into the preset shared memory, the method further includes:

[0015] Establishing a second channel connection between the screen projection application and the target screen projection device, and counting the target duration of starting the target application extension;

[0016] When the target duration reaches the preset duration, the target application extension associated with the screen projection application is started, the target screen data to be projected is obtained through the target application extension, and the target screen data to be projected is written into the preset shared memory.

[0017] As an optional implementation of the embodiment of the present invention, the second channel connection includes a first instruction channel connection and a first data channel connection; the parameter information further includes first attribute information, and the first attribute information includes a first network Internet protocol and a first port number;

[0018] The establishing of a second channel connection between the screen projection application and the target screen projection device includes:

[0019] Acquire second attribute information of the first instruction channel connection included in the second channel connection, wherein the second attribute information includes a second network Internet protocol and a second port number;

[0020] Establishing a first command channel connection between the screen projection application and the target screen projection device based on the first attribute information and the second attribute information;

[0021] After the first command channel connection is successfully established, the file format of the target screen projection data and the third port number of the first data channel connection are determined through the first command channel connection;

[0022] Based on the first attribute information, the second network Internet protocol and the third port number, a first data channel connection is established between the screen projection application and the target screen projection device.

[0023] As an optional implementation manner of the embodiment of the present invention, the first channel connection includes a second instruction channel connection and a second data channel connection;

[0024] The target application extension associated with the screen projection application establishes a first channel connection with the target screen projection device, including:

[0025] Obtain a fourth port number of a second instruction channel connection included in the first channel connection;

[0026] Establishing a second command channel connection between the target application extension and the target screen projection device based on the first attribute information, the second network Internet protocol, and the fourth port number of the target screen projection device;

[0027] After the second instruction channel connection is successfully established, determining the fifth port number of the second data transmission channel connection through the second instruction channel connection;

[0028] Based on the first attribute information, the second network Internet protocol and the fifth port number, a second data transmission channel connection is established between the target application extension and the target projection device.

[0029] As an optional implementation of an embodiment of the present invention, when the target duration reaches a preset duration, starting the target application extension associated with the screen projection application, obtaining the target screen data to be projected through the target application extension, and writing the target screen data to be projected into a preset shared memory, including:

[0030] When the target duration reaches a preset duration, the target application extension associated with the screen projection application is started, and initial screen projection data is obtained through the target application extension;

[0031] The initial screen data to be projected is decoded to obtain the target screen data to be projected, and the target screen data to be projected is written into a preset shared memory.

[0032] As an optional implementation of the embodiment of the present invention, after starting to directly transmit the acquired target screen projection data to the target screen projection device through the first channel connection through the target application extension, it also includes:

[0033] When the screen projection application completes the transmission of the target screen data to be projected in the preset shared memory through the second channel connection, the second channel connection between the screen projection application and the target screen projection device is disconnected.

[0034] In a second aspect, a screen projection device is provided, which is applied to a terminal device, comprising:

[0035] A target screen projection data acquisition module is used to, when it is determined that the target screen projection device is in screen projection mode, obtain the target screen projection data through the target application extension associated with the screen projection application and before the first channel connection is established with the target screen projection device, and write the target screen projection data into a preset shared memory;

[0036] A first target screen projection data transmission module is used to transmit the target screen projection data in the preset shared memory to the target screen projection device through the screen projection application through the second channel connection;

[0037] The second target screen projection data transmission module is used to stop the target application extension from writing the target screen projection data into the preset shared memory after the establishment of the first channel connection is completed, and start to directly transmit the acquired target screen projection data to the target projection device through the first channel connection through the target application extension.

[0038] As an optional implementation of the embodiment of the present invention, the device further includes:

[0039] A target screen projection device determination module is used to determine the target screen projection device in at least one display device in response to a screen projection request instruction input by the user, and obtain parameter information of the target screen projection device, wherein the screen projection request instruction carries identification information of the screen projection device, and the parameter information includes status information;

[0040] A judgment module is used to determine whether the target screen projection device is in screen projection mode based on the status information.

[0041] In a third aspect, the present invention provides an electronic device, comprising: one or more processors;

[0042] a storage device for storing one or more programs,

[0043] When the one or more programs are executed by the one or more processors, the one or more processors implement the screen projection method as shown in the first aspect.

[0044] The screen projection method, device and electronic device provided by the embodiments of the present invention, when determining that the target screen projection device is in the screen projection mode, before the target application extension associated with the screen projection application completes the establishment of the first channel connection with the target screen projection device, obtains the target screen data to be projected through the target application extension and writes the target screen data to the preset shared memory; transmits the target screen data to be projected in the preset shared memory to the target screen projection device through the second channel connection through the screen projection application; after the first channel connection is established, stops the target application extension from writing the target screen data to the preset shared memory, and starts to directly transmit the acquired target screen data to the target screen projection device through the first channel connection through the target application extension. In the above process, before the target application extension and the target projection device complete the first channel connection, the target number of screens to be projected can be transmitted to the target projection device using the second channel connection established between the projection application and the target projection device. There is no need to wait for the first channel connection between the target application extension and the target projection device to be established before the target number of screens to be projected is transmitted to the target projection device. After the first channel connection is successfully established, there is no need to write the target number of screens to be projected into the preset shared memory. Instead, the target number of screens to be projected is directly transmitted to the target projection device through the first channel connection, thereby improving the projection efficiency and enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0046] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0047] Figure 1A A schematic diagram of an application scenario among a display device, a control device, and a terminal device provided by an embodiment of the present invention;

[0048] Figure 1B A schematic diagram of the interaction process of a screen projection method in the prior art;

[0049] Figure 2is a hardware configuration block diagram of a control device according to one or more embodiments of the present disclosure;

[0050] Figure 3A is a block diagram of a hardware configuration of a display device according to one or more embodiments of the present disclosure;

[0051] Figure 3B is a schematic diagram of a user interface according to one or more embodiments of the present disclosure;

[0052] Figure 4A A schematic diagram of software configuration of an electronic device according to one or more embodiments of the present disclosure;

[0053] Figure 4B A schematic diagram showing an icon control interface of an application included in a display device (mainly a smart playback device, such as a smart TV, etc.) according to one or more embodiments of the present disclosure;

[0054] Figure 5A A flowchart of a screen projection method provided in an embodiment of the present disclosure;

[0055] Figure 5B A schematic diagram of an interactive scenario of a screen projection method provided in an embodiment of the present disclosure;

[0056] Figure 6A A flowchart of another screen projection method provided in an embodiment of the present disclosure;

[0057] Figure 6B A schematic diagram of an interactive scenario of another screen projection method provided in an embodiment of the present disclosure;

[0058] Figure 7A A flowchart of another screen projection method provided in an embodiment of the present disclosure;

[0059] Figure 7B A schematic diagram of an interactive scenario of another screen projection method provided in an embodiment of the present disclosure;

[0060] Figure 8 A flowchart of another screen projection method provided in an embodiment of the present disclosure;

[0061] Figure 9 A flowchart of another screen projection method provided in an embodiment of the present disclosure;

[0062] Figure 10 A schematic diagram of the device structure of a screen projection method provided in an embodiment of the present disclosure;

[0063] Figure 11 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0064] In order to more clearly understand the above-mentioned objectives, features and advantages of the present invention, the scheme of the present invention will be further described below. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features therein can be combined with each other.

[0065] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present invention, rather than all the embodiments.

[0066] In the specification and claims of this application and the accompanying drawings, the terms "first," "second," "third," etc. are used to distinguish similar or similar objects or entities, and are not necessarily intended to limit a particular order or sequence, unless otherwise noted. It should be understood that the terms used in this manner are interchangeable under appropriate circumstances.

[0067] The terms "comprise," "include," and "have," and any variations thereof, are intended to cover but not exclude inclusion; for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0068] The display device provided in the embodiments of this application can have various implementation forms, such as a television, a smart TV, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. The embodiments of this disclosure do not limit the specific type of display device. Users can project the screen of a terminal device, such as a mobile phone, onto the display device and use the display device to play the screen, so that the user can watch it, thereby improving the user experience.

[0069] For example, Figure 1A As shown, Figure 1A A schematic diagram of an application scenario between a display device, a control device and a terminal device provided in an embodiment of the present invention, Figure 1A In the embodiment, the content of the terminal device 300 is projected onto the display device 200, so that the user can view the content of the terminal device 300 through the display device 200. The user can operate the display device 200 through the control device 100 or the terminal device 300.

[0070] Figure 1B Schematic diagram of the interaction process of a screen projection method in the prior art. Figure 1BAs shown, a third-party application installed on a terminal device, such as a screen projection application, sends a broadcast packet including display device information for screen projection to search for a target screen projection device. After determining the target screen projection device based on the display device information, the screen projection application receives parameter information sent by the target screen projection device, which includes the network Internet protocol, port number and current status information of the target screen projection device. According to the current status information, it is determined whether the target screen projection device is in screen projection mode. When it is determined that the target screen projection device is in screen projection mode, a countdown is entered to start the application extension associated with the screen projection application. When the countdown ends, the application extension associated with the third-party application is started, the video and audio data to be projected are obtained and decoded, and a channel connection is established between the application extension and the target screen projection device. When the channel connection is successfully established, the data to be projected is transmitted using the channel connection so that the screen projection device plays the data to be projected. Since this method requires waiting for a certain period of time before starting the application extension, and after starting the application extension, a channel connection needs to be further established, the data to be projected can be transmitted to the display device for playback after the channel connection is successfully established, resulting in low screen projection efficiency.

[0071] In order to solve the above problems, the embodiment of the present disclosure proposes a screen projection method. When it is determined that the target screen projection device is in the screen projection mode, before the target application extension associated with the screen projection application completes the first channel connection with the target screen projection device, the target screen data to be projected is obtained through the target application extension, and the target screen data to be projected is written into the preset shared memory; the target screen data to be projected in the preset shared memory is transmitted to the target screen projection device through the second channel connection through the screen projection application; after the first channel connection is established, the target application extension is stopped from writing the target screen data to the preset shared memory, and the target application extension is started to directly transmit the obtained target screen data to the target screen projection device through the first channel connection. In the above process, before the target application extension and the target projection device complete the first channel connection, the target number of screens to be projected can be transmitted to the target projection device using the second channel connection established between the projection application and the target projection device. There is no need to wait for the first channel connection between the target application extension and the target projection device to be established before transmitting the target number of screens to the target projection device. After the first channel connection is successfully established, there is no need to write the target number of screens to be projected into the preset shared memory. Instead, the target number of screens to be projected can be directly transmitted to the target projection device through the first channel connection, thereby improving the projection efficiency and enhancing the user experience.

[0072] In some embodiments, the control device 100 may be a remote control. Communication between the remote control and the display device may include infrared protocol communication, Bluetooth protocol communication, or other short-range communication methods, and the display device 200 may be controlled wirelessly or wired. The user may control the display device 200 by inputting user commands through buttons on the remote control, voice input, control panel input, etc. For example, the user may input corresponding control commands through the volume up / down keys, menu keys, power button, etc. on the remote control to control the display device 200.

[0073] In some embodiments, a smart device (eg, a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 may be controlled using an application running on the smart device.

[0074] In some embodiments, the terminal device 300 can install software applications with the display device 200 and connect and communicate via a network communication protocol to achieve one-to-one control operations and data communication. The audio and video content displayed on the terminal device 300 can also be transmitted to the display device 200 to achieve a synchronous display function.

[0075] In some embodiments, the display device 200 may not use the above-mentioned smart device 300 or terminal device 300 to receive instructions, but may receive user control through touch or gestures.

[0076] In some embodiments, the display device 200 can also be controlled in a manner other than the terminal device 300 and the smart device 300. For example, the broadcast packet sent by the terminal device 300 for discovering the projection device can be directly received through a module for receiving broadcast packets configured inside the display device 200, or the broadcast packet can be received through a communicator set outside the display device 200.

[0077] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be connected to a local area network (LAN), a wireless local area network (WLAN), or other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be a single cluster or multiple clusters, and may include one or more types of servers. The display device 200 may be a liquid crystal display, an OLED display, or a projection display device. In addition to providing broadcast reception television functionality, the display device 200 may also provide intelligent network television functionality that provides computer support.

[0078] Figure 2 FIG. 1 is a block diagram of a hardware configuration of a control device according to one or more embodiments of the present disclosure. Figure 2As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive user input commands and convert them into commands that the display device 200 can recognize and respond to, acting as an intermediary for interaction between the user and the display device 200. The communication interface 130 is used for external communication and includes at least one of a wireless network communication technology WIFI chip, a Bluetooth module, NFC (Near Field Communication), or alternative modules. The user input / output interface 140 includes at least one of a microphone, a touchpad, a sensor, a button, or alternative modules.

[0079] Figure 3A FIG. 1 is a block diagram of a hardware configuration of a display device according to one or more embodiments of the present disclosure. Figure 3A As shown, the display device 200 includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface, and can also be a projection device and a projection screen.

[0080] The tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG (Electronic Program Guide) data signals, from a plurality of wireless or wired broadcast television signals.

[0081] Communicator 220 is a component used to communicate with external devices or servers using various communication protocols. For example, the communicator may include at least one of a Wi-Fi module, a Bluetooth module, a wired Ethernet module, or other network communication protocol chip or a near-field communication protocol chip, as well as an infrared receiver. Display device 200 can use communicator 220 to send and receive control signals and data signals with external control device 100 or server 400.

[0082] Detector 230 is used to collect signals from the external environment or external interactions. For example, detector 230 includes a light receiver, a sensor for collecting ambient light intensity; or detector 230 includes an image collector, such as a camera, for collecting external environmental scenes, user attributes, or user interaction gestures; or detector 230 includes a sound collector, such as a microphone, for receiving external sounds.

[0083] The external device interface 240 may include, but is not limited to, any one or more of the following: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by multiple of the above interfaces.

[0084] In some embodiments, controller 250 and tuner 210 may be located in separate devices. That is, tuner 210 may be located in an external device, such as an external set-top box, to the main device where controller 250 resides. Controller 250 controls the operation of the display device and responds to user operations using various software control programs stored in memory. Controller 250 controls the overall operation of display device 200.

[0085] Display 260 includes a display screen component for displaying images, a driver component for driving the image display, and components for receiving image signals output by the controller to display video content, image content, a menu control interface, and a user control UI. For example, the display can be at least one of a liquid crystal display, an OLED (Organic Light-Emitting Diode) display, a touch display, and a projection display. It can also be a projection device and a projection screen.

[0086] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM Random Access Memory (RAM), ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus, etc.

[0087] A user can enter user commands through the graphical user interface (GUI) displayed on display 260, and the user input interface receives the user input commands through the GUI. Alternatively, the user can enter user commands through specific voice or gesture input, and the user input interface recognizes the voice or gesture through sensors to receive the user input commands. A "user interface" is a medium interface for interaction and information exchange between an application or operating system and the user, converting information between its internal form and a form acceptable to the user. A common form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations that uses a graphical display. For example, as shown in 3B, it can be an interface element such as an icon, window, or control displayed on the display screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets. The user interface is used to receive control signals from terminal device 300 (such as an infrared remote control).

[0088] In some embodiments, the user can choose whether to turn on the screen projection function through the screen projection mode of the display device 200. When the display device is in the screen projection mode, the terminal device can search for the display device for screen projection.

[0089] Figure 4A FIG. 1 is a schematic diagram of software configuration of an electronic device according to one or more embodiments of the present disclosure, such as Figure 4A As shown in the figure, the system is divided into four layers, from top to bottom: the application layer (referred to as the "application layer"), the application framework layer (referred to as the "framework layer"), the Android runtime (Android runtime) and system library layer (referred to as the "system runtime library layer"), and the kernel layer.

[0090] In some embodiments, at least one application runs in the application layer. These applications can be window programs, system settings programs, clock programs, etc. that come with the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.

[0091] The framework layer provides applications with an application programming interface (API) and programming framework. The application framework layer includes predefined functions. The application framework layer acts as a processing center, determining the actions taken by applications in the application layer. Through the API, applications can access system resources and services during execution.

[0092] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.

[0093] In some embodiments, the kernel layer is a layer between hardware and software. The kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, Wi-Fi driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver.

[0094] Figure 4B This is a schematic diagram showing an icon control interface of an application included in a display device (mainly a smart playback device, such as a smart TV, etc.) according to one or more embodiments of the present disclosure. Figure 4B As shown in , the application layer includes at least one application that can display corresponding icon controls on the display, such as: live TV application icon controls, video on demand (VOD) application icon controls, media center application icon controls, application center icon controls, game application icon controls, etc. Live TV applications can provide live TV through different signal sources. Video on demand (VOD) applications can provide videos from different storage sources. Unlike live TV applications, video on demand provides video display from certain storage sources. Media center applications can provide applications for playing various multimedia content. Application center can provide storage for various applications.

[0095] The screen projection method provided in the embodiment of the present application can be implemented based on the above-mentioned electronic device.

[0096] In order to explain this solution in more detail, the following will be combined with the following examples. Figure 5A To explain, it is understandable that Figure 5A The steps involved may include more steps or fewer steps in actual implementation, and the order of these steps may also be different, so as to implement the screen projection method applied to the controlled device side provided in the embodiment of the present application.

[0097] Figure 5AThis is a flowchart of a screen projection method provided by an embodiment of the present disclosure. This embodiment is applied to a terminal device. The method of this embodiment is executed by a screen projection device applied to the terminal device side, which can be implemented in hardware / or software and can be configured in an electronic device. Figure 5A As shown, the screen projection method specifically includes the following steps:

[0098] S510, when it is determined that the target projection device is in projection mode, before the target application extension associated with the projection application completes the establishment of the first channel connection with the target projection device, the target data to be projected is obtained through the target application extension, and the target data to be projected is written into the preset shared memory.

[0099] The target projection device refers to a display device used to display the user interface of a mobile device such as a smartphone or tablet computer, including but not limited to a television and a monitor. The present disclosure does not limit the specific type of the target projection device.

[0100] The above-mentioned target application extension is used to realize data sharing with third-party applications such as screen projection applications, and transmit the data to be projected to the target screen projection device. When the target application extension is running, it is necessary to call its own process with the third-party application. The use of the target application extension enables users to quickly and conveniently obtain the most timely information from third-party applications such as screen projection applications. The target screen projection data refers to the data used to be played by the target screen projection device. The target screen projection data can be, for example, video, audio and other data, but is not limited to this. This disclosure does not specifically limit it.

[0101] Specifically, when it is determined that the target projection device is in projection mode, and before the first channel connection between the target application extension associated with the projection application and the target projection device for transmitting the target data to be projected is established, the target application extension is used to obtain the target data to be projected, and after obtaining the target data to be projected, the target data to be projected is written into the preset shared memory.

[0102] Optionally, the target data to be projected can be obtained by using the target application extension through the recording function on the mobile terminal, but is not limited to this. The present disclosure does not specifically limit it, and those skilled in the art can set it according to actual conditions.

[0103] S520, transmit the target screen projection data in the preset shared memory to the target screen projection device through the second channel connection by the screen projection application.

[0104] Specifically, after the target application extension obtains the target data to be projected and writes it into the preset shared memory, the target data to be projected is transmitted to the target projection device through the second channel established between the projection application and the target projection device, so that the target projection device receives the target data to be projected and plays it.

[0105] S530, after the establishment of the first channel connection is completed, stop the target application extension to write the target screen data to the preset shared memory, and start to directly transmit the acquired target screen data to the target projection device through the first channel connection through the target application extension.

[0106] Specifically, after determining that the first channel connection between the target application extension and the target screen projection device is completed, the target screen projection data obtained through the target application extension is stopped from being written into the preset shared memory, and the target screen projection data obtained through the target application extension is directly transmitted to the target screen projection device through the first channel connection between the target application extension and the target screen projection device, so that the target screen projection device can still receive the target screen projection data and play it.

[0107] It should be noted that for each frame of target data to be projected received by the target screen projection device, it is necessary to determine the network Internet protocol of the channel connecting the transmission of each frame of target data to be projected. Only when the network Internet protocol of the channel connecting the transmission of each frame of target data to be projected is consistent, the target data to be projected will be played. In this way, it is ensured that each frame of target data to be projected received by the target screen projection device comes from the same device.

[0108] For example, Figure 5B This is a schematic diagram of an interactive scenario of a screen projection method provided by an embodiment of the present disclosure. Figure 5BAs shown, the screen projection application on the terminal device determines that the target screen projection device is in the screen projection mode. At this time, the target screen projection data obtained by the target application extension needs to be transmitted to the target screen projection device, so that the target screen projection device can play the content of the user interface of the terminal device. Specifically, before the first channel connection between the target application extension associated with the screen projection application and the target screen projection device is established, the target screen projection data obtained by the target application extension is written into the preset shared memory, and a first notification instruction is sent to the screen projection application, indicating that the screen projection application now stores the target screen projection data in the preset shared memory. Accordingly, after receiving the first notification instruction, the screen projection application reads the target screen projection data from the preset shared memory, and transmits the target screen projection data to the target screen projection device through the second channel connection between the screen projection application and the target screen projection device. After the first channel connection between the target application extension and the target screen projection device is established, the target screen projection data obtained by the target application extension is no longer written into the preset shared memory, but is directly transmitted to the target screen projection device using the established first channel connection.

[0109] In this way, the screen projection method provided in the embodiment of the present invention, when determining that the target screen projection device is in the screen projection mode, before the target application extension associated with the screen projection application completes the establishment of the first channel connection with the target screen projection device, obtains the target screen data to be projected through the target application extension and writes the target screen data to the preset shared memory; transmits the target screen data to be projected in the preset shared memory to the target screen projection device through the second channel connection through the screen projection application; after the first channel connection is established, stops the target application extension from writing the target screen data to the preset shared memory, and starts to directly transmit the acquired target screen data to the target screen projection device through the first channel connection through the target application extension. In the above process, before the target application extension and the target projection device complete the first channel connection, the target number of screens to be projected can be transmitted to the target projection device using the second channel connection established between the projection application and the target projection device. There is no need to wait for the first channel connection between the target application extension and the target projection device to be established before the target number of screens to be projected is transmitted to the target projection device. After the first channel connection is successfully established, there is no need to write the target number of screens to be projected into the preset shared memory. Instead, the target number of screens to be projected is directly transmitted to the target projection device through the first channel connection, thereby improving the projection efficiency and enhancing the user experience.

[0110] Figure 6A This is a flow chart of another screen projection method provided by an embodiment of the present disclosure. This embodiment is optimized based on the above embodiment. Optionally, this embodiment can be used to illustrate the process of determining the target screen projection device in at least one display device. Figure 6AAs shown, before executing S510, the following steps are also included:

[0111] S610, in response to a screen projection request instruction input by a user, determining a target screen projection device in at least one display device, and obtaining parameter information of the target screen projection device.

[0112] Among them, the screen projection request instruction carries the identification information of the screen projection device. The identification information can be an IP address (Internet Protocol Address), a MAC address (Media Access Control Address), a local area network address, etc. In actual applications, it can be obtained according to specific circumstances, and no specific restrictions are made here.

[0113] The above-mentioned parameter information includes status information, which is used to indicate whether the target screen projection device is currently in screen projection mode, or the status information is used to indicate that the target screen projection device is currently in standby mode, but is not limited to this. This disclosure does not specifically limit it, and technical personnel in this field can set it according to actual conditions.

[0114] The above-mentioned screen projection request instruction can be an instruction entered by the user on the terminal device, or it can be an instruction entered by the user on the target screen projection device. This disclosure does not specifically limit it, and technical personnel in this field can set it according to actual conditions.

[0115] S620: Based on the status information, determine whether the target screen projection device is in screen projection mode.

[0116] Specifically, after receiving a screen projection request instruction input by the user, in response to the screen projection request instruction, the target screen projection device is determined in one or more display devices based on the display device information used to determine the screen projection. After determining the target screen projection device, it is determined whether the target screen projection device is currently in the screen projection mode according to the status information of the screen projection device.

[0117] For example, following the above embodiment, Figure 6BSchematic diagram of an interactive scenario of another screen projection method provided by an embodiment of the present disclosure. As shown in 6B, the screen projection application on the terminal device receives a screen projection instruction input by the user, and the screen projection request instruction carries the identification information of the display device used for screen projection. The identification information is packaged into a broadcast packet, and the broadcast packet is used to search for the target screen projection device in one or more display devices. After the target screen projection device is determined based on the display device information, the screen projection application receives parameter information sent by the target screen projection device, and the parameter information includes the current status information of the target screen projection device. When it is determined that the target screen projection device is in screen projection mode according to the current status information, a second notification instruction is sent to the target extension program, indicating the process of starting the target extension program, and before the first channel connection between the target application extension and the target screen projection device is established, the target screen projection data is obtained and the target screen projection data is written into the preset shared memory, but is not limited to this and is not specifically limited by the present disclosure.

[0118] Optionally, based on the above embodiments, some embodiments of the present disclosure further include:

[0119] S630: When it is determined that the target projection device is not in projection mode, end the projection.

[0120] Specifically, when a screen projection request instruction input by the user is received, in response to the screen projection request instruction, the target screen projection device is determined in one or more display devices based on the display device information. After determining the target screen projection device, it is determined based on the current status information that the target screen projection device is not in the screen projection mode, and the screen projection is ended at this time.

[0121] In this way, the screen projection method provided in the embodiment of the present disclosure, in the above process, after receiving the screen projection request instruction, determines the target screen projection device, obtains the status information of the target screen projection device, and determines whether the target screen projection device is in the screen projection mode based on the status information, thereby avoiding the problem of screen projection failure when the target screen projection device is not in the screen projection mode.

[0122] Figure 7A This is a flow chart of another screen projection method provided by the embodiment of the present disclosure. This embodiment is optimized based on the above embodiment. Figure 7A As shown, before executing the target application extension associated with the screen projection application to obtain the screen projection data, the following steps are also included:

[0123] S710: Establish a second channel connection between the screen projection application and the target screen projection device, and calculate the target duration of starting the target application extension.

[0124] The target duration is the duration for waiting to start the target application extension. It should be noted that before the target application extension needs to be started, it is necessary to wait for the preset duration before the target application extension can be started. Based on this, when it is determined based on the parameter information that the target screen projection device is in screen projection mode, it indicates that the screen projection function can be realized, and the countdown to starting the target application extension begins.

[0125] It should be noted that while waiting for the target application extension to be launched, a second channel connection between the projection application and the target projection device is established at the same time. This will facilitate the subsequent use of the second channel connection between the projection application and the target projection device to transmit the target data to be projected.

[0126] S720, when the target duration reaches the preset duration, start the target application extension associated with the screen projection application, obtain the screen data to be projected through the target application extension, and write the target screen data to be projected into the preset shared memory.

[0127] Among them, the preset duration refers to the parameter value set to determine how long it takes to wait before the target application extension can be started. For example, the parameter value can be 3 seconds, but is not limited to this. This disclosure does not specifically limit it, and those skilled in the art can set it according to actual conditions.

[0128] Specifically, when it is determined that the target projection device is in projection mode, before obtaining the data to be projected through the target application extension associated with the projection application, the target time for starting the target application extension is counted, and a second channel connection between the projection application and the target projection device is established. After the target time reaches the preset time, the target application extension associated with the projection application is started, the data to be projected is obtained through the target application extension, and the target data to be projected is written into the preset shared memory.

[0129] For example, following the above embodiment, Figure 7B A schematic diagram of an interactive scenario of another screen projection method provided by an embodiment of the present disclosure. As shown in 7B, when the target application extension receives the second notification instruction, it enters the process of starting the target application extension. Specifically, it starts timing, counts the target duration for starting the target application extension, and establishes a second channel connection between the screen projection application and the target screen projection device. When the target duration reaches a preset duration, for example, 3 seconds, the target application extension is started, and the data to be projected is obtained through the target application extension, and the target data to be projected is written into the preset shared memory. However, it is not limited to this, and the present disclosure does not specifically limit it.

[0130] In this way, the screen projection method provided in the embodiment of the present disclosure, in the above process, while waiting for the target application extension to be started, simultaneously establishes a second channel connection between the screen projection application and the target screen projection device, which can facilitate the subsequent use of the second channel connection between the screen projection application and the target screen projection device to transmit the target screen projection data to the target screen projection device.

[0131] Optionally, based on the above embodiment, in some embodiments of the present disclosure, the second channel connection includes a first command channel connection and a first data channel connection; the parameter information also includes first attribute information, and the first attribute information includes a first network Internet protocol and a first port number; an implementation method of establishing the second channel connection between the screen projection application and the target screen projection device may include the following specific steps:

[0132] Step A: Acquire second attribute information of the first instruction channel connection included in the second channel connection.

[0133] Among them, the second attribute information includes a second network Internet protocol and a second port number; wherein, the second network Internet protocol is the network Internet protocol assigned by the system of the terminal device to the screen projection application, and the second port number is the port number included in the second network Internet protocol assigned by the system of the terminal device to the screen projection application for communicating with the target screen projection device.

[0134] The first command channel connection refers to the channel connection used to communicate with the target screen projection device.

[0135] Step B: Based on the first attribute information and the second attribute information, establish a first command channel connection between the screen projection application and the target screen projection device.

[0136] Step C, after the first command channel connection is successfully established, determine the file format of the target screen projection data and the third port number of the first data channel connection through the first command channel connection.

[0137] Among them, the file format of the target data to be projected refers to the file format that can be played by the target projection device. For example, when the target data to be projected is a picture, the file format can be JPEG, but is not limited to this, and this disclosure does not specifically limit it.

[0138] Step D: Establish a first data channel connection between the screen projection application and the target screen projection device based on the first attribute information, the second network Internet protocol and the third port number.

[0139] Specifically, when determining the first network Internet protocol and the first port number included in the attribute information of the target screen projection device, obtain the second network Internet protocol of the screen projection application and the second port number used to communicate with the target screen projection device, and establish a first command channel connection between the screen projection application and the target screen projection device based on the first network Internet protocol, the first port number, the second network Internet protocol and the second port number. After the first command channel connection is successfully established, determine the file format of the target to-be-projected data required by the target screen projection device and the third port number of the first data channel connection through the first command channel connection. After determining the third port number of the first data channel connection, establish a first data channel connection between the screen projection application and the target screen projection device based on the first network Internet protocol, the first port number, the second network Internet protocol and the third port number.

[0140] It should be noted that since the screen projection application is a third-party application installed on the terminal device, the first command channel connection and the first data channel connection of the screen projection application have the same network Internet protocol as the terminal device.

[0141] In this way, the screen projection method provided in the embodiment of the present invention, in the above process, while waiting for the target application extension to be started, simultaneously establishes a second channel connection between the screen projection application and the target screen projection device, including a first command channel connection and a first data channel connection, and determines the file format of the target screen data to be projected and played on the target screen projection device. This can facilitate the subsequent use of the second channel connection between the screen projection application and the target screen projection device to transmit the target screen data to be projected, and ensure the correct transmission of the target screen data to the target screen projection device, avoiding errors when the target screen projection device plays the target screen data to be projected.

[0142] Optionally, based on the above embodiment, in some embodiments of the present disclosure, the first channel connection includes a second command channel connection and a second data channel connection; an implementation method for establishing the first channel connection between the target application extension and the target screen projection device may include the following specific steps:

[0143] Step E: Obtain a fourth port number of the second instruction channel connection included in the first channel connection.

[0144] Step F, based on the first attribute information, the second network Internet protocol and the fourth port number of the target screen projection device, establish a second command channel connection between the target application extension and the target screen projection device.

[0145] Step G: After the second instruction channel connection is successfully established, determine the fifth port number of the second data transmission channel connection through the second instruction channel connection.

[0146] Step H: Based on the first attribute information, the second network Internet protocol and the fifth port number, establish a second data transmission channel connection between the target application extension and the target projection device.

[0147] For the specific process steps E to H of establishing the first channel connection between the target application extension and the target projection device, refer to steps A to D in the above embodiment and will not be described in detail here.

[0148] It should be noted that, since the target application extension is an application extension associated with the screen projection application, the target application extension and the screen projection application have the same network Internet protocol, namely, the second network Internet protocol of the terminal device.

[0149] In this way, the screen projection method provided in the embodiment of the present disclosure, in the above process, establishes a second instruction channel connection and a second data channel connection corresponding to the target application extension, so that the acquired target data to be played can be conveniently transmitted directly to the target screen projection device through the second data channel connection.

[0150] Figure 8 This is a flow chart of another screen projection method provided by the embodiment of the present disclosure. This embodiment is optimized based on the above embodiment. Figure 8 As shown, one implementation of S720 specifically includes the following steps:

[0151] S810, when the target duration reaches the preset duration, start the target application extension associated with the screen projection application, and obtain the initial screen projection data through the target application extension.

[0152] The initial screen data to be projected refers to the most original screen data to be projected obtained through a specific method such as a screen recording function.

[0153] S820: Decode the initial screen data to be projected to obtain target screen data, and write the target screen data to the preset shared memory.

[0154] Specifically, when it is determined that the target projection device is in projection mode, before obtaining the data to be projected through the target application extension associated with the projection application, the target time for starting the target application extension is counted. After the target time reaches the preset time, the target application extension is started, and the initial data to be projected is obtained through the target application extension. The obtained initial data to be projected is decoded and processed to obtain the target data to be projected, and the target data to be projected is written into the preset shared memory.

[0155] In this way, in the screen projection method provided in the embodiment of the present invention, in the above process, the target screen data to be projected is obtained after decoding the obtained initial screen data to be projected, and the target screen data to be projected is stored in the preset shared memory, so as to prevent the target screen data to be projected transmitted to the target screen projection device from being disordered.

[0156] Figure 9 This is a flow chart of another screen projection method provided by the embodiment of the present disclosure. This embodiment is optimized based on the above embodiment. Figure 9 As shown, after executing S530, the following steps are also included:

[0157] S910, when the screen projection application completes the transmission of the target screen data to be projected in the preset shared memory through the second channel connection, disconnect the second channel connection between the screen projection application and the target screen projection device.

[0158] Specifically, when the target data to be projected is transmitted using the first channel connection between the target application extension and the target projection device, and the target data to be projected in the preset shared memory is transmitted through the second channel connection by the projection application, the second channel connection between the projection application and the target projection device is disconnected.

[0159] In this way, the screen projection method provided in the embodiment of the present disclosure, in the above process, avoids the existence of idle channel connections and thus wastes resources by promptly disconnecting the second channel connection between the screen projection application and the target screen projection device.

[0160] Figure 10 This is a schematic diagram of the device structure of a screen projection method provided in an embodiment of the present disclosure. Applied to a terminal device, the device can implement the screen projection method applied to the terminal device side described in any embodiment of the present application. The device specifically includes the following:

[0161] The target screen projection data acquisition module 11 is used to obtain the target screen projection data through the target application extension when it is determined that the target screen projection device is in the screen projection mode, and before the target application extension associated with the screen projection application completes the establishment of the first channel connection with the target screen projection device, and write the target screen projection data into the preset shared memory;

[0162] A first target screen projection data transmission module 12 is configured to transmit the target screen projection data in the preset shared memory to the target screen projection device through the screen projection application via a second channel connection;

[0163] The second target screen projection data transmission module 13 is used to stop the target application extension from writing the target screen projection data into the preset shared memory after the establishment of the first channel connection is completed, and start to directly transmit the acquired target screen projection data to the target projection device through the first channel connection through the target application extension.

[0164] As an optional implementation of the embodiment of the present disclosure, the device further includes:

[0165] A target screen projection device determination module is used to determine the target screen projection device in at least one display device in response to a screen projection request instruction input by the user, and obtain parameter information of the target screen projection device, wherein the screen projection request instruction carries identification information of the screen projection device, and the parameter information includes status information;

[0166] A judgment module is used to determine whether the target screen projection device is in screen projection mode based on the status information.

[0167] As an optional implementation of the embodiment of the present disclosure, the target screen projection data acquisition module 11 includes a channel connection establishment unit, which is used to establish a second channel connection between the screen projection application and the target screen projection device, and calculate the target duration of starting the target application extension;

[0168] The target screen projection data acquisition module 11 is specifically used to start the target application extension associated with the projection application when the target duration reaches the preset duration, obtain the target screen projection data through the target application extension, and write the target screen projection data into the preset shared memory.

[0169] As an optional implementation of the embodiment of the present disclosure, the channel connection establishing unit is specifically configured to obtain second attribute information of the first instruction channel connection included in the second channel connection, wherein the second attribute information includes a second network Internet protocol and a second port number;

[0170] Based on the first attribute information and the second attribute information, establishing a first command channel connection between the screen projection application and the target screen projection device;

[0171] After the first command channel connection is successfully established, the file format of the target screen projection data and the third port number of the first data channel connection are determined through the first command channel connection;

[0172] Based on the first attribute information, the second network Internet protocol and the third port number, a first data channel connection is established between the screen projection application and the target screen projection device.

[0173] As an optional implementation of the embodiment of the present disclosure, the channel connection establishing unit is further configured to obtain a fourth port number of the second instruction channel connection included in the first channel connection;

[0174] Establishing a second command channel connection between the target application extension and the target screen projection device based on the first attribute information, the second network Internet protocol, and the fourth port number of the target screen projection device;

[0175] After the second instruction channel connection is successfully established, determining the fifth port number of the second data transmission channel connection through the second instruction channel connection;

[0176] Based on the first attribute information, the second network Internet protocol and the fifth port number, a second data transmission channel connection is established between the target application extension and the target projection device.

[0177] As an optional implementation of the embodiment of the present disclosure, the target screen data acquisition module 11 is further configured to start the target application extension associated with the screen projection application when the target duration reaches a preset duration, and obtain the initial screen data to be projected through the target application extension;

[0178] The initial screen data to be projected is decoded to obtain the target screen data to be projected, and the target screen data to be projected is written into a preset shared memory.

[0179] As an optional implementation of the embodiment of the present disclosure, the second target screen projection data transmission module 13 is also used to disconnect the second channel connection between the projection application and the target screen projection device when the transmission of the target screen projection data in the preset shared memory is completed through the second channel connection by the projection application.

[0180] Figure 11 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 10 As shown, the electronic device includes a processor 1110 and a storage device 1120; the number of processors 1110 in the electronic device can be one or more. Figure 10 In the figure, a processor 1110 is taken as an example; the processor 1110 and the storage device 1120 in the electronic device can be connected via a bus or other means. Figure 10 The bus connection is taken as an example.

[0181] The storage device 1120, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the screen projection method in the embodiments of the present disclosure. The processor 1110 executes the software programs, instructions, and modules stored in the storage device 1120 to execute various functional applications and data processing of the electronic device, thereby implementing the screen projection method provided in the embodiments of the present disclosure.

[0182] The storage device 1120 may primarily include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created based on the use of the terminal, etc. Furthermore, the storage device 1120 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the storage device 1120 may further include a memory remotely located relative to the processor 1110, and such remote memory may be connected to the electronic device via a network. Examples of the aforementioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0183] An electronic device provided in this embodiment can be used to execute the screen projection method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0184] An embodiment of the present disclosure provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the various processes of the above-mentioned screen projection method and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0185] The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0186] For ease of explanation, the above description has been made in conjunction with specific embodiments. However, the above discussion of some embodiments is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Based on the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are intended to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various different variations of the embodiments suitable for specific use considerations.

Claims

1. A screen projection method, characterized in that: Applied to terminal equipment, including: When it is determined that the target screen projection device is in screen projection mode, before the target application extension associated with the screen projection application completes establishing a first channel connection with the target screen projection device, the target screen data to be projected is obtained through the target application extension, and the target screen data to be projected is written into a preset shared memory; wherein, the screen projection application is a third-party application installed on the terminal device; the target application extension is used to realize data sharing with the screen projection application, and when the target application extension is running, it needs to call its own process with the screen projection application respectively; The screen projection application transmits the target screen projection data in the preset shared memory to the target screen projection device through the second channel connection; After the establishment of the first channel connection is completed, the target application extension is stopped from writing the target screen projection data into the preset shared memory, and the target application extension is started to directly transmit the acquired target screen projection data to the target screen projection device through the first channel connection.

2. The method according to claim 1, characterized in that Before determining that the target screen projection device is in the screen projection mode, the method further includes: In response to a screen projection request instruction input by a user, determining the target screen projection device in at least one display device and obtaining parameter information of the target screen projection device, wherein the screen projection request instruction carries identification information of the screen projection device, and the parameter information includes status information; Based on the status information, determine whether the target screen projection device is in screen projection mode.

3. The method according to claim 1, characterized in that Before the target screen data to be projected is obtained through the target application extension and the target screen data to be projected is written into the preset shared memory, the method further includes: Establishing a second channel connection between the screen projection application and the target screen projection device, and counting the target duration of starting the target application extension; When the target duration reaches the preset duration, the target application extension associated with the screen projection application is started, the target screen data to be projected is obtained through the target application extension, and the target screen data to be projected is written into the preset shared memory.

4. The method according to claim 3, characterized in that The second channel connection includes a first instruction channel connection and a first data channel connection; the parameter information also includes first attribute information, and the first attribute information includes a first network Internet protocol and a first port number; The establishing of a second channel connection between the screen projection application and the target screen projection device includes: Acquire second attribute information of the first instruction channel connection included in the second channel connection, wherein the second attribute information includes a second network Internet protocol and a second port number; Establishing a first command channel connection between the screen projection application and the target screen projection device based on the first attribute information and the second attribute information; After the first command channel connection is successfully established, the file format of the target screen projection data and the third port number of the first data channel connection are determined through the first command channel connection; Based on the first attribute information, the second network Internet protocol and the third port number, a first data channel connection is established between the screen projection application and the target screen projection device.

5. The method according to claim 1, wherein The first channel connection includes a second instruction channel connection and a second data channel connection; The target application extension associated with the screen projection application establishes a first channel connection with the target screen projection device, including: Obtain a fourth port number of a second instruction channel connection included in the first channel connection; Establishing a second command channel connection between the target application extension and the target screen projection device based on the first attribute information, the second network Internet protocol, and the fourth port number of the target screen projection device; After the second instruction channel connection is successfully established, determining the fifth port number of the second data transmission channel connection through the second instruction channel connection; Based on the first attribute information, the second network Internet protocol and the fifth port number, a second data transmission channel connection is established between the target application extension and the target projection device.

6. The method according to claim 3, characterized in that When the target duration reaches a preset duration, starting the target application extension associated with the screen projection application, obtaining target screen data to be projected through the target application extension, and writing the target screen data to be projected into a preset shared memory, including: When the target duration reaches a preset duration, the target application extension associated with the screen projection application is started, and initial screen projection data is obtained through the target application extension; The initial screen data to be projected is decoded to obtain the target screen data to be projected, and the target screen data to be projected is written into a preset shared memory.

7. The method according to claim 1, characterized in that After starting to directly transmit the acquired target screen projection data to the target screen projection device through the first channel connection by the target application extension, the method further includes: When the screen projection application completes the transmission of the target screen data to be projected in the preset shared memory through the second channel connection, the second channel connection between the screen projection application and the target screen projection device is disconnected.

8. A terminal device, characterized in that: include: A target screen projection data acquisition module is used to, when it is determined that the target screen projection device is in screen projection mode, obtain the target screen projection data through the target application extension associated with the screen projection application and before the first channel connection is established with the target screen projection device, and write the target screen projection data into a preset shared memory; wherein, the screen projection application is a third-party application installed on the terminal device; the target application extension is used to realize data sharing with the screen projection application, and when the target application extension is running, it needs to call its own process with the screen projection application; A first target screen projection data transmission module is used for the screen projection application to transmit the target screen projection data in the preset shared memory to the target screen projection device through the second channel connection; The second target screen projection data transmission module is used to stop the target application extension from writing the target screen projection data into the preset shared memory after the establishment of the first channel connection is completed, and start to directly transmit the acquired target screen projection data to the target projection device through the first channel connection through the target application extension.

9. The terminal device according to claim 8, characterized in that The terminal device further includes: A target screen projection device determination module is used to determine the target screen projection device in at least one display device in response to a screen projection request instruction input by the user, and obtain parameter information of the target screen projection device, wherein the screen projection request instruction carries identification information of the screen projection device, and the parameter information includes status information; A judgment module is used to determine whether the target screen projection device is in screen projection mode based on the status information.

10. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the steps of the screen projection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Screen projection content display method and device, electronic equipment and readable storage medium

    CN112261467A

  • Display device, mobile terminal and projection screen data transmission method

    CN114286165A