Screen projection method and electronic device

By identifying and rejecting abnormal screen projection control requests, the playback disorder problem caused by screen projection preemption is solved, and the user experience and the security and efficiency of the screen projection process are improved.

CN116233505BActive Publication Date: 2025-10-03HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111478880.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-10-03
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

When multiple mobile phones establish screen casting connections with the same TV, screen casting may be preempted, causing playback disruption and reducing user experience.

Method used

By identifying abnormal screen projection control requests, the electronic device that currently has control authority is determined, and abnormal control instructions are identified and rejected based on device information comparison to ensure normal playback of media content.

Benefits of technology

It improves the screen projection experience, avoids playback disorder, and enhances the security and data processing efficiency of the screen projection process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116233505B_ABST
    Figure CN116233505B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a screen projection method and an electronic device, which relate to the field of terminal technology and can identify abnormal screen projection control requests, enable media content to be played normally, and improve the user's screen projection experience. The method is as follows: receiving a first instruction from a second electronic device, the first instruction includes the device information of the second electronic device and the address of the first media content, obtaining the first media content according to the address of the first media content, and playing the first media content; receiving a second instruction from a third electronic device, the second instruction includes the address of the second media content, and sending a third instruction to the third electronic device; receiving a fourth instruction from the third electronic device, the fourth instruction includes the device information of the third electronic device, comparing the device information of the third electronic device with the device information of the second electronic device, and the device information of the third electronic device is different from the device information of the second electronic device; sending a fifth instruction to the third electronic device; and continuing to play the first media content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When multiple phones establish screen mirroring connections to the same TV based on the screen mirroring protocol, screen mirroring may occur. For example, when a video app on phone 1 is casting a video to the TV, phone 2 also attempts to play the video from the video app on the TV.

[0003] When the TV agrees to play the video in Phone 2's video app, Phone 1's video app should exit the video casting control interface. When the TV disagrees with Phone 2's video app, Phone 2's video app should also exit the video casting control interface. If Phone 1's video app or Phone 2's video app doesn't have a relevant exit mechanism, Phone 1's video app or Phone 2's video app can still send casting control requests to the TV. This will directly cause playback disruption, thereby reducing the user's casting experience. Summary of the Invention

[0004] The embodiments of the present application provide a screen projection method and electronic device that can identify abnormal screen projection control requests, enable media content to be played normally, and improve the user's screen projection experience.

[0005] In a first aspect, a screen projection method is provided, which includes: a first electronic device receives a first instruction from a second electronic device, the first instruction including device information of the second electronic device and an address of first media content, the first instruction being used to indicate that the second electronic device requests to cast the first media content on the first electronic device for playback; the first electronic device obtains the first media content according to the address of the first media content, and plays the first media content; the first electronic device receives a second instruction from a third electronic device, the second instruction including the address of the second media content, the second instruction being used to indicate that the third electronic device requests to cast the second media content on the first electronic device for playback; the first electronic device sends a third instruction to the third electronic device, the third instruction being used to indicate that the first electronic device refuses the third electronic device to cast the second media content on the first electronic device for playback; the first electronic device receives a fourth instruction from the third electronic device, the fourth instruction including device information of the third electronic device, the fourth instruction being used to indicate that the third electronic device requests to control the first media content played on the first electronic device; the first electronic device compares the device information of the third electronic device with the device information of the second electronic device, and the device information of the third electronic device is different from the device information of the second electronic device; the first electronic device sends a fifth instruction to the third electronic device, the fifth instruction being used to indicate that the first electronic device refuses the third electronic device to control the first media content played on the first electronic device; and the first electronic device continues to play the first media content.

[0006] Based on the method provided in the embodiment of the present application, the first electronic device can determine the electronic device that currently has control authority based on the media content being played. When the first electronic device receives a screen projection control request, it compares the device information of the electronic device that issued the screen projection control request with the device information of the device with control authority, and determines whether to execute the screen projection control instruction based on the comparison result. In this way, abnormal screen projection control requests can be identified, so that the media content can be played normally, thereby improving the user's screen projection experience.

[0007] In one possible implementation, the screen projection method further includes: when playback of the first media content ends, the first electronic device deletes the device information of the second electronic device. In this way, by deleting useless information, the memory usage of the first electronic device is reduced, and the data processing efficiency of the first electronic device is improved.

[0008] In one possible implementation, the screen projection method further includes: the first electronic device receives a sixth instruction from the second electronic device, the sixth instruction including device information of the second electronic device, and the sixth instruction is used to represent that the second electronic device requests to control the first media content played on the first electronic device; the first electronic device compares the device information of the second electronic device in the sixth instruction with the device information of the second electronic device in the first instruction, and the device information of the second electronic device in the sixth instruction is the same as the second electronic device in the first instruction; the first electronic device executes the second electronic device to control the first media content played on the first electronic device. By comparing the device information of the device, the control authority of the device is obtained, thereby determining the abnormal control instruction.

[0009] In one possible implementation, before obtaining the first media content according to the address of the first media content, the screen projection method also includes: sending a seventh instruction to the second electronic device; the seventh instruction is used to indicate that the first electronic device agrees that the second electronic device will project the first media content on the first electronic device for playback.

[0010] In one possible implementation, before sending the seventh instruction to the second electronic device, the screen projection method further includes: determining that the device information of the second electronic device is included in the screen projection whitelist, and the screen projection whitelist includes device information of devices trusted by the user. The screen projection permission of the electronic device is limited by the screen projection whitelist. Since the screen projection whitelist includes devices trusted by the user, the use of the screen projection whitelist can make the entire screen projection process more secure.

[0011] In one possible implementation, before sending the third instruction to the third electronic device, the screen projection method also includes: determining that neither the screen projection whitelist nor the screen projection blacklist includes the device information of the third electronic device, the screen projection blacklist includes the device information of malicious devices, and the malicious devices include devices whose number of triggered eighth instructions exceeds a preset threshold within a preset time period, and the eighth instruction is a request by the electronic device to project media content on the first electronic device. During the screen projection process, in addition to the screen projection whitelist, there is also a screen projection blacklist. The screen projection blacklist is for malicious screen projection devices, and there are more restrictions on screen projection. These restrictions are used to enhance the security of screen projection.

[0012] In a possible implementation, after receiving the second instruction from the third electronic device, the screen projection method further includes: the first electronic device determining that the screen projection blacklist includes device information of the third electronic device;

[0013] A ninth instruction is sent to the third electronic device, indicating that the first electronic device refuses the third electronic device from casting the second media content on the first electronic device for playback within a preset time period. A casting processing rule for the casting blacklist is provided.

[0014] In a possible implementation, the fifth instruction is a network status code starting with 5. For example, the fifth instruction is 500.

[0015] In a possible implementation, the fourth instruction or the sixth instruction is any one of a pause instruction, a play instruction, a fast-forward instruction, a fast-rewind instruction, a double-speed instruction, or a close instruction.

[0016] In the second aspect, a screen projection method is provided, which includes: a second electronic device sends a first instruction to a first electronic device, the first instruction including device information of the second electronic device and the address of the first media content, and the first instruction is used to indicate that the second electronic device requests to cast the first media content on the first electronic device for playback; a seventh instruction is received from the first electronic device, and the seventh instruction is used to indicate that the first electronic device agrees that the second electronic device casts the first media content on the first electronic device for playback; a sixth instruction is sent to the first electronic device, the sixth instruction including device information of the second electronic device, and the sixth instruction is used to indicate that the second electronic device requests to control the first media content played on the first electronic device; a tenth instruction is received from the first electronic device, and the tenth instruction is used to indicate that the first electronic device agrees that the second electronic device controls the first media content played on the first electronic device. In this way, the second electronic device can promptly obtain the feedback of the first electronic device on the screen projection request and the screen projection control request, thereby avoiding power consumption caused by long waiting times.

