Screen projection method and device

By separately collecting and transmitting screen stream data and mouse data in the screen projection scenario, the problem of unsmooth mouse movements on the screen projection device is solved, the smoothness and transmission efficiency of mouse movements are improved, and the user experience is improved.

CN114510191BActive Publication Date: 2024-10-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210143178.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2024-10-18
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

In the screencasting scenario, the mouse movements displayed on the screen of the screencasting device have problems such as lag and unsmoothness, which affects the user experience.

Method used

By collecting screen stream data and mouse data respectively between the shared device and the screen projection device, and sending and receiving them separately as needed, different frame rates are used for data transmission to improve the transmission efficiency and fluency of mouse data.

Benefits of technology

It effectively improves the fluency of mouse movements on the screen casting device, reduces bandwidth waste, avoids unsmooth problems caused by discarding multiple mouse data, and improves the screen casting experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510191B_ABST
    Figure CN114510191B_ABST
Patent Text Reader

Abstract

The present application discloses a screen projection method, which can be applied to a shared device. In one example, the shared device can collect screen stream data at a first frame rate and collect mouse data at a second frame rate, and then send the screen stream data and the mouse data to the screen projection device respectively, so that the screen projection device renders the projection interface based on the screen stream data and the mouse data. Since the shared device sends the screen stream data and the mouse data to the screen projection device respectively, the transmission of the mouse data is less affected by the bandwidth. Therefore, the second frame rate can be relatively high. Correspondingly, when the screen projection device renders the projection interface based on the mouse data, the smoothness of the mouse movement will also be relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In the screen projection scenario, the user can project the content displayed on the screen of the shared device to the screen of the projection device. When the content displayed on the screen of the shared device is projected to the screen of the projection device, the content displayed on the screen of the shared device can be transmitted to the projection device as a video stream, and the projection device renders the received video stream.

[0003] Currently, in screen projection scenarios, the mouse displayed on the screen of the projection device has problems with unsmooth movements, for example, freezing and other phenomena.

[0004] Therefore, there is an urgent need for a solution that can improve the smoothness of the mouse movements displayed on the screen of the projection device. Summary of the invention

[0005] The technical problem to be solved by the present application is: how to improve the smoothness of the mouse movements displayed on the screen of the screen projection device, and to provide a screen projection method and device.

[0006] In a first aspect, an embodiment of the present application provides a screen projection method, which is applied to a shared device, and the method includes:

[0007] Collecting screen stream data at a first frame rate;

[0008] collecting mouse data at a second frame rate;

[0009] The screen stream data and the mouse data are respectively sent to the screen projection device, so that the screen projection device renders the screen projection interface based on the screen stream data and the mouse data.

[0010] Optionally, the method further includes:

[0011] In response to a screen projection operation triggered by a user, sending a screen projection request to the screen projection device;

[0012] Receive indication information sent by the screen projection device in response to the screen projection request, where the indication information is used to indicate that the screen projection device supports separate reception of mouse data.

[0013] Optionally, the content displayed on the screen of the shared device is projected onto multiple projection devices for display, and the multiple projection devices all support separate reception of mouse data.

[0014] Optionally, collecting mouse data includes:

[0015] In response to detecting that a feature of a mouse on the screen of the shared device changes, the mouse data is acquired, wherein the feature of the mouse includes: a mouse position and / or a mouse style.

[0016] Optionally, when the position of the mouse changes and the style of the mouse does not change, the characteristics of the mouse include the mouse position but do not include the mouse style.

[0017] Optionally, when the position of the mouse changes and the style of the mouse changes, the characteristics of the mouse include the mouse position and the mouse style.

[0018] Optionally, when the position of the mouse does not change and the style of the mouse changes, the characteristics of the mouse include the mouse style but do not include the mouse position.

[0019] Optionally, the method further includes:

[0020] Receiving a first response sent by the screen projection device in response to the received mouse data;

[0021] Based on the sending information and the response information, the second frame rate is determined, and the sending information and the receiving information are used to indicate the delay of the shared device sending mouse data to the screen projection device, or the sending information and the receiving information are used to indicate the packet loss situation of the shared device sending mouse data to the screen projection device.

[0022] Optional,

[0023] The sending information includes: the sharing device sending a first timestamp of the mouse data to the screen projection device;

[0024] The response information includes: a second timestamp when the sharing device receives the first response.

[0025] Optional,

[0026] The sending information includes: the amount of mouse data sent by the sharing device to the screen projection device;

[0027] The response information includes: the number of responses sent by the screen projection device and received by the sharing device.

[0028] Optionally, the shared device supports sending mouse data separately.

[0029] In a second aspect, an embodiment of the present application provides a method for processing mouse data based on screen projection, which is applied to a screen projection device, and the method includes:

[0030] Receiving mouse data sent by a sharing device, wherein the mouse data is mouse data of a mouse displayed on a screen of the sharing device, and content displayed on the screen of the sharing device is projected onto a screen of the projection device for display;

[0031] caching the mouse data;

