CN115794274A - Screen projection method and device, electronic equipment and medium - Google Patents

Screen projection method and device, electronic equipment and medium Download PDF

Info

Publication number
CN115794274A
CN115794274A CN202211369181.6A CN202211369181A CN115794274A CN 115794274 A CN115794274 A CN 115794274A CN 202211369181 A CN202211369181 A CN 202211369181A CN 115794274 A CN115794274 A CN 115794274A
Authority
CN
China
Prior art keywords
coordinate information
screen projection
interactive interface
size
coordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211369181.6A
Other languages
Chinese (zh)
Inventor
黎旋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202211369181.6A priority Critical patent/CN115794274A/en
Publication of CN115794274A publication Critical patent/CN115794274A/en
Pending legal-status Critical Current

Links

Images

Abstract

The present disclosure provides a screen projection method, device, electronic device and medium, which relate to the technical field of screen projection and include: acquiring a first event triggered by a user at a first position of screen projection equipment; determining second coordinate information of the first position on a first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment, wherein the first interactive interface corresponds to the first source end equipment; acquiring second coordinate information which is mapped to corresponding third coordinate information on the first source end equipment on the basis of the second coordinate information of the first position on the first interactive interface where the first position is located; responding to the first event based on the third coordinate information. By adopting the scheme, an instruction for triggering the first event does not need to be input on the first source end equipment, so that the user operation is facilitated, and the user experience is improved.

Description