[0017] On the third aspect, a screen projection method is provided, which includes: a third electronic device sends a second instruction to a first electronic device, the second instruction includes device information of the third electronic device and the address of the second media content, and the second instruction is used to represent that the third electronic device requests to cast the second media content on the first electronic device; receives a third instruction from the first electronic device, and the third instruction is used to represent that the first electronic device refuses the third electronic device to cast the second media content on the first electronic device; sends a fourth instruction to the first electronic device, the fourth instruction includes device information of the third electronic device, and the fourth instruction is used to represent that the third electronic device requests to control the first media content played on the first electronic device; receives a fifth instruction from the first electronic device, and the fifth instruction is used to represent that the first electronic device refuses the third electronic device to control the second media content played on the first electronic device. In this way, the third electronic device can promptly obtain the feedback of the first electronic device on the screen projection request and the screen projection control request, avoiding power consumption caused by long waiting times.

[0018] In a fourth aspect, a screen projection system is provided, which includes: a first electronic device, a second electronic device and a third electronic device; the first electronic device, the second electronic device and the third electronic device are in the same local area network; the second electronic device sends a first instruction to the first electronic device, the first instruction includes the device information of the second electronic device and the address of the first media content, and the first instruction is used to indicate that the second electronic device requests to cast the first media content on the first electronic device for playback; the first electronic device responds to the first instruction, sends a seventh instruction to the second electronic device, obtains the first media content according to the address of the first media content, and plays the first media content, and the seventh instruction is used to indicate that the first electronic device agrees that the second electronic device casts the first media content on the first electronic device for playback; the third electronic device sends a second instruction to the first electronic device, the second instruction includes the device information of the third electronic device and the address of the second media content, and the second instruction is used to indicate that the third electronic device requests to cast the second media content on the first electronic device for playback; the first electronic device responds to the second instruction, sends a third instruction to the third electronic device, and the third instruction is used to indicate that the first electronic device refuses the third electronic device to cast the second media content on the first electronic device for playback; the second electronic device sends a sixth instruction to the first electronic device, and the sixth instruction includes the device information of the second electronic device. The sixth instruction is used to indicate that the second electronic device requests to control the first media content played on the first electronic device; the first electronic device responds to the sixth instruction and compares the device information of the second electronic device in the sixth instruction with the device information of the second electronic device in the first instruction, and the device information of the second electronic device in the sixth instruction is the same as the second electronic device in the first instruction; the first electronic device sends a tenth instruction to the second electronic device, and the tenth instruction indicates that the first electronic device agrees to the second electronic device controlling the first media content played on the first electronic device; the first electronic device executes the second electronic device's control of the first media content; the third electronic device sends a fourth instruction to the first electronic device, and the fourth instruction includes the device information of the third electronic device, and the fourth instruction indicates that the third electronic device requests to control the first media content played on the first electronic device; the first electronic device responds to the fourth instruction and compares the device information of the third electronic device in the fourth instruction with the device information of the second electronic device in the first instruction, and the device information of the third electronic device in the fourth instruction is different from the second electronic device in the first instruction; the first electronic device sends a fifth instruction to the second electronic device, and the fifth instruction indicates that the first electronic device refuses the third electronic device to control the first media content played on the first electronic device; the first electronic device continues to play the first media content. This process is an interactive process of screen projection and screen projection control among the first, second, and third electronic devices.

[0019] In a fifth aspect, an electronic device is provided, which has the function of implementing the method of the first aspect, the function of implementing the method of the second aspect, and the function of implementing the method of the third aspect. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0020] In the sixth aspect, an electronic device is provided, comprising: a processor and a memory; the memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory, so that the electronic device executes the screen projection method in the first aspect, the second aspect and the screen projection method in the third aspect mentioned above.

[0021] In the seventh aspect, a computer-readable storage medium is provided, which stores instructions. When the computer-readable storage medium is run on a computer, the computer can execute the screen projection method in the above-mentioned first aspect, second aspect and third aspect.

[0022] In an eighth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the screen projection method in the first aspect, the second aspect, and the third aspect.

[0023] In a ninth aspect, a device (for example, a chip system) is provided, comprising a processor for supporting a first device in implementing the functions described in the first aspect, such as obtaining information about a first transmission delay corresponding to a terminal-related message transmitted between the first device and the second device. In one possible design, the device further comprises a memory for storing program instructions and data necessary for the first device. When the device is a chip system, it may be composed of a chip, or may include a chip and other discrete components.

[0024] Among them, the technical effects brought about by any design method in the fourth to ninth aspects can refer to the technical effects brought about by different design methods in the first, second and third aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1A A schematic structural diagram of a screen projection system provided in an embodiment of the present application;

[0026] Figure 1B Schematic diagram 1 of a screen projection display provided in an embodiment of the present application;

[0027] Figure 1C A screen projection display diagram provided in an embodiment of the present application Figure 2 ;

[0028] Figure 1D Schematic diagram 3 of a screen projection display provided in an embodiment of the present application;

[0029] Figure 1E A screen projection display diagram provided in an embodiment of the present application Figure 4 ;

[0030] Figure 2 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0031] Figure 3A A schematic diagram of a software system of an electronic device provided in an embodiment of the present application;

[0032] Figure 3B A schematic diagram of the software module architecture of a mobile phone 1, a mobile phone 2, and a television 1 provided in an embodiment of the present application;

[0033] Figure 4 A display diagram 1 provided in an embodiment of the present application;

[0034] Figure 5 A display diagram provided in the embodiment of the present application Figure 2 ;

[0035] Figure 6 A third display diagram provided in an embodiment of the present application;

[0036] Figure 7 A display diagram provided in the embodiment of the present application Figure 4 ;

[0037] Figure 8 A display diagram provided in the embodiment of the present application Figure 5 ;

[0038] Figure 9 A display diagram provided in the embodiment of the present application Figure 6 ;

[0039] Figure 10 A display diagram provided in the embodiment of the present application Figure 7 ;

[0040] Figure 11 A display diagram provided in the embodiment of the present application Figure 8 ;

[0041] Figure 12 A display diagram provided in the embodiment of the present application Figure 9 ;

[0042] Figure 13 A display diagram provided in the embodiment of the present application Figure 10 ;

[0043] Figure 14 A display diagram provided in the embodiment of the present application Figure 10 one;

[0044] Figure 15 A display diagram provided in the embodiment of the present application Figure 10 two;

[0045] Figure 16 A display diagram provided in the embodiment of the present application Figure 10 three;

[0046] Figure 17 A display diagram provided in the embodiment of the present application Figure 10 Four;

[0047] Figure 18 Schematic diagram 1 of information interaction provided in an embodiment of the present application;

[0048] Figure 19 An information interaction diagram provided in this application embodiment Figure 2 ;

[0049] Figure 20 A schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the present application, unless otherwise specified, "at least one" means one or more, and "a plurality of" means two or more than two. In addition, in order to facilitate the clear description of the technical solutions in the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.

[0051] At present, the two common screen projection methods are mirror projection and push projection. Mirror projection refers to completely copying the picture on the screen of the projecting end to the projected end, and transmitting the mirrored picture synchronously in real time like a mirror. When the screen of the projecting end is on, the projected end can display the picture of the projecting end; when the screen of the projecting end is off, the projected end will also display the corresponding off-screen picture. Push projection refers to pushing the uniform resource identifier (URI) of the media content of the projecting end to the projected end, and then the projected end obtains the corresponding media content on the corresponding server through the URI for playback. At the same time, the projecting end can turn off the screen and browse other content, and the picture of the projected end can be separated from the picture of the projecting end. Among them, the protocols that support mirror projection include: Airplay screen mirroring protocol, Miracast protocol and lelink mirroring. The protocols that support push projection include Airplay screen mirroring protocol, Digital Living Network Alliance (DLNA) and lelink mirroring.

[0052] The following introduces a screen projection system provided by an embodiment of the present application.

[0053] like Figure 1A As shown, it is a schematic diagram of the architecture of a screen projection system provided in an embodiment of the present application. The system includes: two screen projection terminals (for example, screen projection terminal 1 (second electronic device) and screen projection terminal 2 (third electronic device) and screen projection terminal 1 (first electronic device). Two or more screen projection terminals and screen projection terminal 1 can be directly connected to WiFi or connected to the same hotspot device. Optionally, the system may also include a router. The two screen projection terminals and screen projection terminal 1 can be connected to the same local area network based on the router.

[0054] The projector is mainly used to establish a projection channel with the projected end, and then send the URI of the media content of the application in the projector to the projected end. The projected end obtains the media content from the corresponding server according to the URI for playback, and the projector can also send a projection control request to the projected end to control the playback of the media content on the projected end. The projector is specifically a digital media controller (DMC) device, such as: mobile phones, tablet computers, desktops, laptops, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, as well as cellular phones, personal digital assistants (PDAs), augmented reality (AR) and virtual reality (VR) devices.

[0055] The projected screen end is mainly used to receive the URI of the media content and the projection control request sent by the projection end, and obtain the corresponding media content on the corresponding server through the URI for playback; and determine whether to adjust the playback of the media content according to the projection control request. The projected screen end is specifically a digital media renderer (DMR) device, such as a TV, an audio and video receiver or a video display. The embodiment of the present application does not impose any special restrictions on the specific forms of the projection end, the projected screen end and the server.

[0056] Based on the above system, the projection end and the projection end establish a projection connection, so that the projection end plays the projection media content on the projection end to realize projection. During the projection connection process between the projection end and the projection end, projection preemption may occur. Projection preemption means that the application A (for example: video app, album app, music app) of the projection end 1 (for example: mobile phone, ipad, computer) plays the first projection media content (for example: image content, audio content, video content and other projection media content) on the projection end 1 (for example: projector, conference tablet, splicing screen, electronic whiteboard, TV). At this time, another projection end 2 (for example: mobile phone, ipad, computer) attempts to establish a connection with the projection end 1, and plays the second projection media content of the application B (for example: video app, album app, music app) of the projection end 2 on the projection device B. Among them, media content can also be called multimedia content, which is not limited in this application. It should be noted that after a piece of media content undergoes one or more of the following processing processes: encryption, decryption, encoding, decoding, compression, and decompression, the media content remains unchanged, and the media data corresponding to the media content can change based on different processing processes, that is, the media content can correspond to different media data at different stages.

[0057] The projected screen terminal 1 determines whether to allow the projecting screen terminal 2 to preempt the projected screen based on the projecting rules.

[0058] In the first case, when the projected terminal 1 agrees to be preempted by the projecting terminal 2, the projected terminal 1 switches the projected display content of the projected terminal 1 from the first media content of the projecting terminal 1 to the second media content of the projecting terminal 2, and the application A of the projecting terminal 1 exits the projection control interface on the projecting terminal 1. In actual applications, the application A of the projecting terminal 1 may not have established a relevant exit mechanism, so that the application A of the projecting terminal 1 still stays on the projection control interface. Then the projecting terminal 1 can send a projection control instruction to the projected terminal 1, thereby controlling the playback of the second media content on the projected terminal 1. At this time, for the second media content played on the projected terminal 1, the projected terminal 1 can receive the projection control request from the application B of the projecting terminal 2, and can also receive the projection control request sent by the application A of the projecting terminal 1.

[0059] In the second case, when the projected terminal 1 refuses to be preempted by the projecting terminal 2, the projected terminal 1 can continue to play the first media content of the projecting terminal 1 without any change. At the same time, a prompt character about "projection failed" is displayed on the display interface of the projected terminal 1 and the projecting terminal 2. At the same time, the application B of the projecting terminal 2 exits the projection control interface on the projecting terminal 2. In actual applications, the application B of the projecting terminal 2 may not have established a relevant exit mechanism, so that the application B of the projecting terminal 2 still stays on the projection control interface. Then the projecting terminal 2 can send a projection control instruction to the projected terminal 1, thereby controlling the playback of the first media content on the projected terminal 1. At this time, for the first media content played on the projected terminal 1, the projected terminal 1 can receive the projection control request from the application A of the projecting terminal 1 for execution, and can also receive the projection control request sent by the application B of the projecting terminal 2 for execution.

[0060] In the above two cases, both the projection terminal 1 and the projection terminal 2 remain in the projection control interface. Figure 1B As shown, the projected screen terminal 1 is currently playing the second media content. The projected screen terminal 1 receives a click operation from user A on the projection control interface of the projected screen terminal 1 at time T1, and in response to the click operation, sends a projection control instruction (fast forward instruction) to the projected screen terminal 1. The projected screen terminal 1 responds to the fast forward instruction to fast forward the second media content, and the interface 100 of the projected screen terminal 1 shows that the playback progress of the second media content is fast forwarded from 1:00 to 1:05. The projected screen terminal 2 receives a click operation from user B on the projection control interface of the projected screen terminal 2 at time T1+1, and in response to the click operation, sends a projection control instruction (fast rewind instruction) to the projected screen terminal 1. The projected screen terminal 1 responds to the fast rewind instruction to fast rewind the second media content, and the interface 101 of the projected screen terminal 1 shows that the playback progress of the second media content is fast rewound from 1:05 to 1:00. At this time, the fast-forward instruction issued by the projection terminal 1 and executed by the projection terminal 1 is an abnormal control instruction. Therefore, the interface 100 of the projection terminal 1 displays an abnormal playback situation.

[0061] For the second case, if Figure 1C As shown, the projected screen terminal 1 is currently playing the first media content. The projected screen terminal 1 receives a click operation from user A on the projection control interface of the projected screen terminal 1 at time T1. In response to the click operation, the projected screen control instruction (fast forward instruction) is issued to the projected screen terminal 1. In response to the fast forward instruction, the projected screen terminal 1 fast forwards the first media content, and the interface 200 of the projected screen terminal 1 displays that the playback progress of the first media content is fast forwarded from 1:00 to 1:05. The projected screen terminal 2 receives a click operation from user B on the projection control interface of the projected screen terminal 2 at time T1+1. In response to the click operation, the projected screen control instruction (fast rewind instruction) is issued to the projected screen terminal 1. In response to the fast rewind instruction, the projected screen terminal 1 fast rewinds the first media content, and the interface 201 of the projected screen terminal 1 displays that the playback progress of the first media content is fast rewound from 1:05 to 1:00. At this time, the fast rewind instruction issued by the projected screen terminal 2 and executed by the projected screen terminal 1 is an abnormal control instruction. Therefore, the interface 201 of the projected terminal 1 displays an abnormal playback situation.

[0062] Since the projected screen end 1 cannot recognize abnormal control instructions and executes all control instructions, if the projecting end that fails to preempt maliciously disrupts the playback of the projected media content on the projected screen end 1, it will inevitably cause the playback of the projected media content to be disordered.

[0063] The embodiments of the present application provide a screen projection method and device that can solve the problem of abnormal screen projection control requests being executed by the projected terminal 1 in a screen projection preemption scenario, avoid playback disruptions, and thus improve user experience.

[0064] For example, when both the projection terminal 1 and the projection terminal 2 stay in the projection control interface. Figure 1D As shown, the projected screen terminal 1 is currently playing the second media content. The projected screen terminal 1 receives a click operation from user A on the projection control interface of the projected screen terminal 1 at time T1, and in response to the click operation, sends a projection control instruction (fast forward instruction) to the projected screen terminal 1. The projected screen terminal 1 does not respond to the fast forward instruction, and the interface 300 of the projected screen terminal 1 shows that the second media content continues to be played. The projected screen terminal 2 receives a click operation from user B on the projection control interface of the projected screen terminal 2 at time T1+1, and in response to the click operation, sends a projection control instruction (fast rewind instruction) to the projected screen terminal 1. The projected screen terminal 1 responds to the fast rewind instruction to rewind the second media content, and the interface 301 of the projected screen terminal 1 shows that the playback progress of the second media content is fast rewound from 1:01 to 0:56.

[0065] For the second case, if Figure 1EAs shown, the projected screen terminal 1 is currently playing the first media content. The projected screen terminal 1 receives a click operation from user A on the projection control interface of the projected screen terminal 1 at time T1. In response to the click operation, the projected screen terminal 1 sends a projection control instruction (fast forward instruction) to the projected screen terminal 1. In response to the fast forward instruction, the projected screen terminal 1 fast-forwards the first media content. The interface 400 of the projected screen terminal 1 shows that the playback progress of the first media content is fast-forwarded from 1:00 to 1:05. The projected screen terminal 2 receives a click operation from user B on the projection control interface of the projected screen terminal 2 at time T1+1. In response to the click operation, the projected screen terminal 1 sends a projection control instruction (fast rewind instruction) to the projected screen terminal 1. The projected screen terminal 1 does not respond to the fast forward instruction. The interface 401 of the projected screen terminal 1 shows that the first media content continues to be played.

[0066] like Figure 2 As shown, the projection end (for example, projection end 1, projection end 2) and the projection end 1 in the above system architecture can be an electronic device 200, and the electronic device 200 can include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a sensor module 280, a display 290, etc.

[0067] Among them, the above-mentioned sensor module 280 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.

[0068] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 200. In other embodiments, the electronic device 200 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.

[0069] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, 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.

[0070] The controller may be the nerve center and command center of the electronic device 200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

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

[0072] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0073] It is understood that the interface connection relationship between the modules illustrated in this embodiment is merely an illustrative illustration and does not limit the structure of the electronic device 200. In other embodiments, the electronic device 200 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0074] The charging management module 240 is configured to receive charging input from a charger.