[0032] Based on the mouse data read from the cache, the mouse is rendered on the screen of the screen projection device.

[0033] Optionally, the mouse data includes: mouse position and / or mouse style.

[0034] Optionally, when the mouse data does not include the mouse style, the method further includes:

[0035] Get the cached mouse style;

[0036] The rendering of the mouse on the screen of the screen projection device based on the mouse data read from the cache includes:

[0037] Based on the mouse data read from the cache and the cached mouse style, the mouse is rendered on the screen of the screen projection device.

[0038] Optionally, when the mouse data does not include the mouse position, the method further includes:

[0039] Get the cached mouse position;

[0040] The rendering of the mouse on the screen of the screen projection device based on the mouse data read from the cache includes:

[0041] Based on the mouse data read from the cache and the cached mouse position, the mouse is rendered on the screen of the screen projection device.

[0042] Optionally, the method further includes:

[0043] Receiving a screen projection request sent by the sharing device;

[0044] Based on the screen projection request, indication information is sent to the sharing device, where the indication information is used to indicate that the screen projection device supports separate reception of mouse data.

[0045] In a third aspect, an embodiment of the present application provides a screen projection device, which is applied to a shared device, and the device includes:

[0046] A first acquisition unit, configured to acquire screen stream data at a first frame rate;

[0047] A second acquisition unit, used for acquiring mouse data at a second frame rate;

[0048] The first sending unit is used to send the screen flow data and the mouse data to the screen projection device respectively, so that the screen projection device renders the screen projection interface based on the screen flow data and the mouse data.

[0049] Optionally, the device further comprises:

[0050] A second sending unit, configured to send a screen projection request to the screen projection device in response to a screen projection operation triggered by a user;

[0051] The first receiving unit is used to receive indication information sent by the screen projection device in response to the screen projection request, where the indication information is used to indicate that the screen projection device supports separate reception of mouse data.

[0052] Optionally, the content displayed on the screen of the shared device is projected onto multiple projection devices for display, and the multiple projection devices all support separate reception of mouse data.

[0053] Optionally, collecting mouse data includes:

[0054] In response to detecting that a feature of a mouse on the screen of the shared device changes, the mouse data is acquired, wherein the feature of the mouse includes: a mouse position and / or a mouse style.

[0055] Optionally, when the position of the mouse changes and the style of the mouse does not change, the characteristics of the mouse include the mouse position but do not include the mouse style.

[0056] Optionally, when the position of the mouse changes and the style of the mouse changes, the characteristics of the mouse include the mouse position and the mouse style.

[0057] Optionally, when the position of the mouse does not change and the style of the mouse changes, the characteristics of the mouse include the mouse style but do not include the mouse position.

[0058] Optionally, the device further comprises:

[0059] A second receiving unit, configured to receive a first response sent by the screen projection device in response to the received mouse data;

[0060] A determination unit is used to determine the second frame rate based on the sending information and the response information, wherein the sending information and the receiving information are used to indicate the delay of the shared device sending mouse data to the screen projection device, or the sending information and the receiving information are used to indicate the packet loss situation of the shared device sending mouse data to the screen projection device.

[0061] Optional,

[0062] The sending information includes: the sharing device sending a first timestamp of the mouse data to the screen projection device;

[0063] The response information includes: a second timestamp when the sharing device receives the first response.

[0064] Optional,

[0065] The sending information includes: the amount of mouse data sent by the sharing device to the screen projection device;

[0066] The response information includes: the number of responses sent by the screen projection device and received by the sharing device.

[0067] Optionally, the shared device supports sending mouse data separately.

[0068] In a fourth aspect, an embodiment of the present application provides a mouse data processing device based on screen projection, which is applied to a screen projection device, and the device includes:

[0069] A first receiving unit is used to receive mouse data sent by a shared device, where the mouse data is mouse data of a mouse displayed on a screen of the shared device, and content displayed on the screen of the shared device is projected onto a screen of the projection device for display;

[0070] A cache unit, used for caching the mouse data;

[0071] A rendering unit is used to render the mouse on the screen of the projection device based on the mouse data read from the cache.

[0072] Optionally, the mouse data includes: mouse position and / or mouse style.

[0073] Optionally, when the mouse data does not include the mouse style, the device further includes:

[0074] A first acquisition unit, used for acquiring a cached mouse style;

[0075] The rendering unit is used for:

[0076] Based on the mouse data read from the cache and the cached mouse style, the mouse is rendered on the screen of the screen projection device.

[0077] Optionally, when the mouse data does not include the mouse position, the device further includes:

[0078] A second acquisition unit, used to acquire the cached mouse position;

[0079] The rendering unit is used for:

[0080] Based on the mouse data read from the cache and the cached mouse position, the mouse is rendered on the screen of the screen projection device.

[0081] Optionally, the device further comprises:

[0082] A second receiving unit, configured to receive a screen projection request sent by the sharing device;

[0083] A sending unit is used to send indication information to the sharing device based on the screen projection request, and the indication information is used to indicate that the screen projection device supports separate reception of mouse data.

