Screen projection method and device, equipment and storage medium
By scaling down the image on the virtual screen at the screen casting initiator and sending it according to the low bitrate high-definition strategy of the screen casting receiver, the problem of screen stuttering at the screen casting receiver is solved, low bitrate screen casting is achieved, and the smoothness of the image and network efficiency are improved.
Patent Information
- Application Number
- CN202410660723.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2025-11-25
AI Technical Summary
During screen mirroring, poor network conditions caused screen stuttering on the receiving end.
When synthesizing the image on the virtual screen of the screen casting initiator, the image to be cast is reduced according to the scaling factor related to the low bitrate high-definition strategy corresponding to the screen casting receiver, and the target image is sent to the screen casting receiver to achieve low bitrate screen casting.
It reduces the buffering and loading time of the screen mirroring receiver, improves the smoothness of the screen and reduces the network load.
Smart Images

Figure CN121012953A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic devices, and in particular to a screen projection method, device, apparatus and storage medium. BACKGROUND
[0002] Screen projection refers to real-time display of a picture on one device (a screen projection initiator) on another device (a screen projection receiver). At present, in the screen projection process, screen projection receivers often experience picture lag due to poor network. SUMMARY
[0003] Embodiments of the present application provide a screen projection method, device, apparatus and storage medium, which can improve picture fluency on a screen projection receiver.
[0004] A first aspect of embodiments of the present application provides a screen projection method, which is applicable to a screen projection initiator, and the method comprises:
[0005] determining a scaling factor corresponding to a picture to be projected on a physical display screen of the screen projection initiator, the scaling factor being related to a low-code high-definition policy corresponding to the screen projection receiver connected to the screen projection initiator;
[0006] when synthesizing a picture on a virtual screen of the screen projection initiator, reducing the picture to be projected according to the scaling factor to obtain a target picture on the virtual screen;
[0007] sending the target picture to the screen projection receiver, so that the screen projection receiver displays the target picture when receiving the target picture.
[0008] A second aspect of embodiments of the present application provides a screen projection method, which is applicable to a screen projection receiver, and the method comprises:
[0009] receiving a target picture sent by a screen projection initiator connected to the screen projection receiver, the target picture being a picture on a virtual screen of the screen projection initiator, the target picture being obtained by the screen projection initiator reducing a picture to be projected on a physical display screen of the screen projection initiator according to a scaling factor corresponding to the picture to be projected, when synthesizing a picture on the virtual screen, the scaling factor being related to a low-code high-definition policy corresponding to the screen projection receiver;
[0010] displaying the target picture.
[0011] A third aspect of embodiments of the present application provides a screen projection device, which is on a screen projection initiator, and the device comprises:
[0012] determining a scaling factor corresponding to a to-be-cast picture on a physical display screen of the casting initiator, the scaling factor being related to a low-code high-definition policy corresponding to the casting receiver connected to the casting initiator;
[0013] scaling the to-be-cast picture according to the scaling factor to obtain a target picture on the virtual screen when synthesizing the picture on the virtual screen of the casting initiator;
[0014] sending the target picture to the casting receiver, so that the casting receiver displays the target picture when receiving the target picture.
[0015] The fourth aspect of the embodiment of the present application provides a casting device, the casting device being on a casting receiver, and the device comprising:
[0016] receiving a target picture sent by a casting initiator connected to the casting receiver, the target picture being a picture on a virtual screen of the casting initiator, the target picture being obtained by the casting initiator by reducing a to-be-cast picture on a physical display screen of the casting initiator according to a scaling factor corresponding to the to-be-cast picture, when synthesizing the picture on the virtual screen, the scaling factor being related to a low-code high-definition policy corresponding to the casting receiver;
[0017] outputting the target picture.
[0018] The fifth aspect of the embodiment of the present application provides an electronic device,
[0019] a memory storing executable program codes;
[0020] and a processor coupled to the memory;
[0021] The processor invokes the executable program codes stored in the memory, and the executable program codes are executed by the processor to make the processor implement the method disclosed in the first aspect or the second aspect of the embodiment of the present application.
[0022] The sixth aspect of the embodiment of the present application provides a computer readable storage medium, which stores executable program codes, and the executable program codes are executed by a processor to implement the method disclosed in the first aspect or the second aspect of the embodiment of the present application.
[0023] The seventh aspect of the embodiment of the present application discloses a computer program product, when the computer program product runs on a computer, the computer program product makes the computer execute the method disclosed in the first aspect or the second aspect of the embodiment of the present application.
[0024] The eighth aspect of the embodiments of the present application discloses an application publishing platform, which is used for publishing a computer program product. When the computer program product runs on a computer, the computer is caused to execute the method disclosed in the first aspect or the second aspect of the embodiments of the present application.
[0025] From the above technical solutions, the embodiments of the present application have the following advantages:
[0026] In the embodiments of the present application, a scaling factor corresponding to a to-be-screened picture on a physical display screen of a screen projection initiating end is determined, and the scaling factor is related to a low-code high-definition policy corresponding to a screen projection receiving end connected to the screen projection initiating end. When picture synthesis is performed on a virtual screen of the screen projection initiating end, the to-be-screened picture is reduced according to the scaling factor to obtain a target picture on the virtual screen of the screen projection initiating end. The target picture is sent to the screen projection receiving end, so that the screen projection receiving end displays the target picture when the target picture is received.
[0027] By implementing the method, when picture synthesis is performed on the virtual screen of the screen projection initiating end, the to-be-screened picture on the physical display screen of the screen projection initiating end is reduced according to the scaling factor related to the low-code high-definition policy corresponding to the screen projection receiving end to obtain a target picture with fewer pixel points, and the target picture is sent to the screen projection receiving end, thereby realizing low-code rate screen projection, reducing buffer time and loading waiting time of the screen projection receiving end, and thus improving picture fluency on the screen projection receiving end. In addition, low-code rate screen projection is also conducive to reducing network load. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments and the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained from these drawings.
[0029] Figure 1 is a scenario diagram of the screen projection method disclosed by the embodiments of the present application;
[0030] Figure 2 is a flowchart of the screen projection method disclosed by the embodiments of the present application;
[0031] Figure 3 is another flowchart of the screen projection method disclosed by the embodiments of the present application;
[0032] Figure 4 is still another flowchart of the screen projection method disclosed by the embodiments of the present application;
[0033] Figure 5 is a structural diagram of the screen projection device disclosed by the embodiments of the present application;
[0034] Figure 6 is another structural diagram of the screen projection device disclosed by the embodiment of the present application;
[0035] Figure 7 is a structural diagram of a screen projection initiator disclosed by the embodiment of the present application;
[0036] Figure 8 is a structural diagram of a screen projection receiver disclosed by the embodiment of the present application. DETAILED DESCRIPTION
[0037] The embodiment of the present application provides a screen projection method, device, equipment and storage medium, which can improve the picture fluency on the screen projection receiver.
[0038] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all should belong to the scope of protection of the present application.
[0039] It should be noted that, in the present application, the words such as "exemplarily" or "for example" are used to represent as an example, illustration or explanation. Any embodiment or design scheme described as "exemplarily" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. In fact, the words such as "exemplarily" or "for example" are intended to present the relevant concept in a specific way.
[0040] "at least one" means one or more, "multiple" means two or more. "And / or" describes the association between the associated objects, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the following situations: A exists alone, A and B exist together, B exists alone, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b and c, which can represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
[0041] With the development of screen projection technology, screen projection scenarios are becoming more and more common. For example, as shown in FIG. 1, it is an example of a screen projection scenario. As shown in FIG. 2, it is another example of a screen projection scenario. Figure 1 Figure 1 The illustrated scenario includes a screen projection initiator 10 and a screen projection receiver 20. Using screen projection technology, the display screen of the screen projection initiator 10 can be displayed in real time on the display screen of the screen projection receiver 20. The screen projection initiator 10 can be a small-screen terminal such as a mobile phone or a wearable device, and the screen projection receiver 20 can be a large-screen terminal such as a television or an outdoor display, so as to realize screen projection from a small-screen terminal to a large-screen terminal. Of course, the screen projection initiator 10 can also be a large-screen terminal such as a television or an outdoor display, and the screen projection receiver 20 can be a small-screen terminal such as a mobile phone or a wearable device, so as to realize screen projection from a large-screen terminal to a small-screen terminal.
[0042] The screen projection initiator 10 and the screen projection receiver 20 can be connected wirelessly or by wire, which is not limited in the embodiments of the present application. The wired connection means that the screen projection initiator 10 and the screen projection receiver 20 are connected by a cable. The wireless connection means that the screen projection initiator 10 and the screen projection receiver 20 are connected wirelessly through a certain technical protocol, such as the Airplay screen mirroring of Apple, the Miracast protocol of the WIFI Alliance, DLNA push, etc.
[0043] It should be understood that Figure 1 The illustrated scenario is only an example and is not a limitation on the application scenarios involved in the scheme of the present application. It can be understood that more screen projection receivers 20 can be included in the screen projection scenario to realize one-to-many screen projection. For example, multiple screen projection receivers 20 receive the same display screen sent by the screen projection initiator 10, and the screens displayed by the multiple screen projection receivers 20 are the same. For another example, multiple screen projection receivers 20 receive different parts of the display screen of the screen projection initiator 10 respectively, and the screens displayed by the multiple screen projection receivers 20 are spliced together to form the display screen of the screen projection initiator 10.
[0044] In practice, it is found that in the current screen projection process, the display screen of the screen projection initiator 10 may take a long time to reach the screen projection receiver 20 due to poor network, thereby causing the screen projection receiver 20 to have screen lag.
[0045] To solve this problem, the present application discloses a screen projection method. In the screen projection method, the screen projection initiator 10 or a functional module in the screen projection initiator 10 for implementing the screen projection method provided by the present application can reduce the screen to be projected on the physical display screen of the screen projection initiator 10 according to a scaling factor related to a low-code high-definition strategy corresponding to the screen projection receiver 20 when performing screen synthesis on the virtual screen of the screen projection initiator, to obtain a target screen with fewer pixel points, and send the target screen to the screen projection receiver 20, thereby realizing low-code screen projection, reducing the buffering time and loading waiting time of the screen projection receiver 20, and thereby improving the smoothness of the screen on the screen projection receiver 20.
[0046] The following embodiments mainly apply the technical solutions of the present application to Figure 1 The application scenarios shown in the following embodiments are taken as examples to illustrate the technical solutions of the present application.
[0047] Please refer to Figure 2 , Figure 2 is a flowchart of the screen projection method disclosed in the embodiments of the present application. As Figure 2 The screen projection method can include the following steps:
[0048] 210, the screen projection initiator determines a scaling factor corresponding to the to-be-projected picture on the physical display screen of the screen projection initiator, and the scaling factor is related to a low-code high-definition strategy corresponding to the screen projection receiver connected to the screen projection initiator.
[0049] In the embodiments of the present application, the to-be-projected picture refers to part or all of the picture displayed on the physical display screen of the screen projection initiator, which is not limited in the embodiments of the present application.
[0050] The low-code high-definition strategy corresponding to the screen projection receiver is the basis for the screen projection initiator to realize low-code rate screen projection, and is also the basis for the screen projection receiver to process the received picture by super-resolution.
[0051] In some embodiments, the above-mentioned scaling factor can also be related to the size of the physical display screen of the screen projection receiver, and the embodiments of the present application mainly introduce the case that the above-mentioned scaling factor is related to the size of the physical display screen of the screen projection receiver and the low-code high-definition strategy corresponding to the screen projection receiver.
[0052] The low-code high-definition strategy corresponding to the screen projection receiver can refer to the only one low-code high-definition strategy supported by the screen projection receiver, or can refer to any one of the multiple low-code high-definition strategies supported by the screen projection receiver, for example, the low-code high-definition strategy corresponding to the screen projection receiver is the low-code high-definition strategy used by the screen projection receiver and the screen projection initiator during the last screen projection connection, for another example, the low-code high-definition strategy corresponding to the screen projection receiver is one low-code high-definition strategy selected by the screen projection initiator from the multiple low-code high-definition strategies supported by the screen projection receiver, for another example, the low-code high-definition strategy corresponding to the screen projection receiver is selected by the screen projection receiver from the multiple low-code high-definition strategies supported by the screen projection receiver, and the selection is informed to the screen projection initiator, which is not limited in the embodiments of the present application.
[0053] The scaling factor corresponding to the to-be-projected picture refers to the reduction ratio of the to-be-projected picture as a whole, which is used to reduce the to-be-projected picture to achieve the purpose of reducing the pixel points of the picture. Wherein, the scaling factor can be inversely proportional to the number of pixel points of the reduced picture, the smaller the scaling factor, the smaller the number of pixel points of the reduced picture.
[0054] In the embodiments of the present application, the scaling factor corresponding to the to-be-screened picture can be pre-stored on the screen initiation end, or can be calculated by the screen initiation end in real time, which is not limited in the embodiments of the present application.
[0055] In the case that the scaling factor corresponding to the to-be-screened picture is pre-stored on the screen initiation end, the manner in which the screen initiation end determines the scaling factor corresponding to the to-be-screened picture can include:
[0056] The screen initiation end acquires the preset scaling factor matched with the low-code high-definition strategy corresponding to the screen receiving end from the strategy relationship table corresponding to the screen receiving end, and determines the preset scaling factor as the scaling factor corresponding to the to-be-screened picture. The strategy relationship table corresponding to the screen receiving end can include the correspondence between the strategy identifier of each low-code high-definition strategy supported by the screen receiving end and the preset scaling factor.
[0057] The strategy identifier is used to uniquely identify a low-code high-definition strategy, and can include but is not limited to at least one of the following: a number, a letter and a special character.
[0058] For example, the strategy relationship table corresponding to the screen receiving end can refer to Table 1 as follows:
[0059]
[0060]
[0061] It can be understood that the low-code high-definition strategies supported by the screen receiving end include strategy 1 and strategy 2, wherein the preset scaling factor corresponding to the strategy 1 is a, and the preset scaling factor corresponding to the strategy 2 is b.
[0062] It should be understood that the screen initiation end can store at least one strategy relationship table corresponding to the screen receiving end. Each of the at least one screen receiving end has established a screen connection with the screen initiation end. The preset scaling factor in the corresponding strategy relationship table is calculated by the screen initiation end in the process of establishing the screen connection with the corresponding screen receiving end, and is stored.
[0063] It should be noted that the calculation process of the preset scaling factor can refer to the description in the following Figure 3 embodiment, which will not be repeated here.
[0064] By implementing the method, the scaling factor can be quickly determined based on the strategy relationship table corresponding to the screen receiving end, which is conducive to improving the screen efficiency.
[0065] It should be noted that the scaling factor corresponding to the to-be-screened picture is calculated by the screen initiation end in real time, which will be described in the following Figure 3The embodiments are described in detail.
[0066] In some embodiments, the low-code high-definition strategy corresponding to the screen projection receiving end can be pre-stored on the screen projection initiating end, or can be determined by the screen projection initiating end in real time, which is not limited in the embodiments of the present application.
[0067] In the embodiments of the present application, the case that the low-code high-definition strategy corresponding to the screen projection receiving end is determined by the screen projection initiating end in real time can include but is not limited to the following examples:
[0068] Example 1: The low-code high-definition strategy supported by the screen projection receiving end is one, the screen projection receiving end can inform the screen projection initiating end of the low-code high-definition strategy, and the screen projection initiating end takes the low-code high-definition strategy as the low-code high-definition strategy corresponding to the screen projection receiving end.
[0069] Example 2: The low-code high-definition strategy supported by the screen projection receiving end is multiple, the screen projection receiving end informs the screen projection initiating end of the multiple low-code high-definition strategies supported by the screen projection receiving end, and the screen projection initiating end selects one from the multiple low-code high-definition strategies supported by the screen projection receiving end as the low-code high-definition strategy corresponding to the screen projection receiving end.
[0070] Example 3: The low-code high-definition strategy supported by the screen projection receiving end is multiple, the screen projection receiving end can select one from the multiple low-code high-definition strategies supported by the screen projection receiving end as the low-code high-definition strategy corresponding to the screen projection receiving end, and send the low-code high-definition strategy to the screen projection initiating end.
[0071] The following describes Example 2 in detail:
[0072] If the low-code high-definition strategy supported by the screen projection receiving end is multiple, before step 210, the screen projection initiating end can also determine a target low-code high-definition strategy from the multiple low-code high-definition strategies supported by the screen projection receiving end, and take the target low-code high-definition strategy as the low-code high-definition strategy corresponding to the screen projection receiving end.
[0073] In the embodiments of the present application, the screen projection initiating end can receive the policy identifiers of the multiple low-code high-definition strategies supported by the screen projection receiving end sent by the screen projection receiving end, and determine the multiple low-code high-definition strategies supported by the screen projection receiving end according to the policy identifiers.
[0074] In some embodiments, the screen projection initiating end can select a target low-code high-definition strategy from the multiple low-code high-definition strategies supported by the screen projection receiving end based on a selection operation of a user, a current network signal strength, a current power of the screen projection initiating end, etc.
[0075] The selection operation of the user can include but is not limited to voice, gesture and touch operations, etc.
[0076] It should be noted that the weaker the current network signal strength is, the smaller the corresponding scaling factor of the low-code high-definition strategy corresponding to the selected screen projection receiving end of the screen projection initiator is, and the smaller the code rate is. The smaller the current power of the screen projection initiator is, the smaller the corresponding scaling factor of the low-code high-definition strategy corresponding to the selected screen projection receiving end of the screen projection initiator is, and the smaller the code rate is.
[0077] It can be understood that when the screen projection initiator selects the low-code high-definition strategy corresponding to the screen projection receiving end according to the current network signal strength, each low-code high-definition strategy in the plurality of low-code high-definition strategies supported by the screen projection receiving end corresponds to a different network signal strength interval. The smaller the value of the corresponding network signal strength interval is, the smaller the scaling factor corresponding to the low-code high-definition strategy is.
[0078] When the screen projection initiator selects the low-code high-definition strategy corresponding to the screen projection receiving end according to the current power of the screen projection initiator, each low-code high-definition strategy in the plurality of low-code high-definition strategies supported by the screen projection receiving end corresponds to a different power interval. The smaller the value of the corresponding power interval is, the smaller the scaling factor corresponding to the low-code high-definition strategy is.
[0079] In the above example 3, the selection of the low-code high-definition strategy by the screen projection receiving end can also be based on the selection operation of the user, the current power of the screen projection receiving end, or the current network signal strength.
[0080] Among them, the selection based on the selection operation of the user and the current network signal strength is the same as the principle of the above screen projection initiator. But the rule of selecting the low-code high-definition strategy based on the current power of the screen projection receiving end is opposite to the selection rule of the screen projection initiator. The lower the current power of the screen projection receiving end is, the lower the power consumption of data processing needs to be reduced in order to ensure the endurance of the screen projection receiving end, and therefore the larger the scaling factor of the selected low-code high-definition strategy is.
[0081] In some embodiments, in the above example 2, the screen projection initiator can also select a target low-code high-definition strategy from the plurality of low-code high-definition strategies supported by the screen projection receiving end based on the current power of the screen projection initiator and the current power of the screen projection receiving end. In this way, the selected low-code high-definition strategy not only considers the endurance problem of the screen projection receiving end, but also considers the endurance problem of the screen projection initiator.
[0082] By implementing this method, in the case where the low-code high-definition strategy supported by the screen projection receiving end is multiple, the screen projection initiator or the screen projection receiving end supports autonomous selection of the low-code high-definition strategy corresponding to the screen projection receiving end, and flexible control of the code rate during screen projection is realized.
[0083] In some embodiments, when the screen projection initiator is connected with the screen projection receiver, the screen projection initiator can first search for the strategy relationship table corresponding to the screen projection receiver in its storage space. If the strategy relationship table is not found, the low-code high-definition strategy corresponding to the screen projection receiver is calculated in real time. This way of determining the scaling factor based on the strategy relationship table first is beneficial to improving the efficiency of determining the scaling factor, and thus is beneficial to improving the efficiency of screen projection.
[0084] In some embodiments, the screen projection initiator can also detect the current network signal strength, and perform step 210 when the network signal strength is less than or equal to the signal strength threshold.
[0085] It should be understood that when the network signal strength is less than or equal to the signal strength threshold, it means that the screen projection initiator is in a weak network scenario. By implementing this method, the screen projection initiator can perform screen projection at a low code rate when it is detected to be in a weak network scenario, which can reduce the probability of the screen projection receiver freezing.
[0086] In some embodiments, the screen projection initiator can also perform step 210 when the current power is lower than the power threshold. In this way, the screen projection initiator can actively reduce the code stream of the target picture when it is in a low power scenario, which is beneficial to saving the power consumption of the screen projection initiator.
[0087] For example, the power threshold can be 50%, 40%, etc., which is not limited by the embodiments of the present application.
[0088] In some embodiments, when the screen projection receiver is connected with the screen projection initiator, the screen projection receiver can also detect whether it has low-code high-definition capability, and send first information indicating that it has low-code high-definition capability to the screen projection initiator when it has low-code high-definition capability, and send second information indicating that it does not have low-code high-definition capability to the screen projection initiator when it does not have low-code high-definition capability.
[0089] Further, the screen projection initiator requests the low-code high-definition strategy corresponding to the screen projection receiver or the low-code high-definition strategy supported by the screen projection receiver from the screen projection receiver when receiving the first information.
[0090] 220, when the screen projection initiator synthesizes the picture on the virtual screen of the screen projection initiator, the screen projection initiator reduces the to-be-projected picture according to the scaling factor to obtain the target picture on the virtual screen of the screen projection initiator.
[0091] It can be understood that the to-be-projected picture can include a first number of pixel points, and the target picture includes a second number of pixel points, and the second number is less than the first number.
[0092] In some embodiments, the screen projection initiator reduces the to-be-projected picture according to the scaling factor to obtain the target picture can include:
[0093] The screen projection initiator samples the pixel points in the to-be-projected picture according to the scaling factor to obtain sample pixel points; the number of the sample pixel points is less than the number of the pixel points in the to-be-projected picture.
[0094] The sample pixel points are processed by using a preset interpolation algorithm to obtain a target picture.
[0095] The preset interpolation algorithm can include, but is not limited to, any one of the following: a nearest neighbor interpolation algorithm, a bilinear interpolation algorithm, and a bicubic interpolation algorithm.
[0096] 230. The screen projection initiator sends the target picture to the screen projection receiver.
[0097] Correspondingly, the screen projection receiver can receive the target picture sent by the screen projection initiator and perform step 240. The screen projection initiator can send the target picture to the screen projection receiver through a wireless / wired screen projection link.
[0098] When the screen projection initiator has both wired screen projection capability and wireless screen projection capability, the screen projection initiator can detect the current power, establish a wireless screen projection link with the screen projection receiver when the current power is greater than a power threshold, and establish a wired screen projection link with the screen projection receiver when the current power is less than or equal to the power threshold. This power-based screen projection link selection method can make the screen projection more flexible.
[0099] It should be understood that the screen projection initiator can encode the data corresponding to the target picture and send the encoded data to the screen projection receiver. When the screen projection receiver receives the encoded data, it decodes the data to obtain the target picture.
[0100] It should be noted that when the display picture of the screen projection initiator is a video frame picture, the screen projection initiator can use an audio codec (CCodec) to encode the corresponding audio in addition to using a video codec (MediaCodec) to encode the target picture. Correspondingly, the screen projection receiver needs to use the CCodec to decode the encoded audio data in addition to using the MediaCodec to decode the encoded data corresponding to the target picture after receiving the encoded data corresponding to the target picture.
[0101] In some embodiments, the screen projection initiator can use the H.265 standard to encode the target picture. Correspondingly, the screen projection receiver also uses the H.265 standard to decode the encoded data of the target picture.
[0102] In some embodiments, the encoding of the target picture at the screen projection initiator is in the yuw color space, and correspondingly, the decoding of the encoded data of the target picture at the screen projection receiver is also in the yuw color space.
[0103] 240. The screen projection receiver displays the target picture.
[0104] In the embodiments of the present application, the display of the target picture at the screen projection receiver can mean that the screen projection receiver does not perform super-resolution processing on the target picture and directly displays the target picture, or can mean that the screen projection receiver performs super-resolution processing on the target picture according to the low-code high-definition strategy and displays the target picture after super-resolution processing.
[0105] The number of pixel points of the target picture after super-resolution processing is greater than the number of pixel points of the target picture before super-resolution processing, and therefore, the quality of the target picture after super-resolution processing is better than the quality of the target picture before super-resolution processing.
[0106] It can be understood that, in the case that the low-code high-definition strategy supported by the screen projection receiver is multiple and the low-code high-definition strategy corresponding to the screen projection receiver is selected by the screen projection initiator, the screen projection initiator also needs to inform the screen projection receiver of the low-code high-definition strategy selected from the multiple low-code high-definition strategies supported by the screen projection receiver, so that the screen projection receiver performs super-resolution processing on the target picture according to the low-code high-definition strategy.
[0107] In some embodiments, the super-resolution processing of the target picture at the screen projection receiver according to the low-code high-definition strategy can include:
[0108] The screen projection receiver can use a super-resolution model matched with the low-code high-definition strategy to perform interpolation and reconstruction processing on the target picture.
[0109] In the embodiments shown in Figure 2 , when the screen projection initiator performs picture synthesis on the virtual screen of the screen projection initiator, the screen projection initiator reduces the picture to be projected on the physical display screen of the screen projection initiator according to the scaling factor related to the low-code high-definition strategy corresponding to the screen projection receiver, to obtain a target picture with fewer pixel points, and sends the target picture to the screen projection receiver, thereby realizing low-code rate projection, reducing the buffering time and loading waiting time of the screen projection receiver, and thereby improving the picture fluency on the screen projection receiver. In addition, low-code rate projection is also conducive to reducing network load.
[0110] The following will be described in combination with Figure 3 , the scaling factor is calculated in real time by the screen projection initiator.
[0111] Please refer to Figure 3 , Figure 3 is another flowchart of the screen projection method disclosed in the embodiments of the present application. As Figure 3The illustrated screen projection method can include the following steps:
[0112] 310. The screen projection initiator determines a first canvas corresponding to the virtual screen of the screen projection initiator according to the current encoding resolution of the screen projection initiator and the aspect ratio of the physical display screen of the screen projection receiver.
[0113] The current encoding resolution of the screen projection initiator refers to the actual current encoding resolution of the screen projection initiator. The current encoding resolution of the screen projection initiator can be any encoding resolution supported by the screen projection initiator (e.g., the maximum encoding resolution, the minimum encoding resolution, etc.), which is not limited in the embodiments of the present application.
[0114] In some embodiments, the current encoding resolution of the screen projection initiator can also be determined according to the maximum encoding resolution of the screen projection initiator and the maximum decoding resolution of the screen projection receiver.
[0115] In some embodiments, the current encoding resolution of the screen projection initiator can be the minimum one of the maximum encoding resolution of the screen projection initiator and the maximum decoding resolution of the screen projection receiver, which can avoid encoding and decoding errors.
[0116] For example, the maximum encoding resolution of the screen projection initiator is 4000*4000, and the maximum decoding resolution of the screen projection receiver is 1920*1080, wherein 1920*1080 is less than 4000*4000, so the current encoding resolution of the screen projection initiator is 1920*1080.
[0117] In some embodiments, the screen projection initiator determines the first canvas corresponding to the virtual screen of the screen projection initiator according to the current encoding resolution of the screen projection initiator and the aspect ratio of the physical display screen of the screen projection receiver, which can include:
[0118] The screen projection initiator obtains the width value of the first canvas corresponding to the virtual screen of the screen projection initiator by multiplying the resolution in the vertical direction of the current encoding resolution of the screen projection initiator by the aspect ratio of the physical display screen of the screen projection receiver, and takes the resolution in the vertical direction of the current encoding resolution of the screen projection initiator as the height value of the first canvas.
[0119] The aspect ratio of the physical display screen of the screen projection receiver is the ratio of the width value of the physical display screen of the screen projection receiver to the height value of the physical display screen of the screen projection receiver. It should be understood that the aspect ratio of the first canvas is consistent with the aspect ratio of the physical display screen of the screen projection receiver.
[0120] In some embodiments, before step 310, the screen projection receiver can also send the maximum decoding resolution of the screen projection receiver, the width value and the height value of the physical display screen of the screen projection receiver to the screen projection initiator.
[0121] 320、The screen projection initiator reduces the size of the first canvas to obtain a second canvas according to the low-code high-definition strategy corresponding to the screen projection receiver.
[0122] The canvas (such as the first canvas and the second canvas described above) refers to a region on the virtual screen of the screen projection initiator for drawing and editing an image.
[0123] The manner in which the screen projection initiator obtains the low-code high-definition strategy corresponding to the screen projection receiver can be referred to the corresponding description in the embodiments shown in Figure 2 and will not be described here again.
[0124] The low-code high-definition strategy can be associated with a reduction multiple corresponding to the first canvas. The screen projection initiator can reduce the height value and the width value of the first canvas to obtain the second canvas according to the reduction multiple corresponding to the low-code high-definition strategy corresponding to the screen projection receiver.
[0125] For example, the reduction multiple corresponding to the low-code high-definition strategy is 2 times or 4 times, and the like.
[0126] In some embodiments, after step 320, the screen projection initiator can further send the width value and the height value of the second canvas to the screen projection receiver, and the screen projection receiver can configure a decoder according to the width value and the height value of the second canvas. By implementing this method, the screen projection receiver can pre-configure the decoder according to the width value and the height value of the second canvas, which is beneficial to improve the decoding efficiency.
[0127] In some embodiments, the screen projection receiver can further determine a super-resolution model matched with the low-code high-definition strategy corresponding to the screen projection receiver. By implementing this method, the screen projection receiver can pre-determine the super-resolution model, which is beneficial to improve the efficiency of super-resolution processing.
[0128] In the case of multiple low-code high-definition strategies corresponding to the screen projection receiver, the screen projection initiator can further send a strategy identifier of a target low-code high-definition strategy selected by the screen projection initiator to the screen projection receiver, and the screen projection receiver can determine a super-resolution model matched with the strategy identifier when the strategy identifier of the target low-code high-definition strategy is received.
[0129] 330、The screen projection initiator determines a scaling factor corresponding to a to-be-projected picture on a physical display screen of the screen projection initiator according to the size information of the second canvas and the size information of the virtual screen.
[0130] In the embodiments of the present application, the width-to-height ratio of the virtual screen is consistent with the width-to-height ratio of the screen projection receiver.
[0131] In some embodiments, the size of the virtual screen can be the size of the physical display screen of the screen mirroring receiving end, or can be the size after performing dots per inch (DPI) smoothing on the size of the physical display screen of the screen mirroring receiving end, and the embodiments of the present application are not limited thereto.
[0132] In the case where the size of the virtual screen is the size after performing DPI smoothing on the size of the physical display screen of the screen mirroring receiving end, the calculation process of the size of the virtual screen can include the following steps:
[0133] calculating the ratio of the DPI of the physical display screen of the screen mirroring initiating end to the DPI of the physical display screen of the screen mirroring receiving end;
[0134] determining the width value of the virtual screen according to the ratio and the width value of the physical display screen of the screen mirroring receiving end, and determining the height value of the virtual screen according to the ratio and the height value of the physical display screen of the screen mirroring receiving end.
[0135] The ratio refers to the DPI of the physical display screen of the screen mirroring initiating end / DPI of the physical display screen of the screen mirroring receiving end.
[0136] By implementing the method, by performing DPI smoothing on the size of the physical display screen of the screen mirroring receiving end to obtain the size of the virtual screen, the probability of display disorder and incomplete display of the virtual screen can be reduced.
[0137] In some embodiments, the size information of the second canvas can include the height value or the width value of the second canvas.
[0138] When the size information of the second canvas includes the height value of the second canvas, the size information of the virtual screen can include the height value of the virtual screen, and the scaling factor corresponding to the screen mirroring picture is obtained by dividing the height value of the second canvas by the height value of the virtual screen.
[0139] When the size information of the second canvas includes the width value of the second canvas, the size information of the virtual screen can include the width value of the virtual screen, and the scaling factor corresponding to the screen mirroring picture is obtained by dividing the width value of the second canvas by the width value of the virtual screen.
[0140] 340、When the screen mirroring initiating end synthesizes a picture on the virtual screen of the screen mirroring initiating end, the screen mirroring initiating end reduces the screen mirroring picture according to the scaling factor to obtain a target picture on the virtual screen.
[0141] In some embodiments, the DPI of the virtual screen is consistent with the DPI of the physical display screen of the screen mirroring initiating end, so that it can be ensured that the picture displayed on the virtual screen will not be disordered.
[0142] It should be noted that since the scaling factor is the width of the second canvas / the width of the virtual screen, or the height of the second canvas / the height of the virtual screen, the size of the target image obtained based on this scaling factor can be the same as the size of the second canvas.
[0143] 350. The screen casting initiator sends the target screen to the screen casting receiver.
[0144] 360. The screen mirroring receiver performs super-resolution processing on the target image according to the above low-bitrate high-definition strategy, and displays the super-resolution target image.
[0145] For a detailed explanation of steps 340-360, please refer to the description of steps 220-240, which will not be repeated here.
[0146] In some embodiments, the interaction between the screen casting initiator and the screen casting receiver can be based on the Real Time Streaming Protocol (RTSP).
[0147] For example, if the resolution of the target image is 360p, and the above low-bitrate high-definition strategy increases the resolution of the target image by a factor of 2, then the resolution of the target image after super-resolution processing is 720p.
[0148] For example, if the resolution of the target image is 360p, and the above low-bitrate high-definition strategy increases the resolution of the target image by a factor of 4, then the resolution of the target image after super-resolution processing is 1440p.
[0149] exist Figure 3 In the illustrated embodiment, when the screen casting initiator performs image composition on its virtual screen, it reduces the size of the image to be cast on the physical display screen of the screen casting initiator according to a scaling factor related to the low-bitrate high-definition strategy corresponding to the screen casting receiver, resulting in a target image with fewer pixels. This target image is then sent to the screen casting receiver, achieving low-bitrate screen casting, reducing the buffering and loading time on the screen casting receiver, thereby improving the smoothness of the image on the screen casting receiver. When the screen casting receiver receives the target image, it can also perform super-resolution processing on the target image according to the aforementioned low-bitrate high-definition strategy to obtain an image with better quality. In summary, through implementation... Figure 3 The method shown can improve the smoothness of the screen on the receiving end while ensuring image quality.
[0150] In addition, Figure 3 In the illustrated embodiment, the screen casting initiator can calculate the scaling factor in real time based on the current encoding resolution of the screen casting initiator, the aspect ratio of the physical display screen of the screen casting receiver, and the size of the virtual screen, which helps to improve the compatibility of screen casting from the screen casting initiator.
[0151] The following will be described in combination with Figure 4 The scaling factor is calculated by the screen projection initiator in real time according to the low-code high-definition strategy of the screen projection receiver.
[0152] Please refer to Figure 4 , Figure 4 is another flowchart of the screen projection method disclosed in the embodiments of the present application. As shown in Figure 4 The screen projection method can include the following steps:
[0153] 410. In the case that the screen projection receiver has low-code high-definition capability, the screen projection receiver sends the policy identifier of the low-code high-definition strategy corresponding to the screen projection receiver, the maximum decoding resolution of the screen projection receiver, and the width value and height value of the physical display screen of the screen projection receiver to the screen projection initiator.
[0154] 420. The screen projection initiator determines the low-code high-definition strategy corresponding to the screen projection receiver according to the policy identifier.
[0155] 430. The screen projection initiator determines the current encoding resolution of the screen projection initiator according to the maximum decoding resolution of the screen projection receiver and the maximum encoding resolution of the screen projection initiator, and obtains a first canvas corresponding to the virtual screen of the screen projection initiator according to the current encoding resolution and the aspect ratio of the physical display screen of the screen projection receiver.
[0156] 440. The screen projection initiator reduces the size of the first canvas to obtain a second canvas according to the low-code high-definition strategy corresponding to the screen projection receiver.
[0157] 450. The screen projection initiator sends the size of the second canvas to the screen projection receiver.
[0158] 460. The screen projection receiver configures a decoder according to the size of the second canvas, and determines a super-resolution model matching the low-code high-definition strategy corresponding to the screen projection receiver.
[0159] 470. The screen projection receiver sends the DPI of the physical display screen of the screen projection receiver to the screen projection initiator.
[0160] 480. The screen projection initiator calculates the ratio of the DPI of the physical display screen of the screen projection initiator to the DPI of the physical display screen of the screen projection receiver.
[0161] 490. The screen projection initiator determines the width value of the virtual screen according to the ratio and the width value of the physical display screen of the screen projection receiver, and determines the height value of the virtual screen according to the ratio and the height value of the physical display screen of the screen projection receiver.
[0162] 4100、The screen projection initiator determines a scaling factor corresponding to the to-be-screen-projected picture on the physical display screen of the screen projection initiator according to the height value of the second canvas and the height value of the virtual screen.
[0163] 4120、When the screen projection initiator synthesizes the picture on the virtual screen of the screen projection initiator, the screen projection initiator reduces the to-be-screen-projected picture according to the scaling factor to obtain a target picture on the virtual screen.
[0164] 4130、The screen projection initiator sends the target picture to the screen projection receiver.
[0165] 4140、The screen projection receiver performs super-resolution processing on the target picture by using a super-resolution model matched with a low-code high-definition strategy corresponding to the screen projection receiver, and displays the target picture after the super-resolution processing.
[0166] It should be noted that the detailed explanation of steps 410-4140 can be referred to the related description in the embodiments shown in FIG. 13, which will not be repeated here. Figure 3
[0167] For example, the maximum decoding resolution of the screen projection receiver is 1920*1080, the maximum encoding resolution of the screen projection initiator is 4000*4000, the size of the physical display screen of the screen projection receiver is 2800*2000, the scaling multiple of the canvas corresponding to the low-code high-definition strategy of the screen projection receiver is 2, the DPI of the physical display screen of the screen projection receiver is 360, and the DPI of the physical display screen of the screen projection initiator is 480.
[0168] Correspondingly, the calculation process of the scaling factor corresponding to the to-be-screen-projected picture is as follows:
[0169] First step: Calculate the current encoding resolution of the screen projection initiator. The current encoding resolution of the screen projection initiator is the minimum one of 1920*1080 and 4000*4000, that is, 1920*1080.
[0170] Second step: Calculate the size of the first canvas. The width value of the first canvas is 1080*1.4=1512, and the height value of the first canvas is 1080.
[0171] Third step: Calculate the size of the second canvas. The width value of the second canvas is 1512 / 2=756, and the height value of the second canvas is 1080 / 2=540.
[0172] Third step: the size of the virtual screen of the screen projection initiator: the ratio of the DPI of the physical display screen of the screen projection initiator to the DPI of the physical display screen of the screen projection receiver = 480 / 360, the size of the physical display screen of the screen projection receiver is 2800*2000, the width value of the virtual screen = 480 / 360*2800 = 3732; the height value of the virtual screen = 480 / 360*2000 = 2666.
[0173] Fourth step: the scaling factor corresponding to the screen projection picture = 540 / 2666 = 0.2026.
[0174] Please refer to Figure 5 , Figure 5 is a structural diagram of the screen projection device disclosed in the embodiments of the present application. As shown in Figure 5 , the screen projection device can be at a screen projection initiator, and as shown in Figure 5 , the screen projection device can include a determination unit 501, a scaling unit 502, and a sending unit 503; wherein:
[0175] The determination unit 501 is configured to determine a scaling factor corresponding to a screen projection picture on a physical display screen of a screen projection initiator, the scaling factor being related to a low-code high-definition policy corresponding to a screen projection receiver connected to the screen projection initiator.
[0176] The scaling unit 502 is configured to, when synthesizing a picture on a virtual screen of the screen projection initiator, reduce the screen projection picture according to the scaling factor to obtain a target picture on the virtual screen.
[0177] The sending unit 503 is configured to send the target picture to the screen projection receiver, so that the screen projection receiver displays the target picture when receiving the target picture.
[0178] In some embodiments, the determination unit 501 can specifically include the following steps in determining the scaling factor corresponding to the screen projection picture on the physical display screen of the screen projection initiator:
[0179] The determination unit 501 is configured to determine a first canvas corresponding to a virtual screen of the screen projection initiator according to a current encoding resolution of the screen projection initiator and an aspect ratio of a physical display screen of the screen projection receiver, reduce the size of the first canvas to obtain a second canvas according to the low-code high-definition policy corresponding to the screen projection receiver, and determine the scaling factor corresponding to the screen projection picture on the physical display screen of the screen projection initiator according to the size information of the second canvas and the size information of the virtual screen.
[0180] In some embodiments, after the determination unit 501 reduces the size of the first canvas to obtain the second canvas according to the low-code high-definition policy corresponding to the screen projection receiver, the determination unit 501 is further configured to send the width value and the height value of the second canvas to the screen projection receiver, so that the screen projection receiver configures a decoder according to the width value and the height value of the second canvas.
[0181] In some embodiments, the determining unit 501 is further configured to, before determining the scaling factor corresponding to the to-be-cast picture on the physical display screen of the casting initiating end, determine the current coding resolution of the casting initiating end according to a maximum coding resolution of the casting initiating end and a maximum decoding resolution of the casting receiving end.
[0182] In some embodiments, the determining unit 501 is further configured to, before determining the size information of the virtual screen according to the size information of the second canvas and the size information of the virtual screen, calculate a ratio of the DPI of the physical display screen of the casting initiating end to the DPI of the physical display screen of the casting receiving end, and determine the width value of the virtual screen according to the ratio and a width value of the physical display screen of the casting receiving end, and determine the height value of the virtual screen according to the ratio and a height value of the physical display screen of the casting receiving end.
[0183] In some embodiments, the DPI of the virtual screen is consistent with the DPI of the physical display screen of the casting initiating end.
[0184] In some embodiments, the determining unit 501 is further configured to, before determining the scaling factor corresponding to the to-be-cast picture on the physical display screen of the casting initiating end, determine a target low-code high-definition strategy from a plurality of low-code high-definition strategies supported by the casting receiving end, and determine the target low-code high-definition strategy as the low-code high-definition strategy corresponding to the casting receiving end.
[0185] In some embodiments, the determining unit 501 is configured to determine the scaling factor corresponding to the to-be-cast picture on the physical display screen of the casting initiating end in the following manner:
[0186] The determining unit 501 is configured to obtain, from a strategy relationship table corresponding to the casting receiving end, a preset scaling factor matched with the low-code high-definition strategy corresponding to the casting receiving end, wherein the strategy relationship table includes a strategy identifier of each low-code high-definition strategy supported by the casting receiving end and a corresponding relationship with the preset scaling factor, and determine the preset scaling factor matched with the low-code high-definition strategy corresponding to the casting receiving end as the scaling factor corresponding to the to-be-cast picture on the physical display screen of the casting initiating end.
[0187] Please refer to Figure 6 , Figure 6 is another structural diagram of the casting device disclosed in the embodiments of the present application. As shown in Figure 6 , the casting device can be in a casting receiving end, and as shown in Figure 6 , the casting device can include a receiving unit 601 and an output unit 602; wherein:
[0188] The receiving unit 601 is configured to receive a target picture sent by a screen projection initiator connected to the screen projection receiving end, the target picture being a picture on a virtual screen of the screen projection initiator, and the target picture being obtained by reducing a to-be-projected picture on a physical display screen of the screen projection initiator according to a scaling factor corresponding to the to-be-projected picture, when the screen projection initiator synthesizes a picture on the virtual screen of the screen projection initiator, the scaling factor being related to a low-code high-definition strategy corresponding to the screen projection receiving end.
[0189] The output unit 602 is configured to display the target picture.
[0190] In some embodiments, the output unit 602 can display the target picture in the following manner:
[0191] The output unit 602 is configured to perform super-resolution processing on the target picture according to the low-code high-definition strategy, and display the target picture after the super-resolution processing.
[0192] Please refer to Figure 7 , Figure 7 is a structural diagram of the screen projection initiator. As shown in Figure 7 , the screen projection initiator can include a processor 701, a memory 702, a display unit 703, an input unit 704, a sensor 705, an audio circuit 706, and the like.
[0193] The processor 701 is the control center of the screen projection initiator, and is connected to various parts of the screen projection initiator through various interfaces and lines. The processor 701 executes various functions of the screen projection initiator and processes data by running or executing software programs and / or modules stored in the memory 702, and calling data stored in the memory 702, thereby overall monitoring the screen projection initiator. Optionally, the processor 701 can include one or more processing units. Optionally, the processor 701 can include an application processor, which mainly processes operation devices, user interfaces, and application programs, and can also include other processors, which are not listed here.
[0194] The memory 702 can be used to store software programs and modules. The processor 701 executes various functions of the screen projection initiator and processes data by running the software programs and modules stored in the memory 702. The memory 702 can mainly include a program storage area and a data storage area. The program storage area can store application programs required by at least one function (such as a sound playing function, an image playing function, and the like), and the like. The data storage area can store data created according to the use of the screen projection initiator (such as audio data, a phonebook, and the like), and the like. In addition, the memory 702 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device.
[0195] The display unit 703 can be used to display information input by a user or information provided to the user, and various menus of the screen projection initiator. The display unit 703 can include a display panel, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, a touch panel can cover the display panel, and when the touch panel detects a touch operation thereon or adjacent thereto, it transmits to the processor 701 to determine the type of the touch event, and then the processor 701 provides corresponding visual output on the display panel according to the type of the touch event. The touch panel and the display panel are not shown above. The touch panel and the display panel can be implemented as two independent components to realize the input and output functions of the screen projection initiator, or the touch panel and the display panel can be integrated to realize the input and output functions of the screen projection initiator. Figure 7 The display unit 703 can be used to display information input by a user or information provided to the user, and various menus of the screen projection initiator. The display unit 703 can include a display panel, which can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, a touch panel can cover the display panel, and when the touch panel detects a touch operation thereon or adjacent thereto, it transmits to the processor 701 to determine the type of the touch event, and then the processor 701 provides corresponding visual output on the display panel according to the type of the touch event. The touch panel and the display panel are not shown above. The touch panel and the display panel can be implemented as two independent components to realize the input and output functions of the screen projection initiator, or the touch panel and the display panel can be integrated to realize the input and output functions of the screen projection initiator.
[0196] The input unit 704 can be used to receive input digital or character information, and generate key signal input related to user settings and function control of the screen projection initiator. Specifically, the input unit 704 can include a touch panel and other input devices. The touch panel, also known as a touch screen, can collect touch operations of a user thereon or adjacent thereto (such as the user's operation on or adjacent to the touch panel using a finger, a stylus, or any suitable object or accessory), and drive the corresponding connection device according to the pre-set program. In addition, the touch panel can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel, the input unit 704 can also include other input devices. Specifically, the other input devices can include one or more of a function key (such as a volume control button, an on-off button, etc.), a trackball, a joystick, and the like.
[0197] The screen projection initiator can also include at least one sensor 705, such as a magnetometer, a gyroscope sensor, a motion sensor, and other sensors. Specifically, the magnetometer is used to determine the orientation of the screen projection initiator, the gyroscope sensor can be used to determine the motion posture of the screen projection initiator, can be used for shooting anti-shake, can be used for navigation, and can be used for motion sensing game scenarios. As one of the motion sensors, the acceleration sensor can detect the size of the acceleration in each direction, and when at rest, it can detect the size and direction of gravity, and can be used for applications such as identifying the posture of the screen projection initiator, switching between horizontal and vertical screens, related games, and magnetometer posture calibration. As for other sensors that the screen projection initiator can also be configured, such as a manometer, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like, they will not be described here.
[0198] The audio circuit 706 can include a speaker and a microphone, and can provide an audio interface between the user and the screen projection initiator. The audio circuit 706 can convert the received audio data into an electrical signal, and transmit the electrical signal to the speaker to convert the electrical signal into a sound signal and output the sound signal. On the other hand, the microphone collects a sound signal, converts the sound signal into an electrical signal, and outputs the electrical signal to the audio circuit 706. The audio circuit 706 converts the electrical signal into audio data, and outputs the audio data to the processor 701 for processing. The processor 701 processes the audio data, and transmits the processed audio data to another device via the video circuit, or stores the processed audio data in the memory 702 for further processing.
[0199] Although not shown, the screen projection initiator can further include a power supply and a camera. Optionally, the camera can be front-facing or rear-facing on the screen projection initiator, and the embodiments of the present application do not limit the camera.
[0200] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the screen projection initiator. In other embodiments of the present application, the screen projection initiator can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0201] In the embodiments of the present application, the processor 701 further has the following functions:
[0202] determining a scaling factor corresponding to a to-be-screened picture on a physical display screen of the screen projection initiator, the scaling factor being related to a low-code high-definition strategy corresponding to a screen projection receiver connected to the screen projection initiator;
[0203] when synthesizing the picture on the virtual screen of the screen projection initiator, reducing the to-be-screened picture according to the scaling factor to obtain a target picture on the virtual screen;
[0204] sending the target picture to the screen projection receiver, so that the screen projection receiver displays the target picture when receiving the target picture.
[0205] In the embodiments of the present application, the processor 701 further has the following functions:
[0206] determining a first canvas corresponding to a virtual screen of the screen projection initiator according to a current encoding resolution of the screen projection initiator and an aspect ratio of a physical display screen of the screen projection receiver;
[0207] reducing the size of the first canvas to obtain a second canvas according to the low-code high-definition strategy corresponding to the screen projection receiver;
[0208] determining a scaling factor corresponding to a to-be-screened picture on a physical display screen of the screen projection initiator according to size information of the second canvas and size information of the virtual screen of the screen projection initiator.
[0209] In the embodiments of the present application, the processor 701 further has the following functions:
[0210] The width value and the height value of the second canvas are sent to the screen projection receiving end, so that the screen projection receiving end configures a decoder according to the width value and the height value of the second canvas.
[0211] In the embodiments of the present application, the processor 701 further has the following functions:
[0212] According to the maximum encoding resolution of the screen projection initiating end and the maximum decoding resolution of the screen projection receiving end, the current encoding resolution of the screen projection initiating end is determined.
[0213] In the embodiments of the present application, the processor 701 further has the following functions:
[0214] The ratio of the DPI of the physical display screen of the screen projection initiating end to the DPI of the physical display screen of the screen projection receiving end is calculated;
[0215] According to the ratio and the width value of the physical display screen of the screen projection receiving end, the width value of the virtual screen is determined, and according to the ratio and the height value of the physical display screen of the screen projection receiving end, the height value of the virtual screen is determined.
[0216] In the embodiments of the present application, the DPI of the virtual screen is consistent with the DPI of the physical display screen of the screen projection initiating end.
[0217] In the embodiments of the present application, the processor 701 further has the following functions:
[0218] From a plurality of low-code high-definition strategies supported by the screen projection receiving end, a target low-code high-definition strategy is determined;
[0219] The target low-code high-definition strategy is taken as the low-code high-definition strategy corresponding to the screen projection receiving end.
[0220] In the embodiments of the present application, the processor 701 further has the following functions:
[0221] From the strategy relationship table corresponding to the screen projection receiving end, a preset scaling factor matched with the low-code high-definition strategy corresponding to the screen projection receiving end is obtained; wherein the strategy relationship table includes the strategy identifier of each low-code high-definition strategy supported by the screen projection receiving end, and the corresponding relationship with the preset scaling factor;
[0222] The preset scaling factor matched with the low-code high-definition strategy corresponding to the screen projection receiving end is determined as the scaling factor corresponding to the screen projection picture on the physical display screen of the screen projection initiating end.
[0223] Please refer to Figure 8 , Figure 8 is a structural diagram of the screen projection receiving end disclosed in the embodiments of the present application. As Figure 8The screen projection initiator shown can include a processor 801 and a memory 802: as for the explanation of the processor 801 and the memory 802, reference can be made to the above description of the processor 701 and the memory 702 of the screen projection receiver, which will not be repeated here. Figure 7 The processor 801 and the memory 802 of the screen projection initiator shown can include other components, which are not limited in the embodiments of the present application.
[0224] It should be understood that the screen projection receiver can also include components similar to the processor 701 and the memory 702 of the screen projection initiator. Figure 7 The screen projection initiator shown can include other components in addition to the processor 701 and the memory 702, which are not limited in the embodiments of the present application.
[0225] In the embodiments of the present application, the processor 801 also has the following functions:
[0226] Receiving a target picture sent by a screen projection initiator connected to the screen projection receiver, the target picture being a picture on a virtual screen of the screen projection initiator; wherein the target picture is obtained by the screen projection initiator reducing a to-be-projected picture on a physical display screen of the screen projection initiator according to a scaling factor corresponding to the to-be-projected picture when the screen projection initiator composites a picture on the virtual screen of the screen projection initiator, the scaling factor being related to a low-code high-definition strategy corresponding to the screen projection receiver;
[0227] Displaying the target picture.
[0228] In the embodiments of the present application, the processor 801 also has the following functions:
[0229] Super-resolution processing the target picture according to the low-code high-definition strategy;
[0230] Displaying the target picture after super-resolution processing.
[0231] The embodiments of the present application disclose a computer readable storage medium, which stores executable program codes, and the executable program codes are executed by a processor to realize the above-mentioned method executed by the screen projection initiator or the screen projection receiver in the embodiments of the present application.
[0232] The embodiments of the present application disclose a chip including a processor and a memory, the memory being used to store code instructions, and the processor being used to run the code instructions to execute the method as described by the screen projection initiator or the screen projection receiver in the embodiments of the present application.
[0233] The embodiments of the present application disclose a computer program product, which, when running on a computer, causes the computer to realize the above-mentioned method executed by the screen projection initiator or the screen projection receiver in the embodiments of the present application.
[0234] The application discloses an application publishing platform for publishing a computer program product, wherein when the computer program product runs on a computer, the computer implements the above-mentioned method executed by a screen projection initiator or a screen projection receiver in the application embodiment.
[0235] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of the application, please refer to the description of the method embodiments of the application.
[0236] It should be understood that the "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiments are included in at least one embodiment of the application. Therefore, "in one embodiment" or "in an embodiment" or "in some embodiments" appearing throughout the specification does not necessarily mean the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the application, the size of the sequence number of each process does not mean the order of execution, and the execution order of each process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the application. The sequence number of the above embodiments of the application is only for description, not representing the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between each embodiment, and the same or similar parts can be referred to each other. For the sake of brevity, this paper will not repeat here.
[0237] The term "and / or" in this paper is only a description of the association relationship of the associated objects, which means that there can be three kinds of relationships, for example, object A and / or object B, which can represent the following three cases: object A exists alone, object A and object B exist together, and object B exists alone.
[0238] It should be noted that in this paper, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the element defined by the sentence "including a" does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0239] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other manners. The embodiments described above are merely exemplary, for example, the division of the modules is only a logical function division, and there can be another division manner for the actual implementation, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the various components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or modules, and can be electrical, mechanical or other forms.
[0240] The modules described above as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules; they can be located in one place or distributed on multiple network units; and some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments.
[0241] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated module can be realized in the form of hardware or hardware plus software functional unit.
[0242] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by a program instructing related hardware, and the aforementioned program can be stored in a computer readable storage medium, and the program executes the steps of the above-mentioned method embodiments when executed; and the aforementioned storage medium includes mobile storage devices, read-only memory (ROM), magnetic discs or optical discs, and various storage media that can store program codes.
[0243] Alternatively, the integrated units of the present application, if implemented in the form of software functional modules and sold or used as independent products, can also be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling an electronic device to execute all or part of the methods described in the embodiments of the present application. The aforementioned storage medium includes mobile storage devices, ROM, magnetic discs or optical discs, and various storage media that can store program codes.
[0244] The methods disclosed in the several method embodiments provided by the present application can be combined arbitrarily without conflict, to obtain new method embodiments.
[0245] The features disclosed in several product embodiments provided by the present application can be arbitrarily combined, without conflict, to obtain new product embodiments.
[0246] The features disclosed in several method or device embodiments provided by the present application can be arbitrarily combined, without conflict, to obtain new method embodiments or device embodiments.
[0247] The above description is merely illustrative of the application, and the scope of the application is not limited thereto. Any variations and modifications of the application, which would occur to those skilled in the art, are to be considered within the scope of the application. Therefore, the scope of the application is to be determined by the claims.
Claims
1. A screen projection method, characterized by, The method is suitable for a screen projection initiator, and the method comprises: determining a scaling factor corresponding to a to-be-screen-projected picture on a physical display screen of the screen projection initiator, the scaling factor being related to a low-code high-definition strategy corresponding to a screen projection receiver connected to the screen projection initiator; when synthesizing a picture on a virtual screen of the screen projection initiator, reducing the to-be-screen-projected picture according to the scaling factor to obtain a target picture on the virtual screen; sending the target picture to the screen projection receiver, so that the screen projection receiver displays the target picture when receiving the target picture.
2. The method of claim 1, wherein, The method further comprises: determining a first canvas corresponding to a virtual screen of the screen projection initiator according to a current encoding resolution of the screen projection initiator and an aspect ratio of a physical display screen of the screen projection receiver; reducing the size of the first canvas to obtain a second canvas according to the low-code high-definition strategy corresponding to the screen projection receiver; determining the scaling factor corresponding to the to-be-screen-projected picture on the physical display screen of the screen projection initiator according to size information of the second canvas and size information of the virtual screen.
3. The method of claim 2, wherein, After the step of reducing the size of the first canvas to obtain a second canvas according to the low-code high-definition strategy corresponding to the screen projection receiver, the method further comprises: sending the width value and the height value of the second canvas to the screen projection receiver, so that the screen projection receiver configures a decoder according to the width value and the height value of the second canvas.
4. The method according to claim 2 or 3, characterized in that, Before the step of determining a first canvas corresponding to a virtual screen of the screen projection initiator according to a current encoding resolution of the screen projection initiator and an aspect ratio of a physical display screen of the screen projection receiver, the method further comprises: determining the current encoding resolution of the screen projection initiator according to a maximum encoding resolution of the screen projection initiator and a maximum decoding resolution of the screen projection receiver.
5. The method according to claim 2 or 3, characterized in that, Before the step of determining the scaling factor corresponding to the to-be-screen-projected picture on the physical display screen of the screen projection initiator according to size information of the second canvas and size information of the virtual screen, the method further comprises: calculating a ratio of a number of pixels per inch (DPI) of the physical display screen of the screen projection initiator to DPI of the physical display screen of the screen projection receiver; determining a width value of the virtual screen according to the ratio and a width value of the physical display screen of the screen projection receiver, and determining a height value of the virtual screen according to the ratio and a height value of the physical display screen of the screen projection receiver.
6. The method according to any one of claims 1 to 3, characterized in that, The DPI of the virtual screen is consistent with the DPI of the physical display screen of the screen projection initiator.
7. The method according to any one of claims 1 to 3, characterized in that, Before the step of determining the scaling factor corresponding to the to-be-screen-projected picture on the physical display screen of the screen projection initiator, the method further comprises: determining a target low-code high-definition strategy from a plurality of low-code high-definition strategies supported by the screen projection receiver; taking the target low-code high-definition strategy as the low-code high-definition strategy corresponding to the screen projection receiver.
8. The method of claim 1, wherein, The step of determining the scaling factor corresponding to the to-be-screen-projected picture on the physical display screen of the screen projection initiator comprises: obtain, from a policy relationship table corresponding to the screen projection receiving end, a preset scaling factor matched with a low-code high-definition policy corresponding to the screen projection receiving end, wherein the policy relationship table includes a policy identifier of each low-code high-definition policy supported by the screen projection receiving end and a corresponding relationship with a preset scaling factor; determine the preset scaling factor matched with the low-code high-definition policy as a scaling factor corresponding to a to-be-projected picture on a physical display screen of the screen projection initiating end.
9. A screen projection method, characterized in that, The method is applicable to a screen projection receiving end, and the method comprises: receiving a target picture sent by a screen projection initiating end connected to the screen projection receiving end, the target picture being a picture on a virtual screen of the screen projection initiating end, the target picture being obtained by the screen projection initiating end by reducing a to-be-projected picture on a physical display screen of the screen projection initiating end according to a scaling factor corresponding to the to-be-projected picture when the screen projection initiating end composites a picture on the virtual screen, the scaling factor being related to a low-code high-definition policy corresponding to the screen projection receiving end; displaying the target picture.
10. The method of claim 9, wherein, The displaying of the target picture comprises: super-resolution processing the target picture according to the low-code high-definition policy; displaying the target picture after the super-resolution processing.
11. A screen projection device, characterized by, The screen projection device is on a screen projection initiating end, and the device comprises: a determination unit configured to determine a scaling factor corresponding to a to-be-projected picture on a physical display screen of the screen projection initiating end, the scaling factor being related to a low-code high-definition policy corresponding to a screen projection receiving end connected to the screen projection initiating end; a scaling unit configured to reduce the to-be-projected picture according to the scaling factor when the screen projection initiating end composites a picture on a virtual screen, to obtain a target picture on the virtual screen; a sending unit configured to send the target picture to the screen projection receiving end, so that the screen projection receiving end displays the target picture when the target picture is received.
12. A screen projection device, characterized in that, The screen projection device is on a screen projection receiving end, and the device comprises: a receiving unit configured to receive a target picture sent by a screen projection initiating end connected to the screen projection receiving end, the target picture being a picture on a virtual screen of the screen projection initiating end, the target picture being obtained by the screen projection initiating end by reducing a to-be-projected picture on a physical display screen of the screen projection initiating end according to a scaling factor corresponding to the to-be-projected picture when the screen projection initiating end composites a picture on the virtual screen, the scaling factor being related to a low-code high-definition policy corresponding to the screen projection receiving end; an output unit configured to display the target picture.
13. An electronic device, comprising: comprise: a memory storing executable program codes; and a processor coupled to the memory; the processor invokes the executable program codes stored in the memory, and the executable program codes, when executed by the processor, cause the processor to implement the method in any one of claims 1-8 or 9-10.
14. A computer-readable storage medium having stored thereon an executable program code, characterized in that, The executable program codes, when executed by the processor, implement the method in any one of claims 1-8 or 9-10.