[0075] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, etc.

[0076] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network.

[0077] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 200. The mobile communication module 250 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.

[0078] The wireless communication module 260 can provide wireless communication solutions for the electronic device 200, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 260 can be one or more devices that integrate at least one communication processing module.

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

[0080] The display 290 is used to display images, videos, etc. The display 290 includes a display panel.

[0081] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 via the external memory interface 220 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0082] The internal memory 221 can be used to store computer executable program code, which includes instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. For example, in an embodiment of the present application, the processor 210 can execute instructions stored in the internal memory 221, and the internal memory 221 can include a program storage area and a data storage area.

[0083] The electronic device 200 can implement audio functions such as music playing and recording through the audio module 270 .

[0084] The audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 270 can also be used to encode and decode audio signals.

[0085] The software system of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. TM Taking the system as an example, the software structure of the electronic device is illustrated.

[0086] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through interfaces. In some embodiments, Android TM The system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime and system library, and kernel layer.

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

[0088] like Figure 3A As shown, the application package may include applications such as mail, camera, calendar, call, map, navigation, WLAN, music, video, short message and screen projection.

[0089] 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.

[0090] The application framework layer may include an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, a control service, an audio service, etc., and the embodiments of the present application do not impose any restrictions on this.

[0091] The Activity Manager manages the lifecycle of each application. Applications typically run as activities in the operating system. Each activity has a corresponding application record (ActivityRecord) in the Activity Manager. This ActivityRecord records the state of the application's activity. The Activity Manager uses this ActivityRecord as an identifier to schedule the application's activity process.

[0092] Window Manager Service: It is used to manage the graphical user interface (GUI) resources used on the screen. Specifically, it can be used to obtain the screen size, create and destroy windows, show and hide windows, layout windows, manage focus, and manage input methods and wallpapers.

[0093] The system libraries and kernel layers below the application framework layer are referred to as the underlying system. The underlying system includes an underlying display system for providing display services. For example, the underlying display system includes a display driver in the kernel layer and a surface manager in the system library.

[0094] The Android runtime consists of core libraries and a virtual machine (VM). The Android runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one for Java-based functions and the other for the Android core library. The application layer and application framework layer run in the VM. The VM executes Java files from the application layer and application framework layer as binary files. The VM is responsible for performing functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0095] The system library can include multiple functional modules, such as surface manager, media libraries, OpenGL ES, SGL, etc.

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

[0097] 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.

[0098] OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0099] SGL is a graphics engine for 2D graphics.

[0100] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0101] The following describes the interaction between devices and the interaction between internal modules of the devices involved in the screen projection method provided in the embodiment of the present application. Figure 3B As shown, the application layer of TV 1 (i.e., the first electronic device) includes a screen casting application (screen casting APP). The application framework layer of TV 1 may include control services, audio services, and screen casting services. The kernel layer of TV 1 may include audio drivers and display drivers. The hardware layer of TV 1 may include speakers (there may be multiple speakers, for example, 1-N) and a display.

[0102] The application layer of mobile phone 1 (i.e., the second electronic device) includes a video application (video app). The application framework layer of mobile phone 1 may include display services and screen projection services, etc. The kernel layer of mobile phone 1 may include a display driver. The hardware layer of mobile phone 1 may include a display.

[0103] The application layer of mobile phone 2 (i.e., the third electronic device) includes a music application (Music APP). The application framework layer of mobile phone 2 may include display services and screen projection services. The kernel layer of mobile phone 2 may include a display driver. The hardware layer of mobile phone 2 may include a display.

[0104] The screen casting app on TV 1 may include a network communication module, as may the video app on mobile phone 1 and the music app on mobile phone 2. The screen casting app on TV 1 and the video app on mobile phone 1 can exchange information via the network communication module. The screen casting app on TV 1 and the music app on mobile phone 2 can also exchange information via the network communication module.

[0105] like Figure 3B As shown, the video app on mobile phone 1 triggers the screen casting service during media content playback. Mobile phone 1 calls the network communication module to establish a screen casting connection with TV 1, and then calls the screen casting service to send a screen casting request to the screen casting application on TV 1. The screen casting application on TV 1 triggers the control service of TV 1, and the control service of TV 1 determines whether to approve the screen casting based on the screen casting control rules.

[0106] When the control service of TV 1 determines that it agrees with mobile phone 1 to cast the screen to TV 1, the control service of TV 1 sends a consent message to the screen casting application of TV 1. After receiving the consent message, the screen casting application of TV 1 sends a consent message to the video APP of mobile phone 1 through the network communication module of the screen casting application. At the same time, the screen casting application of TV 1 can obtain the media content from the corresponding server according to the URI in the screen casting request, and send the media content to the display service of TV 1. The display service of TV 1 can call the display driver of TV 1, and the display driver of TV 1 drives the display to respond to the screen casting request to play the above video media content.

[0107] When the control service of TV 1 determines that mobile phone 1 is rejected from casting the screen to TV 1, the control service of TV 1 sends a rejection message to the screen casting application of TV 1. After receiving the rejection message, the screen casting application of TV 1 sends a rejection message to the video app of mobile phone 1 through the network communication module of the screen casting application. After receiving the rejection message, the video app of mobile phone 1 sends the rejection message to the display service of mobile phone 1. Mobile phone 1 can call the display driver of mobile phone 1, and the display driver of mobile phone 1 drives the display to display a rejection prompt character in response to the rejection message.

[0108] When the music app on phone 2 is playing media content, it triggers the screen casting service. Phone 2 then calls the network communication module to establish a screen casting connection with TV 1. It then calls the screen casting service to send a screen casting request to the screen casting app on TV 1. The screen casting app on TV 1 triggers the control service on TV 1, which then determines whether to approve the screen casting based on the screen casting control rules.

[0109] If the control service of TV 1 determines that mobile phone 2 is rejected from casting the screen to TV 1, the control service of TV 1 sends a rejection message to the screen casting application of TV 1. After receiving the rejection message, the screen casting application of TV 1 sends a rejection message to the music app of mobile phone 2 through the network communication module of the screen casting application. After receiving the rejection message, the music app of mobile phone 2 sends the rejection message to the display service of mobile phone 2. Mobile phone 2 can call the display driver of mobile phone 2, and the display driver of mobile phone 2 drives the display to display a rejection prompt character in response to the rejection message.

[0110] When the video app on phone 1 triggers the screen casting service during media playback, phone 1 calls the network communication module to establish a screen casting connection with TV 1. Then, the screen casting service is called to send a screen casting control request to the screen casting app on TV 1. The screen casting app on TV 1 triggers the control service on TV 1 to determine whether to execute the screen casting control request.

[0111] When the control service of TV 1 determines that it agrees to execute the screen casting control request sent by mobile phone 1 to TV 1, the control service of TV 1 can send a consent message to the screen casting application of TV 1. After receiving the consent message, the screen casting application of TV 1 can instruct the video APP of mobile phone 1 through the network communication module to TV 1 to accept the screen casting control of TV 1 by mobile phone 1. At the same time, the screen casting application of TV 1 can send the screen casting control request to the display service of TV 1, and the display service of TV 1 can call the display driver of TV 1, and the display driver of TV 1 will drive the display to respond to the screen casting control request to control the playback of the above-mentioned video media content.

[0112] When the music app on phone 2 is playing media content, it triggers the screen casting service. Phone 2 then calls the network communication module to establish a screen casting connection with TV 1. It then calls the screen casting service to send a screen casting control request to the screen casting app on TV 1. The screen casting app on TV 1 triggers the control service on TV 1. Based on the screen casting control rules, the control service on TV 1 determines whether to approve the screen casting control request.

[0113] If the control service of TV 1 determines that it refuses to execute the screen casting control request sent by mobile phone 2 to TV 1, the control service of TV 1 can send a rejection message to the screen casting application of TV 1. After receiving the rejection message, the screen casting application of TV 1 can instruct TV 1 to refuse mobile phone 2's screen casting control to the music app of mobile phone 2 through the network communication module. At the same time, the screen casting application of TV 1 does not execute the screen casting control request.

[0114] For ease of understanding, taking the projection end 1 as mobile phone 1, the projection end 2 as mobile phone 2, the projected end 1 as TV 1, and mobile phone 1, mobile phone 2 and TV 1 being in the same wireless Wi-Fi network as an example, the method provided in the embodiment of the present application is specifically introduced in combination with the accompanying drawings.

[0115] like Figure 4 As shown, the main interface (i.e., desktop) 401 of the mobile phone 1 includes an icon 402 of a video application. The mobile phone 1 can receive a click operation of the user A on the icon 402 of the video application. In response to the click operation, the mobile phone 1 can display the following information: Figure 5 The interface 403 shown in FIG. 403 may include a display window 404 for video 1. The interface 403 may also include display windows for other videos, such as display windows for video 2 and video 3. In response to user A's operation on the display window 404 for video 1, as shown in FIG. Figure 6 As shown, mobile phone 1 can display interface 405, which includes a display window of the enlarged video 1, and the upper right corner of the display window of the enlarged video 1 can include a screen casting option 406. In response to user A selecting the screen casting option 406 in interface 405, as shown in FIG. Figure 7 As shown, mobile phone 1 can display interface 407, which may include multiple logos of the screen-projected terminals 1, for example, it may include TV 1 logo 408, TV 2 logo and the Kiwi TV logo in the living room. User A can manually trigger TV 1 logo 408 in interface 407 to project the screen. In response to user A selecting TV 1 logo 408 in interface 407, mobile phone 1 can send a screen projection instruction to TV 1, and TV 1 responds to the screen projection instruction of mobile phone 1. TV 1 establishes a screen projection connection with mobile phone 1 and replies to mobile phone A with a message of agreeing to the screen projection, as shown in FIG. Figure 8 As shown, an interface 409 of video 1 is displayed on TV 1.

[0116] Further, such as Figure 9 As shown, in response to the user selecting the TV 1 logo 408, the mobile phone 1 can display a video projection control interface 410. The video projection control interface 410 may include multiple projection setting options, for example, it may include a fast forward option 411, a device change option, a collection selection option, a sound amplification option, a sound reduction option, a fast rewind and a play / pause option.

[0117] At this time, user B also tries to cast the content on mobile phone 2 to TV 1. Then, mobile phone 2 receives the unlocking operation of user 2, such as Figure 10 As shown, mobile phone 2 can display a main interface (i.e., desktop) 1001, which includes an icon 1002 of a music application. Mobile phone 2 can receive a click operation of user B on the icon 1002 of the music application, and respond to the click operation, such as Figure 11 As shown, mobile phone 2 can display interface 1003, which can include extended function button 1004. In response to user A's operation on extended function button 1004 on interface 1003, as shown in FIG. Figure 12As shown in (a) of FIG, mobile phone 2 may display interface 1005, which may include setting options 1006. In response to user B clicking the setting option button in interface 1005, as shown in FIG. Figure 12 As shown in (b) of FIG, mobile phone 2 may display interface 1007. In interface 1007, the option 1008 for connecting to DLNA device is not enabled may be displayed. In response to user B clicking the option 1008 for connecting to DLNA device is not enabled in interface 1007, as shown in FIG. Figure 12 As shown in (c) of FIG, mobile phone 2 may display interface 1009. Interface 1009 may include a connect DLNA device option 1010. In response to user B turning on the connect DLNA device option 1010, mobile phone 2 adds a "Select DLNA device" option 1011 to interface 1009. The "Select DLNA device" option 1011 is used to prompt user B to view the current DLNA device by clicking the "Select DLNA device" option 1011. In response to user B clicking the "Select DLNA device 1011" option on interface 1009, as shown in FIG. Figure 12 As shown in (d) in the figure, mobile phone 2 can display the interface 1012 of the current song (song 1). The interface 1012 may include a pop-up box, which displays selectable DLNA devices, for example, it may include a local option, a TV 1 option 1013, a TV 2 option, and a Kiwi TV option for the living room. User B can manually trigger the TV 1 option 1013 in the interface 1012 to cast the screen. In response to user B selecting the TV 1 option 1013 in the interface 1012, mobile phone 2 sends a screen casting request to TV 1. When TV 1 receives the screen casting request sent by mobile phone 2, it determines to reject the screen casting of mobile phone 2 based on the screen casting rules, and sends a rejection message to mobile phone 2, as shown in FIG. Figure 13 As shown, mobile phone 2 displays the prompt character 1014 of "screen casting failed" in response to the rejection message of the first screen casting TV.

[0118] At this time, if Figure 14 As shown, the prompt "Mobile phone 2 attempted to preempt the first cast TV. Based on the cast rules, mobile phone 2's screen capture was rejected" is displayed in the upper right corner of the first cast TV. Optionally, the prompt "Casting failed" on mobile phone 2 and the prompt "Mobile phone 2 attempted to preempt the first cast TV. Based on the cast rules, mobile phone 2's screen capture was rejected" on TV 1 can remain for 1 to 2 seconds before automatically disappearing to avoid blocking the user's view.

[0119] Furthermore, after the prompt character 1014 disappears, as shown in FIG. Figure 15 As shown, the mobile phone 2 is in the music screen projection control interface 1015. The music screen projection control interface 1015 may include multiple screen projection setting options, such as a fast forward option 1016, a fast rewind option, and a play / pause option.

[0120] During the screen casting and playback of Video 1, Figure 16 As shown in (a) of FIG, mobile phone 1 can receive user A's click operation on the fast forward option 411 of the video screen casting control interface 410. In response to the click operation, mobile phone 1 sends a fast forward instruction to the first screen casting TV. After the first screen casting TV receives the fast forward instruction from mobile phone 1, Figure 16 As shown in (b), the first cast TV fast-forwards the playback progress of the currently playing video 1 from 1:00 to 1:05.

[0121] At the same time, if Figure 17 As shown in (a) of FIG, mobile phone 2 can receive user B's click operation on the fast forward option 1016 of the music screen casting control interface 1015. In response to the click operation, mobile phone 2 sends a fast forward instruction to the first screen casting TV. After receiving the fast forward instruction from mobile phone 2, the first screen casting TV determines that mobile phone 2 is not the screen casting phone of video 1, such as Figure 17 As shown in (b), the first cast TV does not execute the fast-forward command, and the playback progress of the currently playing video 1 is still at 1:05.

[0122] The following describes the process of the screen projection method provided in the embodiment of the present application. The method provided in the embodiment of the present application may include the following processes: (1) obtaining the device information of the current screen projection end; (2) determining whether the received screen projection control request has control authority; (3) determining whether to execute the screen projection control request based on the control authority of the screen projection control request.

[0123] The following describes process (1) (obtaining the device information of the current projection end).

[0124] First, the screen-casting end can establish a screen-casting channel with the screen-targeted end based on the screen-casting protocol. The screen-casting end can be a mobile phone, PC, tablet, etc. The screen-targeted end can be a smart TV, etc.

[0125] The screen projection terminal contains multiple applications. Some of the multiple applications (for example, video apps, music apps, and photo apps, etc.) have screen projection functions. When a user triggers the screen projection function of an application in the screen projection terminal, the application in the screen projection terminal first detects the current screen projection device. Among them, the current screen projection device includes one or more.

[0126] Among the detected devices capable of screen casting, the user triggers a projected terminal, which receives a projection request. Since the projected terminal is not currently in the projection state and the projection request from the projection terminal complies with the projection rules, the projected terminal agrees to the projection request from the projection terminal. The projected terminal sends a consent message to the projection terminal, projects the media content corresponding to the projection terminal's application, obtains the projection terminal's device information contained in the projection request, and stores the projection terminal's device information in the projection application on the projected terminal.

[0127] The projecting end sends the SetAVTransportURI instruction to the projected end, and the projected end obtains the projection request from the SetAVTransportURI instruction. After obtaining the projection request, the projection application on the projected end obtains the address of the media content currently selected for playback by the projecting end and the device information of the projecting end. The projection application on the projected end obtains the media content based on the address of the media content, and after obtaining the media content, it can play the media content on the display. The device information of the projecting end can be the IP address of the projecting end. The projection application on the projected end saves the MAC address corresponding to the IP address based on the IP address, and the projected end subsequently determines whether to execute the projection control request based on the MAC address.

[0128] The following describes process (2) (determining whether the received screen projection control request has control authority).

[0129] During the screen projection and playback of media content on the projected end, a screen projection control request from the user may be received. Some of the screen projection control requests from the user are instructions issued by the projecting end with control authority, and some are instructions issued by the projecting end without control authority. Among them, the projecting end with control authority is the device that projects media content on the projected end. The projecting end without control authority is the device that is not currently projecting media content on the projected end.

[0130] Therefore, the projected end determines the control authority of the projecting end and whether to execute the received projecting control request based on the information contained in the projecting control request. The projected end determines the control authority of the projecting end by comparing the device information of the projecting end contained in the projecting control request with the device information stored in the projecting application on the projected end.

[0131] For example, the IP address / MAC address of the projection terminal included in the projection control request is compared with the IP address / MAC address of the projection terminal stored in the projection application of the projection terminal. If the comparison results are consistent, it is determined that the projection terminal has control authority, and the control corresponding to the projection control request is executed; if the comparison results are inconsistent, it is determined that the projection terminal does not have control authority, and the control corresponding to the projection control request is not executed.

[0132] The following describes process (3) (determining whether to execute the screen projection control request based on the control authority of the screen projection control request).

[0133] Combined with the control authority determination result of the screen projection control request in process (2), when the screen projection control request has control authority, the screen projection end sends a consent message to the end that issues the screen projection control request. At the same time, the screen projection application on the screen projection end executes the screen projection control request and adjusts the playback of the screen projection media content. When the screen projection control request does not have control authority, the screen projection end sends a rejection message to the end that issues the screen projection control request, and the screen projection application on the screen projection end does not execute the screen projection control request.

[0134] In one possible design, when the projection media content on the projection end ends, the projection application on the projection end automatically deletes the device information of the projection end.

[0135] In one embodiment, the implementation process of the screen projection method is as follows: Figure 18 Shown, including:

[0136] S1801. The projection terminal 1 sends a first projection request (i.e., a first instruction) to the projection terminal 1.

[0137] The first screen projection request includes the address of the first media content and the device information of the screen projection terminal 1. The first media content is the media content that the user attempts to project. The device information of the screen projection terminal 1 includes the IP address or MAC address.

[0138] S1802. The projected end 1 responds to the first projection request and sends a projection consent message (i.e., the seventh instruction) to the projection end 1, finds the first media content based on the address of the first media content, and projects and plays the first media content.

[0139] The consent message can be a network status code starting with 2 (for example, 200). At the same time, the projection request of projection terminal 1 usually carries the IP address of projection terminal 1. The projection terminal 1 can obtain the MAC address of projection terminal 1 based on the mapping relationship between IP address and MAC address, and record the IP address or MAC address of projection terminal 1.

[0140] S1803. The projection terminal 2 sends a second projection request (i.e., a second instruction) to the projection terminal 1.

[0141] Among them, the second screen projection request includes the address of the second media content and the device information of the screen projection terminal 2.

[0142] S1804. The projected terminal 1 determines whether to accept the projection request from the projecting terminal 2 based on the projection rules.

[0143] The screen projection rules specifically include the following rules:

[0144] Rule 1: If the projected terminal 1 finds that the projected terminal 2 is not on the projection whitelist, the projected terminal 1 will reject the projection from the projected terminal 2.

[0145] Rule 2: If the projected terminal 1 finds that the projected terminal 2 is on the projection whitelist, the projected terminal 1 agrees to project the screen to the projected terminal 2.

[0146] Rule 3: If the projected terminal 1 finds that the projected terminal 2 is not on the projected whitelist, and the projected terminal 2 triggers the projected operation multiple times, the projected terminal 2 will be directly added to the projected blacklist. The projected terminal 2 added to the projected blacklist will not be able to successfully project the screen for a period of time in the future.