[0084] In a fifth aspect, an embodiment of the present application provides a device, the device comprising a processor and a memory;

[0085] The processor is used to execute instructions stored in the memory so that the device executes the method described in any one of the first aspects above, or so that the device executes the method described in any one of the second aspects above.

[0086] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions, wherein the instructions instruct a device to execute any method described in the first aspect above, or the instructions instruct a device to execute any method described in the second aspect above.

[0087] In the seventh aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the method described in any one of the first aspect above, or enables the computer to execute the method described in any one of the second aspect above.

[0088] Compared with the prior art, the embodiments of the present application have the following advantages:

[0089] An embodiment of the present application provides a screen projection method, which can be applied to a shared device. In one example, the shared device can collect screen stream data at a first frame rate and collect mouse data at a second frame rate, and then send the screen stream data and the mouse data to the screen projection device respectively, so that the screen projection device renders the projection interface based on the screen stream data and the mouse data. Since the shared device sends the screen stream data and the mouse data to the screen projection device respectively, the transmission of the mouse data is less affected by the bandwidth. Therefore, the second frame rate can be relatively high. Correspondingly, when the screen projection device renders the projection interface based on the mouse data, the smoothness of the mouse movement will also be relatively high.

[0090] An embodiment of the present application provides a screen projection method, which can be applied to a screen projection device. In one example, the screen projection device can receive mouse data sent by a shared device and cache the received mouse data. Then, the mouse data is read from the cache and the mouse is rendered based on the mouse data. In this way, when the screen projection device simultaneously receives multiple mouse data sent by a shared device, the multiple mouse data can be cached first, rather than rendering the mouse based on one of the multiple mouse data and discarding the other mouse data in the multiple mouse data. By adopting this solution, the problem of unsmooth mouse movements displayed on the screen of the screen projection device due to discarding mouse data can be avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0092] Figure 1 A signaling interaction diagram of a screen projection method provided in an embodiment of the present application;

[0093] Figure 2 A flowchart of a method for rendering a mouse provided in an embodiment of the present application;

[0094] Figure 3 A schematic diagram of the structure of a screen projection device provided in an embodiment of the present application;

[0095] Figure 4 A schematic diagram of the structure of a screen projection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0096] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0097] After research, the inventor of the present application discovered that in the traditional technology, when the content displayed on the screen of a shared device is projected onto the screen of a projection device for display, the content displayed on the screen of the shared device can be transmitted to the projection device as a video stream at a specific frame rate, and the projection device renders the received video stream. The video stream includes screen stream and mouse data. When the shared device sends the video stream to the projection device, affected by the network bandwidth, the specific frame rate is generally not too high. For example, the specific frame rate is 15 frames per second. It is precisely because the specific frame rate is not too high that when the mouse changes frequently on the shared device side, the mouse movement will be jerky on the projection device side.

[0098] The inventors of the embodiments of the present application also found that in some scenarios, the screen stream data of the shared device changes very little. For example, in the scenario of slide presentation (PowerPoint, PPT), the screen stream data of the shared device may stay on a certain page of the PPT for a period of time. In this case, if the screen stream data and mouse data are collected at the same frame rate, and the video stream including the screen stream data and the mouse data is synchronously sent to the projection device, since the screen stream transmission is greatly affected by the bandwidth, the frame rate of the screen stream will not be very high, and since the frame rate of the mouse data is the same as the frame rate of the screen stream data, the frame rate of the mouse data will not be very high. Therefore, if the mouse is in the process of moving, it will cause the mouse movement to be not smooth on the projection device side.

[0099] In addition, since the screen stream data is the same for a period of time in this scenario, sending a video stream including screen stream and mouse data to the projection device will cause the same screen stream data to be repeatedly sent to the projection device, resulting in unnecessary waste of bandwidth.

[0100] In view of this, an embodiment of the present application provides a screen projection method and device.

[0101] Various non-limiting implementations of the present application are described in detail below in conjunction with the accompanying drawings.

[0102] Exemplary Methods

[0103] See also Figure 1 , which is a signaling interaction diagram of a screen projection method provided in an embodiment of the present application. In this embodiment, the method may include the following steps S101-S105 for implementation.

[0104] about Figure 1The sharing device and screen projection device shown, it should be noted that the content displayed on the screen of the sharing device is projected onto the screen of the screen projection device for display. The embodiments of the present application do not specifically limit the sharing device and the screen projection device. In one example, the sharing device and the screen projection device may both be terminal devices. In one example, the content displayed on the screen of the sharing device can be projected onto a screen projection device for display. In another example, for example, in a conference scenario, the content displayed on the screen of the sharing device (the device corresponding to the presenter) can be projected onto multiple screen projection devices (devices corresponding to multiple other conference participants) for display. The embodiments of the present application do not make specific limitations.

[0105] S101: A sharing device collects screen stream data at a first frame rate.

[0106] S102: The shared device collects mouse data at a second frame rate.