Screen projection method and device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of screen projection technologies, and in particular, to a screen projection method and apparatus, an electronic device, and a medium.
Background
With the rapid development of science and technology, through a multi-screen interaction technology such as screen projection, the content of one or more source devices is projected on another display device, so that a user can watch the content conveniently.
In the prior art, a user views the content of the screen projection on the display device during the screen projection process, and when the user needs to control the display content, the user inputs and responds to a control event on the source device, that is, the display device is only used for displaying the content of the source device, but the control on the content is still performed on the source device.
Therefore, with the prior art, the user operation is inconvenient.
Disclosure of Invention
To solve the above technical problem or at least partially solve the above technical problem, the present disclosure provides a screen projection method, apparatus, electronic device, and medium.
In a first aspect, the present disclosure provides a screen projection method, including:
acquiring a first event triggered by a user at a first position of screen projection equipment;
determining second coordinate information of the first position on a first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment, wherein the first interactive interface corresponds to a first source end equipment;
acquiring second coordinate information of the first position on a first interactive interface where the first position is located, wherein the second coordinate information is mapped to corresponding third coordinate information on the first source end device;
responding to the first event based on the third coordinate information.
As an optional implementation manner of the embodiment of the present disclosure, the obtaining, based on second coordinate information of the first position on the first interactive interface where the first position is located, third coordinate information corresponding to the second coordinate information on the first source device includes:
acquiring second coordinate information of the first position on a first interactive interface where the first position is located, and mapping the second coordinate information to corresponding fourth coordinate information on the screen projection equipment;
and acquiring third coordinate information which is mapped to the first source end equipment by the fourth coordinate information based on the fourth coordinate information.
As an optional implementation manner of the embodiment of the present disclosure, the obtaining, based on second coordinate information of the first position on the first interactive interface where the first position is located, fourth coordinate information that is mapped to the screen projection device by the second coordinate information includes:
and acquiring the second coordinate information mapped to corresponding fourth coordinate information on the screen projection equipment based on the size of the first interactive interface and the size of the screen projection equipment.
As an optional implementation manner of the embodiment of the present disclosure, the obtaining, based on the size of the first interactive interface and the size of the screen projection device, the second coordinate information mapped to corresponding fourth coordinate information on the screen projection device includes:
acquiring the ratio of the size of a transverse axis of the screen projection equipment to the size of a transverse axis of the first interactive interface, and determining that the product of the ratio and the transverse axis in the second coordinate information is the coordinate value of the transverse axis of the fourth coordinate information;
and acquiring the ratio of the size of the longitudinal axis of the screen projection equipment to the size of the longitudinal axis of the first interactive interface, and determining that the product of the ratio and the longitudinal axis in the second coordinate information is the coordinate value of the longitudinal axis of the fourth coordinate information.
As an optional implementation manner of the embodiment of the present disclosure, the obtaining, based on second coordinate information of the first position on the first interactive interface where the first position is located, third coordinate information that is mapped to the first source device by the second coordinate information includes:
and acquiring the second coordinate information mapped to the corresponding third coordinate information on the first source end equipment based on the size of the first interactive interface and the size of the first source end equipment.
As an optional implementation manner of the embodiment of the present disclosure, the obtaining, based on the size of the first interactive interface and the size of the first source device, third coordinate information that is mapped to the first source device by the second coordinate information includes:
acquiring the ratio of the size of a cross axis of the first source end device to the size of a cross axis of the first interactive interface, and determining that the product of the ratio and the cross axis in the second coordinate information is the coordinate value of the cross axis of the third coordinate information;
and acquiring a ratio of the size of the longitudinal axis of the first source end device to the size of the longitudinal axis of the first interactive interface, and determining that a product of the ratio and the longitudinal axis in the second coordinate information is a longitudinal axis coordinate value of the third coordinate information.
As an optional implementation manner of the embodiment of the present disclosure, the determining, based on first coordinate information of the first location on the screen projection device, second coordinate information of the first location on a first interactive interface where the first location is located includes:
acquiring fifth coordinate information of the coordinate origin of the first interactive interface on the screen projection equipment;
subtracting the horizontal axis coordinate in the fifth coordinate information from the horizontal axis coordinate in the first coordinate information to obtain the horizontal axis coordinate in the second coordinate information;
and subtracting the longitudinal axis coordinate in the fifth coordinate information from the longitudinal axis coordinate in the first coordinate information to obtain the longitudinal axis coordinate in the second coordinate information.
As an optional implementation manner of this embodiment of the present disclosure, before responding to the first event based on the third coordinate information, the method further includes:
and sending the request message to the first source end device through a UIBC protocol of the TCP, where the request message carries the third coordinate information and the first event.
As an optional implementation manner of the embodiment of the present disclosure, before acquiring a first event triggered by a user at a first position of a screen projection device, the method further includes:
and based on the number of the source end devices, distributing an interactive interface corresponding to each source end device on the screen projection device.
As an optional implementation manner of the embodiment of the present disclosure, before determining, based on first coordinate information of the first location on the screen projection device, second coordinate information of the first location on a first interactive interface where the first location is located, the method further includes:
and determining a first interactive interface where the first position is located and a first source end device corresponding to the first interactive interface based on first coordinate information of the first position on the screen projection device.
As an optional implementation manner of the embodiment of the present disclosure, the method further includes:
receiving a screen projection request, wherein the screen projection request comprises the size of source end equipment;
and updating the interactive interfaces corresponding to the source end devices on the screen projection device based on the screen projection request, and updating the dot coordinates and the size information of the interactive interfaces.
As an optional implementation manner of the embodiment of the present disclosure, the method further includes:
receiving a screen projection exit request, updating interactive interfaces corresponding to source end equipment on the screen projection equipment based on the screen projection exit request, and updating dot coordinates and size information of the interactive interfaces.
In a second aspect, the present disclosure provides a screen projection apparatus, comprising:
the screen projection device comprises a first event acquisition module, a first event acquisition module and a second event acquisition module, wherein the first event acquisition module is used for acquiring a first event triggered by a user at a first position of the screen projection device;
the second coordinate information determining module is used for determining second coordinate information of the first position on a first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment, wherein the first interactive interface corresponds to a first source end equipment;
a third coordinate information obtaining module, configured to obtain, based on second coordinate information of the first location on a first interactive interface where the first location is located, that the second coordinate information is mapped to corresponding third coordinate information on the first source device;
and the first event response module is used for responding to the first event based on the third coordinate information.
In a third aspect, the present disclosure provides an electronic device comprising: one or more processors; a memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; wherein the one or more processors, when executing the one or more computer programs, cause the electronic device to implement the screen projection method of any of the first aspects.
In a fourth aspect, the present disclosure provides a computer-readable storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the screen projection method according to any one of the first aspects.
The embodiment of the disclosure provides a screen projection method, a screen projection device, electronic equipment and a medium, wherein a first event triggered by a user at a first position of the screen projection equipment is acquired; determining second coordinate information of the first position on a first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment, wherein the first interactive interface corresponds to the first source end equipment; acquiring second coordinate information which is mapped to corresponding third coordinate information on the first source end equipment on the basis of the second coordinate information of the first position on the first interactive interface where the first position is located; responding to the first event based on the third coordinate information. In the process, second coordinate information of a first event on a first interactive interface corresponding to the first source end device on the screen projection device is utilized to determine that the second coordinate information is mapped to third coordinate information on the first source end device, and a virtual control corresponding to the third coordinate information on the first source end device is triggered by utilizing the third coordinate information, so that the first event is responded.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the embodiments or technical solutions in the prior art description will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic flowchart of an embodiment of a screen projection method provided in the present disclosure;
FIG. 2 is a schematic view of a screen projection scenario provided by the present disclosure;
FIG. 3 is a schematic diagram of coordinate mapping in a screen projection scene provided by the present disclosure;
FIG. 4 is a schematic flow chart diagram illustrating another embodiment of a screen projection method provided by the present disclosure;
FIG. 5 is a schematic diagram of coordinate mapping in another screen-projection scenario provided by the present disclosure;
FIG. 6 is a schematic diagram of coordinate mapping in yet another screen projection scenario provided by the present disclosure;
FIG. 7 is a schematic flowchart illustrating another embodiment of a screen projection method provided by the present disclosure;
FIG. 8 is a schematic diagram of coordinate mapping in yet another screen projection scenario provided by the present disclosure;
fig. 9 is a schematic view of a multi-source device screen projection provided by the present disclosure;
fig. 10 is a schematic view of another multi-source end device projection screen provided by the present disclosure;
FIG. 11 is a schematic view of a screen projection of yet another multi-source device provided by the present disclosure;
fig. 12 is a schematic structural diagram of a screen projection device provided by the present disclosure;
fig. 13 is an internal structural diagram of an electronic device provided in the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
The screen projection method provided by the disclosure can be applied to a screen projection device, the device can be an electronic device such as a personal computer, a notebook computer, a smart phone, a tablet computer and the like, and optionally, the device can also be a functional module or a functional entity which can realize the screen projection method in the electronic device.
According to the screen projection method provided by the disclosure, a first event triggered by a user at a first position of screen projection equipment is acquired; determining second coordinate information of the first position on a first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment, wherein the first interactive interface corresponds to the first source end equipment; acquiring second coordinate information which is mapped to corresponding third coordinate information on the first source end equipment on the basis of the second coordinate information of the first position on the first interactive interface where the first position is located; responding to the first event based on the third coordinate information. In the process, second coordinate information of a first event on a first interactive interface corresponding to the first source end device on the screen projection device is utilized to determine that the second coordinate information is mapped to third coordinate information on the first source end device, and a virtual control corresponding to the third coordinate information on the first source end device is triggered by utilizing the third coordinate information, so that the first event is responded.
The technical solution of the present disclosure is described below in several specific embodiments.
Fig. 1 is a schematic flow diagram of an embodiment of a screen projection method provided by the present disclosure, and as shown in fig. 1, the method of the present embodiment includes the following steps:
s11, acquiring a first event triggered by a user at a first position of the screen projection equipment.
The screen projection device refers to a display device for displaying a screen of a mobile device, such as a smart phone, a tablet computer, and the like, and includes, but is not limited to, a television and a display.
The first position is a position corresponding to a first event triggered by the screen projection device by the user on the whole display screen corresponding to the screen projection device by the pointer, and the first event includes, but is not limited to, a click event and a drag event which are realized by the user through touching the screen projection device, a mouse or a keyboard and other devices.
Specifically, a first event triggered by a user at a first position of a screen projection device such as a television large screen is obtained.
For example, as shown in fig. 2, the screen projection device 100, such as a television, is a display device for displaying a screen of a mobile device 200, such as a smartphone, and the first position is a first position, such as a, corresponding to a first event, such as a click event, triggered by a user touching the screen projection device.
Optionally, the obtaining of the first event triggered by the user at the first position of the screen projection device may be implemented by setting a monitoring process in the screen projection device, but is not limited thereto, and the present disclosure is not particularly limited, and may be set by a person skilled in the art according to an actual situation.
S12, determining second coordinate information of the first position on the first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment.
The first interactive interface is displayed on the screen projection equipment when the first source end equipment, namely the mobile equipment such as an intelligent mobile phone, projects a screen onto the screen projection equipment.
Specifically, first coordinate information of a first position on the screen projection device is obtained, and after the first coordinate information is determined, second coordinate information of a first position corresponding to a first event on a first interactive interface corresponding to the first source end device on the screen projection device is determined according to the first coordinate information.
Exemplarily, in accordance with the above-described embodiment, as shown in fig. 2, the first coordinate information of the first position a on the screen projection apparatus is determined as (X) based on the first coordinate system corresponding to the screen projection apparatus 100 A ,Y A ) Wherein the first coordinate system is constructed by using the lower left point of the screen projecting apparatus 100 as the origin, the length of the screen projecting apparatus 100 as the horizontal axis X, and the width of the screen projecting apparatus 100 as the vertical axis Y. According to the first coordinate information (X) A ,Y A ) Determining that the first position a is on the first source end device 200, that is, the second coordinate information of the mobile device on the first interactive interface 101 corresponding to the screen projection device 100 is (X) A2 ,Y A2 ) The second coordinate information is determined relative to a second coordinate system corresponding to the first interactive interface 101, where the second coordinate system is constructed by using a lower left point of the first interactive interface 101 as an origin, using the length of the first interactive interface 101 as a horizontal axis X1, and using the width of the first interactive interface 101 as a vertical axis Y1. But not limited thereto, the present disclosure is not particularly limited, and those skilled in the art can arrange the same according to actual situations.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, before performing S12, the method further includes:
s121, determining a first interactive interface where the first position is located and a first source end device corresponding to the first interactive interface based on first coordinate information of the first position on the screen projection device.
Specifically, after first coordinate information of the first position on the screen projection device is determined, the first position corresponding to a first event triggered by a user on the screen projection device is determined to be in the first interactive interface according to the first coordinate information, and a first source device corresponding to the first interactive interface for responding to the first event is determined.
For example, the first interactive interface where the first position is located may be determined through first coordinate information of the first position on a coordinate system constructed by using a lower left point of the screen projection device as an origin and corresponding coordinate information of the first interactive interface on the coordinate system constructed by using the lower left point of the screen projection device as the origin, but the disclosure is not limited thereto, and those skilled in the art may set the first interactive interface according to actual situations.
Optionally, on the basis of the above embodiments, in some embodiments of the present disclosure, an implementation manner of S12 may be:
and S12A, acquiring fifth coordinate information of the coordinate origin of the first interactive interface on the screen projection equipment.
Specifically, fifth coordinate information of a coordinate origin of a first interactive interface corresponding to the first source device on the screen projection device is obtained.
Illustratively, as shown in fig. 2, the coordinate origin O of the first interactive interface 101 is obtained corresponding to the screen projection device 100The fifth coordinate information in the first coordinate system is (X) O ,Y O ) However, the present disclosure is not limited thereto, and those skilled in the art can set the method according to the actual situation.
And S12B, subtracting the horizontal axis coordinate in the fifth coordinate information from the horizontal axis coordinate in the first coordinate information to obtain the horizontal axis coordinate in the second coordinate information.
And S12C, subtracting the longitudinal axis coordinate in the fifth coordinate information from the longitudinal axis coordinate in the first coordinate information to obtain the longitudinal axis coordinate in the second coordinate information.
Specifically, after first coordinate information of a first position corresponding to the first event is determined, a horizontal axis coordinate in fifth coordinate information is subtracted from a horizontal axis in the first coordinate information to obtain a horizontal axis coordinate in second coordinate information, and a vertical axis coordinate in the fifth coordinate information is subtracted from a vertical axis in the first coordinate information to obtain a vertical axis coordinate in the second coordinate information, so that second coordinate information of the first position on a first interactive interface where the first position is located is obtained.
S13, acquiring second coordinate information which is mapped to corresponding third coordinate information on the first source end equipment based on the second coordinate information of the first position on the first interactive interface where the first position is located.
And the third coordinate information is the coordinate information corresponding to the mapping of the pointer to the first source end device from the second coordinate information corresponding to the first position on the first interactive interface, and the third coordinate information can be used for responding to the first event on the first source end device.
Specifically, after second coordinate information of a first position of a first event triggered by a user on a first interactive interface is determined, according to the second coordinate information, it is determined that the second coordinate information is mapped to corresponding third coordinate information on the first source end device.
Illustratively, in accordance with the above embodiment, as shown in fig. 3, it is determined that the second coordinate information of the first position a corresponding to the first event on the first interactive interface 101 corresponding to the first source end device 200 on the screen projection device 100 is (X) A2 ,Y A2 ) Using the mapping relationship to determine that (X) is obtained from the second coordinate information A2 ,Y A2 ) The third coordinate information mapped to the location B point on the first source device, i.e. the mobile device 200, is (X) B ,Y B ) However, the present disclosure is not limited thereto, and those skilled in the art can set the method according to the actual situation.
It should be noted that mapping the second coordinate information to the corresponding third coordinate information on the first source device may be implemented by building a first mapping relationship between the screen projection device and the first source device, or may be implemented by building a second mapping relationship between a first interaction interface corresponding to the first source device on the screen projection device and the first source device, and implementing mapping between the second coordinate information and the third coordinate information, but is not limited thereto, and those skilled in the art may set the mapping relationship according to actual situations.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, as shown in fig. 4, an implementation manner of S13 may be:
s131, acquiring second coordinate information which is mapped to corresponding fourth coordinate information on the screen projection equipment on the basis of the second coordinate information of the first position on the first interaction interface where the first position is located.
The fourth coordinate information is coordinate information of the first interactive interface where the first position is located and the size of the screen projection device is the same when the size of the first interactive interface is set to be the same as the size of the screen projection device.
Specifically, after second coordinate information of the first position on the first interactive interface where the first position is located is determined, according to the second coordinate information, the second coordinate information is determined to be mapped to corresponding fourth coordinate information on the screen projection equipment.
Illustratively, taking the above embodiment as a basis, as shown in fig. 3, the second coordinate information of the first position a corresponding to the first event on the first interactive interface 101 of the screen projection apparatus 100 is (X) A2 ,Y A2 ) As shown in fig. 5, when the size of the first interactive interface 101 is the same as the screen size of the screen projection apparatus 100, according to the second coordinate information (X) A2 ,Y A2 ) Determining fourth coordinate information (X) of the point C which is mapped to the corresponding position on the screen projection equipment by the second coordinate information C ,Y C ) But is not limited thereto, and the present disclosure is not particularly limited thereto, and those skilled in the art can set them as the actual situation.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, an implementation manner of S131 may be:
S131A, acquiring second coordinate information mapped to corresponding fourth coordinate information on the screen projection equipment based on the size of the first interactive interface and the size of the screen projection equipment.
The size of the first interactive interface includes, but is not limited to, the length and the width corresponding to the first interactive interface, and the size of the screen projection device includes, but is not limited to, the length and the width corresponding to the screen projection device.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, an implementation manner of S131A may be:
and step A, acquiring the ratio of the size of the transverse axis of the screen projection equipment to the size of the transverse axis of the first interactive interface, and determining that the product of the ratio and the transverse axis in the second coordinate information is the coordinate value of the transverse axis of the fourth coordinate information.
And B, acquiring the ratio of the size of the longitudinal axis of the screen projection equipment to the size of the longitudinal axis of the first interactive interface, and determining that the product of the ratio and the longitudinal axis in the second coordinate information is the coordinate value of the longitudinal axis of the fourth coordinate information.
Specifically, the cross axis size and the longitudinal axis size corresponding to the screen projecting device and the first interactive interface respectively are obtained, the ratio of the cross axis size of the screen projecting device to the cross axis size of the first interactive interface is calculated, the result of product operation of the cross axis and the ratio in the second coordinate information is used as the cross axis coordinate value of the fourth coordinate information, the ratio of the longitudinal axis size of the screen projecting device to the longitudinal axis size of the first interactive interface is calculated, and the result of product operation of the longitudinal axis and the ratio in the second coordinate information is used as the longitudinal axis coordinate value of the fourth coordinate information, so that the fourth coordinate information is obtained.
Illustratively, taking advantage of the above embodiment, the second coordinate information is (X) A2 ,Y A2 ) As shown in fig. 6, the horizontal axis size and the vertical axis size of the screen projection device are obtained as L and W, the horizontal axis size and the vertical axis size of the first interactive interface are obtained as L and W, the ratio k = L/L of the horizontal axis size L of the screen projection device and the horizontal axis size L of the first interactive interface is calculated, and the horizontal axis X of the second coordinate information is used as A2 Multiplying the ratio k = L/L to obtain a horizontal axis coordinate value X of the fourth coordinate information C Calculating the ratio k = W/W of the longitudinal axis W of the screen projection equipment to the longitudinal axis W of the first interactive interface, and converting the longitudinal axis Y of the second coordinate information into the longitudinal axis Y of the second coordinate information A2 Multiplying the ratio k = W/W to obtain a longitudinal coordinate value Y of the fourth coordinate information C Thereby obtaining fourth coordinate information (X) C ,Y C ) However, the present disclosure is not limited thereto, and those skilled in the art can set the method according to the actual situation.
And S132, acquiring third coordinate information which is mapped to the first source end equipment by the fourth coordinate information based on the fourth coordinate information.
Specifically, after it is determined that second coordinate information of the first position on the first interactive interface is mapped to corresponding fourth coordinate information on the screen projection device, it is determined that the fourth coordinate information is mapped to corresponding third coordinate information on the first source device according to the fourth coordinate information.
It should be noted that the mapping of the fourth coordinate information to the corresponding third coordinate information on the first source device is implemented according to a mapping relationship between the first source device and the screen projection device.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, as shown in fig. 7, another implementation manner of S13 may be:
s133, acquiring second coordinate information mapped to corresponding third coordinate information on the first source end device based on the size of the first interactive interface and the size of the first source end device.
Specifically, the size of the first source end device and the size of a first interactive interface corresponding to the first source end device on the screen projection device are obtained, and it is determined that the second coordinate information is mapped to the third coordinate information corresponding to the first source end device according to the size of the first interactive interface and the size of the first source end device.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, an implementation manner of S133 may be:
S133A, a ratio of a horizontal axis size of the first source end device to a horizontal axis size of the first interactive interface is obtained, and a product of the ratio and a horizontal axis in the second coordinate information is determined to be a horizontal axis coordinate value of the third coordinate information.
S133B, obtaining a ratio of the longitudinal axis size of the first source end device to the longitudinal axis size of the first interactive interface, and determining that a product of the ratio and the longitudinal axis in the second coordinate information is a longitudinal axis coordinate value of the third coordinate information.
Specifically, the cross axis size and the longitudinal axis size corresponding to the first source end device and the first interactive interface respectively are obtained, the ratio of the cross axis size of the first source end device to the cross axis size of the first interactive interface is calculated, the result of product operation of the cross axis and the ratio in the second coordinate information is used as the cross axis coordinate value of the third coordinate information, the ratio of the longitudinal axis size of the first source end device to the longitudinal axis size of the first interactive interface is calculated, and the result of product operation of the longitudinal axis and the ratio in the second coordinate information is used as the longitudinal axis coordinate value of the third coordinate information, so that the third coordinate information is obtained.
Illustratively, taking advantage of the above embodiment, the second coordinate information is (X) A2 ,Y A2 ) As shown in fig. 8, the horizontal axis size and the vertical axis size of the first source end device are obtained as l1 and w1, the horizontal axis size and the vertical axis size of the first interactive interface are obtained as l and w, the ratio k = l1/l of the horizontal axis size l1 of the first source end device and the horizontal axis size l of the first interactive interface is calculated, and the horizontal axis X of the second coordinate information is used A2 Multiplying the ratio k = l1/l to obtain a horizontal axis coordinate value X of the third coordinate information B Calculating the ratio k = w1/w of the longitudinal axis dimension w1 of the first source end device to the longitudinal axis dimension w of the first interactive interface, and converting the longitudinal axis Y of the second coordinate information into the longitudinal axis Y of the second coordinate information A2 Multiplying the ratio k = w1/w to obtain a longitudinal coordinate value Y of the third coordinate information B Thereby obtaining the firstThree-coordinate information (X) B ,Y B ) But is not limited thereto, and the present disclosure is not particularly limited thereto, and those skilled in the art can set them as the actual situation.
Therefore, according to the screen projection method provided by the embodiment of the disclosure, the second coordinate information is directly obtained and mapped to the corresponding third coordinate information on the first source end device according to the size of the first interactive interface and the size of the first source end device, so that the calculation amount can be reduced, and the resources can be saved.
And S14, responding to the first event based on the third coordinate information.
Specifically, on the first source end device, an execution instruction corresponding to the first event is generated according to the third coordinate information, so as to respond to the first event.
As an example, taking advantage of the above embodiment, for a first event such as a click event, according to the third coordinate information on the first source device, an execution instruction corresponding to the first event such as the click event is generated to respond to the first event such as the click event, but the disclosure is not limited thereto, and a person skilled in the art may set the execution instruction according to practical situations.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, before performing S14, the method further includes:
and S14A, sending a request message to the first source end device through the UIBC protocol of the TCP.
The request message carries third coordinate information and a first event. A User Interface Back Channel (UIBC) protocol of TCP is a communication protocol that transmits a request command acquired by a receiving end to a source end through network transmission, so as to implement execution of the request command at the source end.
Specifically, after determining third coordinate information corresponding to the first event on the screen projection device, a request message carrying the third coordinate information and the first event is sent to the first source end device through a UIBC protocol of TCP.
Alternatively, the first event carried in the request message may be carried through UIBC Input Body.
In this way, the screen projection method provided by the embodiment of the disclosure obtains a first event triggered by a user at a first position of the screen projection device; determining second coordinate information of the first position on a first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment, wherein the first interactive interface corresponds to the first source end equipment; acquiring second coordinate information which is mapped to corresponding third coordinate information on the first source end equipment on the basis of the second coordinate information of the first position on the first interactive interface where the first position is located; responding to the first event based on the third coordinate information. In the process, second coordinate information of a first event on a first interactive interface corresponding to the first source end device on the screen projection device is utilized to determine that the second coordinate information is mapped to third coordinate information on the first source end device, and a virtual control corresponding to the third coordinate information on the first source end device is triggered by utilizing the third coordinate information, so that the first event is responded.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, before performing S11, the method further includes:
and S10, distributing an interactive interface corresponding to each source end device on the screen projection device based on the number of the source end devices.
Specifically, the number of source end devices needing to be projected to the screen projection device is obtained, and the interactive interface corresponding to each source end device is distributed on the screen projection device according to the number of the source end devices.
For example, as shown in fig. 9, when it is determined that the first source device 200, the second source device 201, and the third source device 202 are all the source devices projected onto the screen projection device 100, the number of the source devices projected onto the screen projection device 100 is 3, and the size of the interactive interface corresponding to each source device on the screen projection device 100 may be determined according to the size of the screen projection device 100 and the number of the source devices, so as to reasonably arrange the first interactive interface 101 corresponding to the first source device 200, the second interactive interface 102 corresponding to the second source device 201, and the third interactive interface 103 corresponding to the third source device 202 on the screen projection device 100, but the disclosure is not limited thereto, and those skilled in the art may set the interfaces according to actual situations.
Therefore, according to the screen projection method provided by the embodiment of the disclosure, the interactive interfaces corresponding to the source end devices are distributed on the screen projection device according to the number of the source end devices, so that a plurality of users can simultaneously display the screens of the source end devices on the screen projection device, reverse control is realized when a plurality of source end devices project screens, and for the number of different source end devices, reasonable distribution on the screen projection device can be realized, and user experience is improved.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, the method further includes:
s101, receiving a screen projection request.
The screen projection request includes the size of the source device.
S102, updating the interactive interfaces corresponding to the source end devices on the screen projection device based on the screen projection request, and updating the dot coordinates and the size information of the interactive interfaces.
Specifically, when receiving a screen projection request sent by a source device, a screen projection device updates the layout of the interactive interface corresponding to each source device on the screen projection device, and the dot coordinates and the size information of each interactive interface according to the interactive interface corresponding to each source device currently laid out on the screen projection device.
For example, with the above embodiment, it is determined that source devices currently being projected to the screen projection device 100 are the first source device 200, the second source device 201, and the third source device 202, and a first interactive interface 101, a second interactive interface 102, and a third interactive interface 103, which correspond to each source device on the screen projection device 100, as shown in fig. 10, when a screen projection request sent by the fourth source device 203 is received, an interactive interface corresponding to each source device on the screen projection device 100, and dot coordinates and size information of each interactive interface are updated according to the screen projection request, but the disclosure is not limited thereto, and those skilled in the art may set the method according to actual situations.
Optionally, on the basis of the foregoing embodiments, in some embodiments of the present disclosure, the method further includes:
s103, receiving a screen projection exit request, updating interactive interfaces corresponding to source end equipment on the screen projection equipment based on the screen projection exit request, and updating dot coordinates and size information of the interactive interfaces.
Specifically, the screen projection device updates the layout of the interactive interface corresponding to each source device on the screen projection device, and the dot coordinates and the size information of each interactive interface according to the interactive interface corresponding to each source device which is currently laid out on the screen projection device after receiving a screen projection exit request sent by the source device.
For example, with the above embodiments, it is determined that source devices currently being projected to the screen projection device 100 are the first source device 200, the second source device 201, and the third source device 202, and a first interactive interface 101, a second interactive interface 102, and a third interactive interface 103 corresponding to each source device on the screen projection device 100, as shown in fig. 11, when a screen projection exit request sent by the first source device 200 is received, the interactive interfaces corresponding to each source device on the screen projection device 100, and the dot coordinates and the size information of each interactive interface are updated according to the screen projection exit request, but the disclosure is not limited thereto, and those skilled in the art may set the method according to actual situations.
Therefore, the screen projection method provided by the embodiment of the disclosure can update the interactive interface corresponding to each source device on the screen projection device in real time according to the screen projection request and the screen projection exit request, update the dot coordinates and the size information of each interactive interface, and flexibly adjust the layout of the interactive interface corresponding to each source device on the screen projection device, so as to meet the screen projection requirements in different scenes.
Fig. 12 is a schematic structural diagram of a screen projection apparatus provided in the present disclosure, and as shown in fig. 12, the apparatus of this embodiment includes: a first event acquiring module 11, a second coordinate information determining module 12, a third coordinate information acquiring module 13, and a first event responding module 14.
The first event acquiring module 11 is configured to acquire a first event triggered by a user at a first position of the screen projection device;
a second coordinate information determining module 12, configured to determine, based on first coordinate information of the first position on the screen projection device, second coordinate information of the first position on a first interactive interface where the first position is located, where the first interactive interface corresponds to a first source device;
a third coordinate information obtaining module 13, configured to obtain, based on second coordinate information of the first position on a first interactive interface where the first position is located, that the second coordinate information is mapped to corresponding third coordinate information on the first source device;
a first event response module 14, configured to respond to the first event based on the third coordinate information.
Optionally, the third coordinate information obtaining module 13 is specifically configured to obtain, based on second coordinate information of the first position on the first interactive interface where the first position is located, that the second coordinate information is mapped to corresponding fourth coordinate information on the screen projection device; and acquiring third coordinate information corresponding to the fourth coordinate information mapped to the first source end device based on the fourth coordinate information.
Optionally, the third coordinate information obtaining module 13 is further specifically configured to obtain, based on the size of the first interactive interface and the size of the screen projection device, fourth coordinate information that is mapped to the second coordinate information on the screen projection device.
Optionally, the third coordinate information obtaining module 13 is further specifically configured to obtain a ratio of a size of a cross axis of the screen projection device to a size of a cross axis of the first interactive interface, and determine that a product of the ratio and the cross axis in the second coordinate information is a cross axis coordinate value of the fourth coordinate information; and acquiring the ratio of the size of the longitudinal axis of the screen projection equipment to the size of the longitudinal axis of the first interactive interface, and determining that the product of the ratio and the longitudinal axis in the second coordinate information is the coordinate value of the longitudinal axis of the fourth coordinate information.
Optionally, the third coordinate information obtaining module 13 is further specifically configured to obtain, based on the size of the first interactive interface and the size of the first source end device, third coordinate information that is mapped to the second coordinate information on the first source end device.
Optionally, the third coordinate information obtaining module 13 is further specifically configured to obtain a ratio of a size of a cross axis of the first source end device to a size of a cross axis of the first interactive interface, and determine that a product of the ratio and the cross axis in the second coordinate information is a cross axis coordinate value of the third coordinate information; and acquiring a ratio of the size of the longitudinal axis of the first source end device to the size of the longitudinal axis of the first interactive interface, and determining that a product of the ratio and the longitudinal axis in the second coordinate information is a longitudinal axis coordinate value of the third coordinate information.
The second coordinate information determining module 12 is specifically configured to obtain fifth coordinate information of the origin of coordinates of the first interactive interface on the screen projection device; subtracting the horizontal axis coordinate in the fifth coordinate information from the horizontal axis coordinate in the first coordinate information to obtain the horizontal axis coordinate in the second coordinate information; and subtracting the longitudinal axis coordinate in the fifth coordinate information from the longitudinal axis coordinate in the first coordinate information to obtain the longitudinal axis coordinate in the second coordinate information.
Optionally, the apparatus further comprises: a sending module, configured to send the request message to the first source end device through a UIBC protocol of TCP, where the request message carries the third coordinate information and the first event.
Optionally, the apparatus further comprises: and the layout module is used for laying out the interactive interface corresponding to each source end device on the screen projection device based on the number of the source end devices.
Optionally, the apparatus further comprises: and the first determining module is used for determining a first interactive interface where the first position is located and a first source end device corresponding to the first interactive interface based on first coordinate information of the first position on the screen projection device.
Optionally, the apparatus further comprises: the updating module is used for receiving a screen projection request, and the screen projection request comprises the size of the source end equipment; and updating the interactive interfaces corresponding to the source end equipment on the screen projection equipment based on the screen projection request, and updating the dot coordinates and the size information of each interactive interface.
Optionally, the updating module is further configured to receive a screen-casting exit request, update the interactive interfaces corresponding to the source devices on the screen-casting device based on the screen-casting exit request, and update dot coordinates and size information of the interactive interfaces.
Optionally, the apparatus of this embodiment may be correspondingly used to perform the steps of the foregoing method embodiments, and the implementation principle and technical effect are similar, which are not described herein again.
The present disclosure also provides an electronic device, comprising: one or more processors; a memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; the one or more processors, when executing the one or more computer programs, cause the electronic device to perform the steps of the above-described method embodiments.
The present disclosure also provides a computer-readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the steps of the above-described method embodiments.
In the above-described embodiments, all or part of the functions may be implemented by software, hardware, or a combination of software and hardware. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions according to the embodiments of the disclosure are wholly or partially generated when the computer program instructions are loaded and executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), among others.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (15)