[0147] Rule 4: If the currently projected terminal 1 is not projecting, and the projecting terminal 2 is projecting for the first time, the query function is triggered by the projected terminal 1, and based on the query result, it is determined whether to add the projecting terminal 2 to the projection whitelist. The execution process of the query function is as follows: the interface of the projected terminal 1 displays a query instruction, which is "Do you trust the projecting terminal 2?" The user enters a yes or no option based on the query instruction displayed on the interface of the projected terminal 1. The projected terminal 1 then confirms whether to store the projecting terminal 2 in the projection whitelist based on the option entered by the user.

[0148] According to the actual situation, determine which of the above-mentioned screen projection rules the current screen projection preemption belongs to, and determine whether to receive the screen projection request from the screen projection terminal 2 based on the judgment result.

[0149] S1805. After the projected screen terminal 1 determines to reject the screen projection request of the projecting screen terminal 2, it sends a screen projection rejection message (i.e., the third instruction) to the projecting screen terminal 2.

[0150] In combination with the above-mentioned screen casting rules, the projected terminal 1 rejects the screen casting request of the projecting terminal 2 and sends a rejection network status code to the projecting terminal 2. Exemplarily, the message of rejecting the screen casting is a network status code starting with 4 (for example, 401).

[0151] S1806. The projected screen terminal 1 receives the first screen projection control request (i.e., the sixth instruction) from the projecting screen terminal 1.

[0152] Among them, the first screen projection control request includes the device information of the screen projection terminal 1.

[0153] Exemplarily, the first screen projection control request may be any one of a pause instruction, a play instruction, a fast forward instruction, a fast rewind instruction, a speed-up instruction, or an instruction to close the screen projection media content.

[0154] S1807. Determine whether the device information of the screen projection terminal 1 carried in the first screen projection control request is consistent with the device information of the screen projection terminal 1 carried in the first screen projection request.

[0155] S1808. When the projected screen end 1 determines that the device information of the projecting screen end 1 carried in the first projecting screen control request is consistent with the device information of the projecting screen end 1 carried in the first projecting screen request, the projected screen end 1 sends an approval message (i.e., the tenth instruction) to the projecting screen end 1, and at the same time, the projected screen end 1 responds to the first projecting screen control request and adjusts the playback of the first media content.

[0156] S1809. The projected screen terminal 1 receives the second projection control request (ie, the fourth instruction) from the projection screen terminal 2.

[0157] Among them, the second screen projection control request includes the device information of the screen projection end 2.

[0158] Exemplarily, the second screen projection control request may be any one of a pause instruction, a play instruction, a fast forward instruction, a fast rewind instruction, a speed-up instruction, or an instruction to close the screen projection media content.

[0159] S1810. Determine whether the device information of the projection terminal 2 carried in the second projection control request is consistent with the device information of the projection terminal 1 carried in the first projection request.

[0160] S1811. When the projected screen end 1 determines that the device information of the projecting screen end 2 is inconsistent with the device information of the projecting screen end 1, the projected screen end 1 instructs the projecting screen end 2 to send a rejection message (i.e., the fifth instruction), and the projected screen end 1 does not respond to the second projection control request.

[0161] The rejection message may be a network status code starting with 4, or a network status code starting with . Exemplarily, the rejection message is a network status code starting with 5 (eg, 500).

[0162] In another embodiment, taking screen projection as an example, the implementation process of the screen projection method is as follows: Figure 19 Shown, including:

[0163] S1901. Projecting terminal 1 sends a first projection request to projected terminal 1.

[0164] S1902. The projected terminal 1 responds to the first projection request, sends a projection consent message to the projection terminal 1, finds the first media content based on the address of the first media content, and projects the first media content for playback.

[0165] S1903: The projection terminal 2 sends a second projection request to the projection terminal 1.

[0166] S1904. The projected terminal 1 determines whether to accept the second projection request of the projection terminal 2 based on the projection rules.

[0167] S1905. After the projected end 1 determines to accept the second projection request of the projection end 2, it sends an approval message to the projection end 2, disconnects the projection playback of the first media content, and finds the second media content based on the address of the second media content, and projects the second media content for playback.

[0168] Among them, the second media content is the media content projected in the second projection segment.

[0169] S1906. The projected terminal 1 receives the first projection control request from the projection terminal 1.

[0170] S1907. Determine whether the device information of the projection terminal 1 carried in the first projection control request is consistent with the device information of the projection terminal 2 carried in the second projection request.

[0171] S1908. When the projected terminal 1 determines that the device information of the projecting terminal 1 is inconsistent with the device information of the projecting terminal 2, the projected terminal 1 instructs the projected terminal 1 to send a rejection message to the projecting terminal 1, and the projected terminal 1 does not respond to the first projection control request.

[0172] S1909. The projected screen terminal 1 receives a second screen projection control request from the projecting screen terminal 2.

[0173] S1910. Determine whether the device information of the projection terminal 2 carried in the second projection control request is consistent with the device information of the projection terminal 2 carried in the second projection request.

[0174] S1911. When the projected screen end 1 determines that the device information of the projecting screen end 2 carried in the second projecting screen control request is consistent with the device information of the projecting screen end 2 carried in the second projecting screen request, the projected screen end 1 instructs the projecting screen end 2 to send a consent message, and at the same time, the projected screen end 1 responds to the second projecting screen control request and adjusts the playback of the current media content.

[0175] It should be noted that Figure 19 The screen projection end 1 in the embodiment can be the mobile phone 1 in the aforementioned embodiment, the second electronic device can be the mobile phone 2 in the aforementioned embodiment, etc., and the third electronic device can be the first screen projection TV in the aforementioned embodiment, etc. Figure 19 For the parts not described in detail in the embodiments, please refer to the aforementioned embodiments and will not be described in detail here.

[0176] Some other embodiments of the present application provide an electronic device (such as Figure 2 The electronic device 200 shown in FIG. 2 may include a communication module, a memory, and one or more processors. The communication module and the memory are coupled to the processors. The memory is configured to store computer program code, which includes computer instructions.

[0177] Another embodiment of the present application provides a chip system, such as Figure 20 As shown, the chip system includes at least one processor 2001 and at least one interface circuit 2002. Processor 2001 and interface circuit 2002 can be interconnected via a line. For example, interface circuit 2002 can be used to receive signals from other devices. For another example, interface circuit 2002 can be used to send signals to other devices (such as processor 2001).

[0178] For example, the interface circuit 2002 can read the instructions stored in the memory of the device and send the instructions to the processor 1101. When the instructions are executed by the processor 2001, the electronic device (such as Figure 2 The electronic device 200 shown in FIG. 10 executes each step in the above embodiment. Of course, the chip system may also include other discrete devices, which are not specifically limited in the embodiment of the present application.

[0179] The embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed in an electronic device (such as Figure 2 When the method is executed on the electronic device 200 shown in the figure, the electronic device 200 executes the various functions or steps executed by the electronic device (for example, a mobile phone) in the above method embodiment.

[0180] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the various functions or steps performed by the first electronic device (for example, a mobile phone) or the second electronic device (for example, a smart watch) or the third electronic device (for example, a speaker or a television) in the above method embodiment.

[0181] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0182] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0183] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0184] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0185] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0186] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A screen projection method, applied to a first electronic device, characterized in that: include: Receive a first instruction from a second electronic device, where the first instruction includes device information of the second electronic device and an address of the first media content, and the first instruction is used to indicate that the second electronic device requests to cast the first media content on the first electronic device; Acquire the first media content according to the address of the first media content, and play the first media content; Receive a second instruction from a third electronic device, where the second instruction includes an address of second media content, and the second instruction is used to indicate that the third electronic device requests to cast the second media content on the first electronic device; Sending a third instruction to the third electronic device, where the third instruction is used to indicate that the first electronic device refuses the third electronic device to cast the second media content on the first electronic device for playback; receiving a fourth instruction from a third electronic device, the fourth instruction including device information of the third electronic device, the fourth instruction being used to indicate that the third electronic device requests to control the first media content played on the first electronic device; comparing the device information of the third electronic device with the device information of the second electronic device, where the device information of the third electronic device is different from the device information of the second electronic device; Sending a fifth instruction to the third electronic device, where the fifth instruction is used to indicate that the first electronic device refuses the third electronic device to control the first media content played on the first electronic device; Continue playing the first media content.