[0107] In an embodiment of the present application, the sharing device can collect screen flow data at a first frame rate, and the embodiment of the present application does not specifically limit the first frame rate. The screen flow data mentioned here can be, for example, the screen flow data of the shared device. In one example, the sharing device can determine whether the screen flow data has changed according to a certain sampling interval. If it is determined that the screen flow data has changed, the screen flow data is collected. In this way, it is possible to avoid collecting and sending screen flow data to the projection device when the screen flow data has not changed, thereby sending repeated screen flow data to the projection device to save bandwidth.

[0108] In the embodiment of the present application, the shared device collects mouse data at a second frame rate, and the embodiment of the present application does not specifically limit the second frame rate. The mouse data mentioned here refers to the mouse data of the shared device.

[0109] The embodiment of the present application does not specifically limit the first frame rate and the second frame rate, and the first frame rate and the second frame rate may be the same or different. It is understandable that in different application scenarios, the first frame rate and / or the second frame rate may be manually set according to the needs of the actual scenario or adaptively adjusted according to the set frame rate adjustment method. In one example, for example, in the scenario explained in the aforementioned PPT, the second frame rate is greater than the first frame rate.

[0110] In one example, when the “collecting mouse data” in S102 is specifically implemented, the mouse data can be obtained when the characteristics of the mouse on the screen of the shared device change. In this way, it is possible to avoid collecting and sending repeated mouse data to the projection device when the mouse characteristics have not changed, thereby saving bandwidth.

[0111] In an embodiment of the present application, the characteristics of the mouse may include the mouse position and / or the mouse style. In one example, when the position of the mouse changes and the style of the mouse does not change, the characteristics of the mouse may include the mouse position but not the mouse style. In another example, when the position of the mouse changes and the style of the mouse changes, the characteristics of the mouse may include the mouse position and the mouse style. In another example, when the position of the mouse does not change and the style of the mouse changes, the characteristics of the mouse include the mouse style but not the mouse position.

[0112] Regarding the mouse data, it should be noted that the mouse data refers to the mouse-related data displayed on the screen of the shared device. The mouse data includes a mouse style and / or a mouse position. In one example, the client can obtain the mouse style and the mouse position using the application programming interface (API) of its operating system.

[0113] In one example, the mouse data is related to the characteristics of the mouse. Specifically:

[0114] In one example, if the characteristics of the mouse include the mouse position but do not include the mouse style, the mouse data may include the mouse position but do not include the mouse style.

[0115] In another example, if the characteristics of the mouse include the mouse position and the mouse style, then the mouse data may include the mouse position and the mouse style, wherein the mouse style may be, for example, a picture format.

[0116] In another example, if the characteristics of the mouse include the mouse style but not the mouse position, the mouse data may include the mouse style but not the mouse position.

[0117] S103: The sharing device sends the screen stream data and the mouse data to the screen projection device respectively.

[0118] In an embodiment of the present application, the shared device has the ability to send mouse data separately, that is, the shared device supports sending mouse data separately. In other words, the shared device does not have to collect screen stream data and mouse data at the same frame rate and send the video stream including screen stream data and mouse data to the screen projection device, but can collect screen stream data and mouse data at different frame rates respectively, and send the collected screen stream data and mouse data to the screen projection device at different frame rates. Precisely because the shared device has the ability to send mouse data separately, the shared device can send the screen stream data and the mouse data to the screen projection device separately.

[0119] In one example, another condition for executing S103 is that the screen projection device has the ability to receive mouse data independently, that is, the screen projection device supports receiving mouse data independently.

[0120] In one example, before executing S103, the shared device may determine whether the screen projection device supports receiving mouse data separately. If it is determined that the screen projection device supports receiving mouse data separately, the shared device may execute S103. In one example, after the user triggers the screen projection operation, the shared device may send a screen projection request to the screen projection device in response to the screen projection operation triggered by the user. As an example, if the screen projection device supports receiving mouse data separately, the screen projection device will send an indication message to the shared device after receiving the screen projection request, and the indication message is used to indicate that the screen projection device supports receiving mouse data separately. After the shared device receives the indication message, it can be determined that the screen projection device supports receiving mouse data separately. The screen projection device mentioned here supports receiving mouse data separately, which means that the screen projection device supports drawing mouse separately. As an example, the screen projection device may include a functional module for drawing mouse separately. The functional module for drawing mouse separately can be executed after receiving mouse data, and it is not affected by screen flow data.

[0121] Regarding the screen projection operation triggered by the user, the embodiments of the present application do not make any specific limitations. In one example, the user can trigger the screen projection operation by using an application (Application, APP) installed on the shared device for providing screen projection services.

[0122] As mentioned above, the content displayed on the screen of the shared device can be projected onto one or more projection devices for display. When the content displayed on the screen of the shared device is projected onto multiple projection devices for display, the multiple projection devices all support separate reception of mouse data. In this case, the shared device can send the aforementioned projection request to each projection device respectively, and receive the aforementioned indication information sent by each projection device.

[0123] S104: The screen projection device receives the screen stream data and mouse data sent by the sharing device.

[0124] S105: The screen projection device renders a screen projection interface based on the screen stream data and the mouse data.

[0125] In a specific implementation, S105 can render the page content in the projection interface based on the screen stream data, and render the mouse on the screen of the projection device based on the mouse data.

[0126] In one example, after receiving the mouse data, the screen projection device can directly render the mouse on the screen of the screen projection device based on the mouse data.

[0127] It can be seen from the above description that, by utilizing the solution provided in the embodiment of the present application, the sharing device can send screen stream data and mouse data to the projection device respectively. In this way, in the scenario explained in the above PPT, screen stream data and mouse data are collected respectively at different frame rates, and since the screen stream data changes very little, the frame rate of collecting screen stream data can be reduced, and the frame rate of collecting mouse data can be appropriately increased. Since the frame rate of collecting screen stream data is reduced, the number of times the same screen stream data is sent to the projection device can be reduced, saving network bandwidth. Moreover, since the frame rate of collecting mouse data is increased, the frame rate of receiving the mouse data on the projection device side is also correspondingly improved, thereby improving the smoothness of the mouse movement on the projection device side.

[0128] In one example, if Figure 2 As shown, the screen projection device can render the mouse data based on the following steps S201 to S203

[0129] S201: Receive mouse data sent by a sharing device, where the mouse data is mouse data of a mouse displayed on a screen of the sharing device, and content displayed on the screen of the sharing device is projected onto a screen of the projection device for display.

[0130] In one example, the sharing device may collect mouse data at the second frame rate. After collecting the mouse data, the sharing device may send the mouse data to the screen projection device, and correspondingly, the screen projection device may receive the mouse data sent by the sharing device.

[0131] For the specific implementation of the shared device collecting mouse data according to the second frame rate, please refer to the relevant description part above, which will not be repeated here.

[0132] S202: Cache the mouse data.

[0133] S203: Rendering a mouse on the screen of the screen projection device based on the mouse data read from the cache.

[0134] Considering that in some scenarios, if the network between the sharing device and the screen projection device jitters, the screen projection device may receive multiple mouse data at the same time. That is, the mouse data sent multiple times by the sharing device is received by the screen projection device at the same time. In this case, if the screen projection device renders the mouse based on one of the multiple mouse data and discards the other mouse data in the multiple mouse data, the mouse movement on the screen of the screen projection device will be unsmooth. In this case, in order to make the mouse movement on the screen of the screen projection device more natural and smooth. In one example, the screen projection device can cache the multiple mouse data received. For example, the screen projection device can cache the multiple mouse data in a first buffer area. For another example, the screen projection device can cache the multiple mouse data in a certain cache queue. When rendering the mouse, the cached mouse data can be read from the cache in sequence, and the mouse can be rendered based on the read mouse data. For example, the screen projection device can read the mouse data from the cache at a certain frame rate, and render the mouse based on the read mouse data.

[0135] In one example, when rendering a mouse on the screen of a projection device based on mouse data read from a cache, if the mouse data includes a mouse position but does not include a mouse style, the projection device can obtain the cached mouse style, and further render the mouse on the screen of the projection device based on the mouse data (i.e., the mouse position) read from the cache and the cached mouse style. The cached mouse style mentioned here refers to the mouse style used by the projection device to render the mouse last time. In other words, the mouse style used to render the mouse can be cached in the cache (for example, cached in the second cache area) when the projection device renders the mouse last time.

[0136] In one example, when rendering a mouse on the screen of a projection device based on cached mouse data, if the mouse data includes a mouse style but does not include a mouse position, the projection device can obtain the cached mouse position, and further render the mouse on the screen of the projection device based on the mouse data (i.e., mouse style) read from the cache and the cached mouse position. The cached mouse position mentioned here refers to the mouse position used by the projection device to render the mouse last time. In other words, the last time the projection device rendered the mouse, the mouse position used to render the mouse can be cached in the cache (for example, cached in a third cache area).

[0137] In one example, if the mouse position currently used by the projection device to render the mouse is obtained from a cache (for example, the first cache area), it means that the mouse position has changed compared to the last time the mouse was rendered. In this case, the projection device can replace the mouse position stored in the third cache area with the mouse position currently used to render the mouse, so that the next time the mouse is rendered, if the mouse position has not changed but the mouse style has changed, the mouse can be rendered based on the mouse position in the third cache area.

[0138] In addition, in one example, if the mouse style currently used by the projection device to render the mouse is obtained from a cache (for example, the first cache area), it means that the mouse style has changed compared to the last time the mouse was rendered. In this case, the projection device can replace the mouse style stored in the second cache area with the mouse style currently used to render the mouse, so that the next time the mouse is rendered, if the mouse style has not changed but the mouse position has changed, the mouse can be rendered based on the mouse style in the second cache area.

[0139] In one example, after the sharing device sends the mouse data to the screen projection device, the screen projection device receives the mouse data and can send a response to the mouse data to the sharing device. Further, the sharing device can determine the aforementioned second frame rate based on the sent information and the response information.

[0140] The sending information and the receiving information are used to indicate the delay of the shared device sending mouse data to the screen projection device, or the sending information and the receiving information are used to indicate the packet loss situation of the shared device sending mouse data to the screen projection device.

[0141] In one example, when the sending information and the receiving information are used to indicate the delay of the shared device sending mouse data to the screen projection device, the sending information includes: a first timestamp when the shared device sends the mouse data to the screen projection device. The response information includes: a second timestamp when the shared device receives the first response.

[0142] As an example, the shared device may record the first timestamp when sending mouse data to the screen projection device. Correspondingly, the shared device may record the second timestamp when receiving the first response sent by the screen projection device. Based on the second timestamp and the first timestamp, the delay for the shared device to send mouse data to the screen projection device can be calculated. For example, the delay is 0.5×(second timestamp-first timestamp). After calculating the delay, the shared device may determine the aforementioned second frame rate based on the delay. For example, the second frame rate may be the inverse of the delay, or the second frame rate may be slightly less than the inverse of the delay.

[0143] In one example, when the sending information and the receiving information are used to indicate the packet loss situation of mouse data sent by the sharing device to the screen projection device, the sending information includes: the amount of mouse data sent by the sharing device to the screen projection device; the response information includes: the number of responses sent by the screen projection device received by the sharing device.

[0144] In one example, the sharing device may adjust the second frame rate during the interaction with the screen projection device, wherein the initial value of the second frame rate may be, for example, a default value. Specifically:

[0145] The sharing device may send mouse data to the screen projection device at a second frame rate, and then adjust the second frame rate based on the amount of mouse data sent by the sharing device to the screen projection device and the amount of responses sent by the screen projection device received by the sharing device. For example, if the amount of mouse data sent by the sharing device to the screen projection device is greater than the amount of responses sent by the screen projection device received by the sharing device, it means that packet loss has occurred in the mouse data sent by the sharing device to the screen projection device, and the sharing device may reduce the second frame rate. For another example, if the amount of mouse data sent by the sharing device to the screen projection device is equal to the amount of responses sent by the screen projection device received by the sharing device, it means that packet loss has not occurred in the mouse data sent by the sharing device to the screen projection device, and the sharing device may increase the second frame rate or keep the second frame rate unchanged.

[0146] Exemplary Devices

[0147] Based on the method provided in the above embodiment, the embodiment of the present application further provides a device, which is described below in conjunction with the accompanying drawings.

[0148] See also Figure 3 , which is a schematic diagram of the structure of a screen projection device provided in an embodiment of the present application. The device 300 can be applied to a shared device, and the device 300 can specifically include: a first collection unit 301, a second collection unit 302 and a first sending unit 303.

[0149] A first acquisition unit 301 is used to acquire screen stream data at a first frame rate;

[0150] A second acquisition unit 302, configured to acquire mouse data at a second frame rate;

[0151] The first sending unit 303 is used to send the screen flow data and the mouse data to the screen projection device respectively, so that the screen projection device renders the screen projection interface based on the screen flow data and the mouse data.

[0152] Optionally, the device further comprises:

[0153] A second sending unit, configured to send a screen projection request to the screen projection device in response to a screen projection operation triggered by a user;

[0154] The first receiving unit is used to receive indication information sent by the screen projection device in response to the screen projection request, where the indication information is used to indicate that the screen projection device supports separate reception of mouse data.

[0155] Optionally, the content displayed on the screen of the shared device is projected onto multiple projection devices for display, and the multiple projection devices all support separate reception of mouse data.

[0156] Optionally, collecting mouse data includes:

[0157] In response to detecting that a feature of a mouse on the screen of the shared device changes, the mouse data is acquired, wherein the feature of the mouse includes: a mouse position and / or a mouse style.

[0158] Optionally, when the position of the mouse changes and the style of the mouse does not change, the characteristics of the mouse include the mouse position but do not include the mouse style.

[0159] Optionally, when the position of the mouse changes and the style of the mouse changes, the characteristics of the mouse include the mouse position and the mouse style.

[0160] Optionally, when the position of the mouse does not change and the style of the mouse changes, the characteristics of the mouse include the mouse style but do not include the mouse position.

[0161] Optionally, the device further comprises:

[0162] A second receiving unit, configured to receive a first response sent by the screen projection device in response to the received mouse data;

[0163] A determination unit is used to determine the second frame rate based on the sending information and the response information, wherein the sending information and the receiving information are used to indicate the delay of the shared device sending mouse data to the screen projection device, or the sending information and the receiving information are used to indicate the packet loss situation of the shared device sending mouse data to the screen projection device.

[0164] Optional,

[0165] The sending information includes: the sharing device sending a first timestamp of the mouse data to the screen projection device;

[0166] The response information includes: a second timestamp when the sharing device receives the first response.

[0167] Optional,

[0168] The sending information includes: the amount of mouse data sent by the sharing device to the screen projection device;

[0169] The response information includes: the number of responses sent by the screen projection device and received by the sharing device.

[0170] Optionally, the shared device supports sending mouse data separately.

[0171] Since the device 300 is a device corresponding to the method provided in the above method embodiment, the specific implementation of each unit of the device 300 is based on the same concept as the above method embodiment. Therefore, regarding the specific implementation of each unit of the device 300, you can refer to the description part of the steps performed by the above method embodiment for the shared device, which will not be repeated here.

[0172] See also Figure 4 , which is a schematic diagram of the structure of a screen projection device provided in an embodiment of the present application. The device 400 can be applied to a screen projection device, and the device 400 can specifically include: a first receiving unit 401, a cache unit 402, and a rendering unit 403.

[0173] The first receiving unit 401 is used to receive mouse data sent by a shared device, where the mouse data is mouse data of a mouse displayed on a screen of the shared device, and content displayed on the screen of the shared device is projected onto a screen of the projection device for display;

[0174] A cache unit 402, used for caching the mouse data;

[0175] The rendering unit 403 is used to render the mouse on the screen of the projection device based on the mouse data read from the cache.

[0176] Optionally, the mouse data includes: mouse position and / or mouse style.

[0177] Optionally, when the mouse data does not include the mouse style, the device further includes:

[0178] A first acquisition unit, used for acquiring a cached mouse style;

[0179] The rendering unit 403 is used to:

[0180] Based on the mouse data read from the cache and the cached mouse style, the mouse is rendered on the screen of the screen projection device.

[0181] Optionally, when the mouse data does not include the mouse position, the device further includes:

[0182] A second acquisition unit, used to acquire the cached mouse position;

[0183] The rendering unit 403 is used to:

[0184] Based on the mouse data read from the cache and the cached mouse position, the mouse is rendered on the screen of the screen projection device.

[0185] Optionally, the device further comprises:

[0186] A second receiving unit, configured to receive a screen projection request sent by the sharing device;

[0187] A sending unit is used to send indication information to the sharing device based on the screen projection request, and the indication information is used to indicate that the screen projection device supports separate reception of mouse data.

[0188] Since the device 400 is a device corresponding to the method provided in the above method embodiment, the specific implementation of each unit of the device 400 is the same concept as the above method embodiment. Therefore, regarding the specific implementation of each unit of the device 400, you can refer to the description part of the steps performed by the screen projection device in the above method embodiment, which will not be repeated here.

[0189] An embodiment of the present application provides a device, the device comprising a processor and a memory;

[0190] The processor is used to execute instructions stored in the memory so that the device executes the method performed by the sharing device or the screen projection device as described in any of the above method embodiments.

[0191] An embodiment of the present application provides a computer-readable storage medium, including instructions, wherein the instructions instruct a device to execute any one of the above method embodiments performed by a sharing device or a screen projection device.

[0192] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer executes any one of the above method embodiments performed by a sharing device or a screen projection device.

[0193] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0194] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

[0195] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A screen projection method, characterized in that: Applied to a shared device, the shared device supports sending mouse data separately, the method comprises: In response to a screen projection operation triggered by a user, a screen projection request is sent to a screen projection device; Receiving indication information sent by the screen projection device in response to the screen projection request, wherein the indication information is used to indicate that the screen projection device supports separate reception of mouse data; Determining whether the screen flow data has changed according to a certain sampling interval, and if it is determined that the screen flow data has changed, collecting the screen flow data at a first frame rate; collecting mouse data at a second frame rate; Sending the screen stream data and the mouse data to a screen projection device respectively, so that the screen projection device renders a screen projection interface based on the screen stream data and the mouse data; The second frame rate is determined by: Receiving a first response sent by the screen projection device in response to the received mouse data; The second frame rate is determined based on the sending information and the response information, wherein the sending information and the response information are used to indicate the delay for the sharing device to send mouse data to the screen projection device.

2. The method according to claim 1, characterized in that The content displayed on the screen of the shared device is projected onto multiple projection devices for display, and each of the multiple projection devices supports receiving mouse data separately.

3. The method according to claim 1, characterized in that The collecting of mouse data comprises: In response to detecting that a feature of a mouse on the screen of the shared device changes, the mouse data is acquired, wherein the feature of the mouse includes: a mouse position and / or a mouse style.

4. The method according to claim 3, characterized in that In a case where the position of the mouse changes and the style of the mouse does not change, the characteristics of the mouse include the position of the mouse but do not include the style of the mouse.

5. The method according to claim 3, characterized in that: In the case that the position of the mouse changes and the style of the mouse changes, the characteristics of the mouse include the mouse position and the mouse style.

6. The method according to claim 3, characterized in that In a case where the position of the mouse does not change and the style of the mouse changes, the characteristics of the mouse include the mouse style but do not include the mouse position.

7. The method according to claim 1, characterized in that The sending information includes: the sharing device sending a first timestamp of the mouse data to the screen projection device; The response information includes: a second timestamp when the sharing device receives the first response.

8. A method for processing mouse data based on screen projection, characterized in that: Applied to a screen projection device, the method includes: After the user triggers the screen projection operation on the shared device, a screen projection request sent by the shared device is received, and the shared device supports sending mouse data separately; Sending indication information to the sharing device based on the screen projection request, where the indication information is used to indicate that the screen projection device supports receiving mouse data separately; Receive screen stream data and mouse data sent by a sharing device, wherein the mouse data is mouse data of a mouse displayed on a screen of the sharing device, and the content displayed on the screen of the sharing device is projected onto a screen of the projection device for display, and the screen stream data is collected at a first frame rate by the sharing device according to a certain sampling interval to determine whether the screen stream data has changed, and if it is determined that the screen stream data has changed; caching the mouse data; Rendering the screen stream and the mouse on the screen of the screen projection device based on the screen stream data and the mouse data read from the cache; The mouse data is collected by the sharing device at a second frame rate and sent to the screen projection device; The sharing device determines the second frame rate in the following manner: Receiving a first response sent by the screen projection device in response to the received mouse data; The second frame rate is determined based on the sending information and the response information, wherein the sending information and the response information are used to indicate the delay for the sharing device to send mouse data to the screen projection device.

9. The method according to claim 8, characterized in that The mouse data includes: mouse position and / or mouse style.

10. The method according to claim 9, characterized in that In the case where the mouse data does not include the mouse style, the method further includes: Get the cached mouse style; The rendering of the mouse on the screen of the screen projection device based on the mouse data read from the cache includes: Based on the mouse data read from the cache and the cached mouse style, the mouse is rendered on the screen of the screen projection device.

11. The method according to claim 9, characterized in that In the case where the mouse data does not include the mouse position, the method further comprises: Get the cached mouse position; The rendering of the mouse on the screen of the screen projection device based on the mouse data read from the cache includes: Based on the mouse data read from the cache and the cached mouse position, the mouse is rendered on the screen of the screen projection device.

12. A screen projection device, characterized in that: Applied to a shared device, the shared device supports sending mouse data separately, and the device comprises: A second sending unit, configured to send a screen projection request to a screen projection device in response to a screen projection operation triggered by a user; A first receiving unit, configured to receive indication information sent by the screen projection device in response to the screen projection request, wherein the indication information is used to indicate that the screen projection device supports separate reception of mouse data; A first acquisition unit, configured to determine whether the screen stream data has changed according to a certain sampling interval, and if it is determined that the screen stream data has changed, acquire the screen stream data at a first frame rate; A second acquisition unit, used for acquiring mouse data at a second frame rate; A first sending unit, configured to send the screen stream data and the mouse data to a screen projection device respectively, so that the screen projection device renders a screen projection interface based on the screen stream data and the mouse data; The second frame rate is determined by: Receiving a first response sent by the screen projection device in response to the received mouse data; The second frame rate is determined based on the sending information and the response information, and the sending information and the response receiving information are used to indicate the delay of the sharing device sending mouse data to the screen projection device.

13. A mouse data processing device based on screen projection, characterized in that: Applied to a screen projection device, the device comprises: A second receiving unit is used to receive a screen projection request sent by the shared device after the user triggers the screen projection operation on the shared device, and the shared device supports sending mouse data separately; A sending unit, configured to send indication information to the sharing device based on the screen projection request, wherein the indication information is used to indicate that the screen projection device supports separate reception of mouse data; A first receiving unit is used to receive screen flow data and mouse data sent by a sharing device, wherein the mouse data is mouse data of a mouse displayed on a screen of the sharing device, and the content displayed on the screen of the sharing device is projected onto the screen of the projection device for display, and the screen flow data is determined by the sharing device at a certain sampling interval to determine whether the screen flow data has changed, and when it is determined that the screen flow data has changed, the screen flow data is collected at a first frame rate; A cache unit, used for caching the mouse data; A rendering unit, configured to render the screen stream and the mouse on the screen of the screen projection device based on the screen stream data and the mouse data read from the cache; The mouse data is collected by the sharing device at a second frame rate and sent to the screen projection device; The sharing device determines the second frame rate in the following manner: Receiving a first response sent by the screen projection device in response to the received mouse data; The second frame rate is determined based on the sending information and the response information, wherein the sending information and the response information are used to indicate the delay for the sharing device to send mouse data to the screen projection device.

14. An electronic device, characterized in that: The electronic device comprises a processor and a memory; The processor is configured to execute instructions stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 11.

15. A computer-readable storage medium, characterized in that: The method comprises instructions for instructing a device to execute the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Method and device for multi-screen interaction

    CN106155606A

  • Wireless screen projection data processing method and device, video data display method and device, and electronic device

    CN106375841A

  • Transmission control method and system for screen projection and readable memory medium

    CN107317655A

  • Screen projection method and equipment

    CN110519632A

  • Video frame transmission method and device, electronic equipment and readable storage medium

    CN111541919A