1. A screen projection method, comprising:
acquiring a first event triggered by a user at a first position of screen projection equipment;
determining second coordinate information of the first position on a first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment, wherein the first interactive interface corresponds to a first source end equipment;
acquiring second coordinate information of the first position on a first interactive interface where the first position is located, wherein the second coordinate information is mapped to corresponding third coordinate information on the first source end device;
responding to the first event based on the third coordinate information.
2. The method of claim 1, wherein the obtaining third coordinate information corresponding to the second coordinate information on the first source device based on the second coordinate information of the first position on the first interactive interface where the first position is located comprises:
acquiring second coordinate information of the first position on a first interactive interface where the first position is located, and mapping the second coordinate information to corresponding fourth coordinate information on the screen projection equipment;
and acquiring third coordinate information which is mapped to the first source end equipment by the fourth coordinate information based on the fourth coordinate information.
3. The method of claim 2, wherein the obtaining of the mapping of the second coordinate information to corresponding fourth coordinate information on the screen projection device based on the second coordinate information of the first position on the first interactive interface where the first position is located comprises:
and acquiring the second coordinate information mapped to corresponding fourth coordinate information on the screen projection equipment based on the size of the first interactive interface and the size of the screen projection equipment.
4. The method of claim 3, wherein the obtaining of the mapping of the second coordinate information to corresponding fourth coordinate information on the screen projection device based on the size of the first interactive interface and the size of the screen projection device comprises:
acquiring the ratio of the size of a transverse axis of the screen projection equipment to the size of a transverse axis of the first interactive interface, and determining that the product of the ratio and the transverse axis in the second coordinate information is the coordinate value of the transverse axis of the fourth coordinate information;
and acquiring the ratio of the size of the longitudinal axis of the screen projection equipment to the size of the longitudinal axis of the first interactive interface, and determining that the product of the ratio and the longitudinal axis in the second coordinate information is the coordinate value of the longitudinal axis of the fourth coordinate information.
5. The method of claim 1, wherein the obtaining the mapping of the second coordinate information to corresponding third coordinate information on the first source device based on the second coordinate information of the first position on the first interactive interface where the first position is located comprises:
and acquiring the second coordinate information mapped to the corresponding third coordinate information on the first source end equipment based on the size of the first interactive interface and the size of the first source end equipment.
6. The method of claim 5, wherein the obtaining, based on the size of the first interactive interface and the size of the first source device, the second coordinate information mapped to corresponding third coordinate information on the first source device comprises:
acquiring a ratio of a cross-axis size of the first source end device to a cross-axis size of the first interactive interface, and determining that a product of the ratio and a cross axis in the second coordinate information is a cross-axis coordinate value of the third coordinate information;
and acquiring a ratio of the size of the longitudinal axis of the first source end device to the size of the longitudinal axis of the first interactive interface, and determining that a product of the ratio and the longitudinal axis in the second coordinate information is a longitudinal axis coordinate value of the third coordinate information.
7. The method of any one of claims 1-6, wherein determining second coordinate information of the first location on the first interactive interface where the first location is located based on first coordinate information of the first location on the screen-projecting device comprises:
acquiring fifth coordinate information of the origin of coordinates of the first interactive interface on the screen projection equipment;
subtracting the abscissa coordinate in the fifth coordinate information from the abscissa coordinate in the first coordinate information to obtain the abscissa coordinate in the second coordinate information;
and subtracting the longitudinal axis coordinate in the fifth coordinate information from the longitudinal axis coordinate in the first coordinate information to obtain the longitudinal axis coordinate in the second coordinate information.
8. The method according to any one of claims 1-6, wherein, prior to responding to the first event based on the third coordinate information, further comprising:
and sending the request message to the first source end device through a UIBC protocol of the TCP, where the request message carries the third coordinate information and the first event.
9. The method according to any one of claims 1-6, wherein the obtaining a first event triggered by a user at a first position of a screen-casting device further comprises:
and based on the number of the source end devices, distributing an interactive interface corresponding to each source end device on the screen projection device.
10. The method of claim 9, wherein the determining second coordinate information of the first location on the first interactive interface where the first location is located based on the first coordinate information of the first location on the screen-projecting device further comprises:
and determining a first interactive interface where the first position is located and a first source end device corresponding to the first interactive interface based on first coordinate information of the first position on the screen projection device.
11. The method of claim 9, further comprising:
receiving a screen projection request, wherein the screen projection request comprises the size of source equipment;
and updating the interactive interfaces corresponding to the source end devices on the screen projection device based on the screen projection request, and updating the dot coordinates and the size information of the interactive interfaces.
12. The method of claim 9, further comprising:
receiving a screen projection exit request, updating interactive interfaces corresponding to source end equipment on the screen projection equipment based on the screen projection exit request, and updating dot coordinates and size information of the interactive interfaces.
13. A screen projection apparatus, comprising:
the screen projection device comprises a first event acquisition module, a first display module and a second display module, wherein the first event acquisition module is used for acquiring a first event triggered by a user at a first position of the screen projection device;
the second coordinate information determining module is used for determining second coordinate information of the first position on a first interactive interface where the first position is located based on first coordinate information of the first position on the screen projection equipment, wherein the first interactive interface corresponds to a first source end equipment;
a third coordinate information obtaining module, configured to obtain, based on second coordinate information of the first location on a first interactive interface where the first location is located, that the second coordinate information is mapped to corresponding third coordinate information on the first source device;
and the first event response module is used for responding to the first event based on the third coordinate information.
14. An electronic device, comprising: one or more processors; a memory; and one or more computer programs; wherein the one or more computer programs are stored in the memory; one or more processors that, when executing the one or more computer programs, cause the electronic device to implement the screen projection method of any of claims 1-12.
15. A computer-readable storage medium comprising computer instructions that, when executed on an electronic device, cause the electronic device to perform the screen projection method of any one of claims 1-12.
CN202211369181.6A 2022-11-03 2022-11-03 Screen projection method and device, electronic equipment and medium Pending CN115794274A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211369181.6A CN115794274A (en) 2022-11-03 2022-11-03 Screen projection method and device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211369181.6A CN115794274A (en) 2022-11-03 2022-11-03 Screen projection method and device, electronic equipment and medium