2. The method according to claim 1, characterized in that The method further comprises: When the playing of the first media content is terminated, the device information of the second electronic device is deleted.

3. The method according to claim 1, characterized in that The method further comprises: receiving a sixth instruction from the second electronic device, the sixth instruction including device information of the second electronic device, and indicating that the second electronic device requests to control the first media content played on the first electronic device; comparing the device information of the second electronic device in the sixth instruction with the device information of the second electronic device in the first instruction, where the device information of the second electronic device in the sixth instruction is the same as that of the second electronic device in the first instruction; The second electronic device controls the first media content.

4. The method according to any one of claims 1 to 3, characterized in that Before acquiring the first media content according to the address of the first media content, the method further includes: A seventh instruction is sent to the second electronic device; the seventh instruction is used to indicate that the first electronic device agrees that the second electronic device will cast the first media content on the first electronic device for playback.

5. The method according to claim 4, characterized in that Before sending the seventh instruction to the second electronic device, the method further includes: Determine that the screen projection whitelist includes device information of the second electronic device, and the screen projection whitelist includes device information of devices trusted by the user.

6. The method according to any one of claims 1 to 3, characterized in that Before sending the third instruction to the third electronic device, the method further includes: It is determined that neither the screen projection whitelist nor the screen projection blacklist includes the device information of the third electronic device, and the screen projection blacklist includes the device information of malicious devices. The malicious devices include devices whose number of triggered eighth instructions exceeds a preset threshold within a preset time period. The eighth instruction is a request by the electronic device to project the screen and play media content on the first electronic device.

7. The method according to any one of claims 1 to 3, characterized in that After receiving the second instruction from the third electronic device, the method further includes: Determine that the screen projection blacklist includes device information of the third electronic device; A ninth instruction is sent to the third electronic device, where the ninth instruction is used to indicate that the first electronic device refuses the third electronic device from casting the second media content on the first electronic device for playback within a preset time period.

8. The method according to any one of claims 1 to 3, characterized in that The fifth instruction is a network status code starting with 5.

9. The method according to claim 3, characterized in that The fourth instruction or the sixth instruction is any one of a pause instruction, a play instruction, a fast forward instruction, a fast rewind instruction, a double speed instruction or a close instruction.

10. A screen projection method, applied to a second electronic device, characterized in that: include: Sending a first instruction to the first electronic device, where the first instruction includes device information of the second electronic device and an address of the first media content, and the first instruction is used to indicate that the second electronic device requests to cast the first media content on the first electronic device; receiving a seventh instruction from the first electronic device, wherein the seventh instruction is used to indicate that the first electronic device agrees that the second electronic device can cast the first media content on the first electronic device for playback; Sending a sixth instruction to the first electronic device, where the sixth instruction includes device information of the second electronic device, and the sixth instruction is used to indicate that the second electronic device requests to control the first media content played on the first electronic device; receiving a tenth instruction from the first electronic device, the tenth instruction being used to indicate that the first electronic device agrees that the second electronic device controls the first media content played on the first electronic device; The tenth instruction is an instruction sent by the first electronic device when it determines that the device information in the sixth instruction is consistent with the device information in the first instruction.

11. A screen projection method, applied to a third electronic device, characterized in that: include: Sending a second instruction to the first electronic device, where the second instruction includes device information of the third electronic device and an address of the second media content, and the second instruction is used to indicate that the third electronic device requests to cast the second media content on the first electronic device; receiving a third instruction from the first electronic device, wherein the third instruction is used to indicate that the first electronic device refuses the third electronic device to cast the second media content on the first electronic device for playback; Sending a fourth instruction to the first electronic device, the fourth instruction including device information of the third electronic device, the fourth instruction being used to indicate that the third electronic device requests control of first media content played on the first electronic device; the first media content is media content that the second electronic device requests to be cast and played on the first electronic device through the first instruction, and the first instruction including the device information of the second electronic device and the address of the first media content; A fifth instruction is received from the first electronic device, where the fifth instruction is used to indicate that the first electronic device refuses the third electronic device to control the first media content played on the first electronic device; the fifth instruction is an instruction sent by the first electronic device when it is determined that the device information in the fourth instruction is inconsistent with the device information in the first instruction.

12. A screen projection system, characterized in that: include: A first electronic device, a second electronic device, and a third electronic device; the first electronic device, the second electronic device, and the third electronic device are in the same local area network; The second electronic device sends a first instruction to the first electronic device, where the first instruction includes device information of the second electronic device and an address of the first media content, and the first instruction is used to indicate that the second electronic device requests the first electronic device to cast the first media content on the first electronic device; In response to the first instruction, the first electronic device sends a seventh instruction to the second electronic device, obtains the first media content according to the address of the first media content, and plays the first media content, wherein the seventh instruction is used to indicate that the first electronic device agrees that the second electronic device can cast the first media content on the first electronic device for playback; The third electronic device sends a second instruction to the first electronic device, where the second instruction includes device information of the third electronic device and an address of the second media content, and the second instruction is used to indicate that the third electronic device requests the first electronic device to cast the second media content for playback; In response to the second instruction, the first electronic device sends a third instruction to the third electronic device, where the third instruction indicates that the first electronic device refuses the third electronic device to cast the second media content on the first electronic device for playback; The second electronic device sends a sixth instruction to the first electronic device, where the sixth instruction includes device information of the second electronic device, and the sixth instruction is used to indicate that the second electronic device requests to control the first media content played on the first electronic device; In response to the sixth instruction, the first electronic device compares the device information of the second electronic device in the sixth instruction with the device information of the second electronic device in the first instruction, where the device information of the second electronic device in the sixth instruction is the same as the device information of the second electronic device in the first instruction; The first electronic device sends a tenth instruction to the second electronic device, where the tenth instruction is used to indicate that the first electronic device agrees that the second electronic device controls the first media content played on the first electronic device; The first electronic device controls the first media content by the second electronic device; The third electronic device sends a fourth instruction to the first electronic device, where the fourth instruction includes device information of the third electronic device and is used to indicate that the third electronic device requests to control the first media content played on the first electronic device; In response to the fourth instruction, the first electronic device compares the device information of the third electronic device in the fourth instruction with the device information of the second electronic device in the first instruction, where the device information of the third electronic device in the fourth instruction is different from the device information of the second electronic device in the first instruction; The first electronic device sends a fifth instruction to the second electronic device, where the fifth instruction is used to indicate that the first electronic device refuses the third electronic device to control the first media content played on the first electronic device; The first electronic device continues to play the first media content.

13. An electronic device, characterized in that: The electronic device comprises: a wireless communication module, a memory and one or more processors; the wireless communication module, the memory and the processor are coupled; Wherein, the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes the screen projection method as described in any one of claims 1-11.

14. A computer-readable storage medium, characterized in that including computer instructions; When the computer instructions are executed on an electronic device, the electronic device executes the screen projection method as described in any one of claims 1 to 11.

15. A computer program product, characterized in that When the computer program product runs on a computer, the computer executes the screen projection method as described in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method for managing and controlling DLNA screen projection authority on Android smart TV

    CN109451345A

  • Screen projection control method, device and system

    CN110505516A

  • Communication system and method for communication between electronic equipment and electronic equipment

    CN112448762A