Publications (1)

Publication Number Publication Date
CN115794274A true CN115794274A (en) 2023-03-14

Family

ID=85435242

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211369181.6A Pending CN115794274A (en) 2022-11-03 2022-11-03 Screen projection method and device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115794274A (en)

Similar Documents

Publication Publication Date Title
JP6226394B2 (en) Instantiable gesture object
CN109460233B (en) Method, device, terminal equipment and medium for updating native interface display of page
CN109885314B (en) Automatic layout method and device for small programs
US20140026057A1 (en) Providing access to a remote application via a web client
WO2020082558A1 (en) Function name-based breakpoint setting method, device, computer apparatus, and storage medium
CN110286899B (en) Editing method and device for application display interface and storage medium
US20120278712A1 (en) Multi-input gestures in hierarchical regions
CN109388317B (en) Picture loading method, terminal device and storage medium
CN109471626B (en) Page logic structure, page generation method, page data processing method and device
CN106843794B (en) Split screen display method and system based on android
US11863835B2 (en) Interaction method and apparatus, and electronic device
CN110673886B (en) Method and device for generating thermodynamic diagrams
CN112379963B (en) Remote application window control method and device and computer equipment
US20240073488A1 (en) Live video processing method and apparatus, device and medium
WO2024061088A1 (en) Display method and apparatus, electronic device, and storage medium
CN106775445B (en) Data migration method and device
WO2023169316A1 (en) User interface framework-based processing method and apparatus, device, and medium
CN112199923A (en) Identification generation method, system, device and medium based on distributed system
CN110134905B (en) Page update display method, device, equipment and storage medium
WO2023029526A1 (en) Display control method and apparatus for pointer in window, device, and storage medium
CN115794274A (en) Screen projection method and device, electronic equipment and medium
US20150339030A1 (en) Method, apparatus, and system for data transfer across applications
CN114115673B (en) Control method of vehicle-mounted screen
CN113360064A (en) Method and device for searching local area of picture, medium and electronic equipment
CN114995738B (en) Transformation method, transformation device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination