Screen mirroring method, electronic device, storage medium, and program product
By dynamically adjusting the code rate of the screen projection video, and determining whether to adjust the code rate according to the type weight and switching frequency of the front-end application, the problem of equipment heating and poor user experience during screen projection is solved, and the effect of reducing power consumption and improving user experience is achieved.
Patent Information
- Application Number
- PCT/CN2024/123814
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-30
- Filing Date
- 2024-10-10
- Publication Date
- 2025-06-05
AI Technical Summary
When performing screen projection, a large amount of video stream data is required to encode and transmit a large amount of video stream data, resulting in large power consumption, which can easily lead to heat up the device, and reducing the bit rate to reduce power consumption will affect the clarity and fluency of the screen projection and reduce the user experience.
By dynamically adjusting the code rate of the screen projection video, determine whether to adjust the code rate according to the type weight and switching frequency of the current front-end application. If performed, the content to be cast is encoded and wirelessly cast is performed based on the target code rate. If not performed, the content to be encoded and wirelessly cast is performed based on the original code rate.
On the premise of not affecting the user's subjective experience, dynamically adjust the code rate of the screen projected video, reduce power consumption, extend the time of equipment temperature rise, reduce the probability of equipment abnormality caused by heating, and improve the user experience.
Smart Images

Figure CN2024123814_05062025_PF_FP_ABST
Abstract
Description
Screen projection method, electronic device, storage medium and program product
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on November 30, 2023, with application number 202311654618.5 and application name “Screen projection method, electronic device, storage medium and program product”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of screen projection technology, and specifically to a screen projection method, electronic device, storage medium and program product. Background Art
[0003] With the increase in interactive functions between electronic devices, more and more users are using the screen projection function. For example, when a user uses a mobile phone to play a video, the content on the mobile phone screen can be transmitted to the large-screen TV for playback through the mirror projection function through a wireless connection. However, for mobile phones, screen projection requires encoding and transmitting a large amount of video stream data, which consumes a lot of power and can easily cause the phone to heat up during the projection process. In order to solve the heating problem caused by screen projection, the existing technology monitors the temperature of the mobile phone. If the temperature of the mobile phone is too high during the projection process, the bit rate of the mobile phone projection is reduced to reduce power consumption. However, this will reduce the clarity or smoothness of the projection, thereby reducing the user experience.
[0004] Summary of the Invention
[0005] In view of this, the present application provides a screen projection method, electronic device, storage medium and program product, which can dynamically adjust the bit rate of the projection video without affecting the user's subjective experience as much as possible, so as to improve the user experience.
[0006] In a first aspect, a screen projection method is provided, including: obtaining a first application type weight, the first application type weight being the application type weight corresponding to the current foreground application; determining whether to perform bit rate adjustment based on a bit rate adjustment parameter, the bit rate adjustment parameter including the first application type weight; if so, encoding and wirelessly projecting the content to be projected based on a target bit rate, the target bit rate being lower than the original bit rate of the content to be projected; if not, encoding and wirelessly projecting the content to be projected based on the original bit rate.
[0007] The current foreground application corresponds to the scenario of the content to be projected. If it is a relatively stable scenario, that is, the image continuity is relatively good and the probability of application switching is relatively low, then the application type weight corresponding to this application is relatively high; if it is a scenario with a high degree of complexity, then the application type weight corresponding to this application is relatively high, because the higher the bit rate, the more complex the scenario, and the higher the bit rate, the smaller the impact of reducing the bit rate on the user, that is, the greater the power consumption benefit of bit rate adjustment, so the application type weight corresponding to this application is relatively high. Based on the higher application type weight, it is easier to determine whether to adjust the bit rate. In this scenario, encoding and wireless projection based on the reduced bit rate can reduce power consumption on the one hand, and have less impact on user perception on the other hand. For some application types, there may be unstable or less complex scenarios. In these scenarios, reducing the bit rate has a greater impact on user perception, so it is easier to determine not to adjust the bit rate, that is, to encode and wirelessly project the content to be projected based on the original bit rate. In addition, the screen projection method in the embodiment of the present application does not need to wait until the temperature rises to a threshold value before adjusting the bit rate, but dynamically adjusts the bit rate based on the foreground application type, which can improve the temperature rise of the screen projection source device caused by screen projection, extend the temperature rise time, and reduce the probability of device abnormalities due to heat.
[0008] In a possible implementation, the application type weight corresponding to the video or game application is greater than the application type weight corresponding to other applications.
[0009] In a possible implementation, determining whether to perform rate adjustment according to the rate adjustment parameter includes: if the weight of the first application type is greater than the preset weight, determining to perform rate adjustment; if the weight of the first application type is not greater than the preset weight, determining not to perform rate adjustment.
[0010] In one possible implementation, the bitrate adjustment parameter also includes the frequency at which the current foreground application switches from the background to the foreground within a preset period. The frequency at which the current foreground application switches from the background to the foreground within the preset period is continuous, and this switching frequency can reflect the upcoming scene. Therefore, dynamically adjusting the projection bitrate in conjunction with this switching frequency can further improve the user experience.
[0011] In a possible implementation, determining whether to perform rate adjustment based on the rate adjustment parameter includes: determining a rate adjustment index based on the rate adjustment parameter; if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment; the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the first application type, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the frequency.
[0012] In one possible implementation, the bitrate adjustment parameters also include a second application type weight, which is the application type weight corresponding to the target application that is switched to the foreground application during a preset period of time. The target application is an application other than the current foreground application. The target application can also reflect the scene of the projection screen to a certain extent. Therefore, dynamically adjusting the projection bitrate in combination with the second application type weight can further improve the user experience.
[0013] In one possible implementation, determining whether to perform rate adjustment based on the rate adjustment parameter includes: determining a rate adjustment index based on the rate adjustment parameter; if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment; the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the first application type, the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the second application type, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the above-mentioned frequency.
[0014] In a possible implementation, determining whether to perform rate adjustment according to the rate adjustment parameter includes: determining a rate adjustment index k according to the following formula: k=W app1 2 / (a×f / W app2 ), if k is greater than the threshold, it is determined to adjust the bit rate; if k is not greater than the threshold, it is determined not to adjust the bit rate, W app1 is the weight of the first application type, f is the frequency of the current foreground application switching from the background to the foreground within a preset period, W app2 is the weight of the second application type, and a is a constant. Determining the bit rate adjustment index based on this formula can more accurately achieve dynamic adjustment of encoding.
[0015] In one possible implementation, encoding and wirelessly projecting the content to be projected based on a target bitrate includes: determining a target resolution for the content to be projected based on the target bitrate, where the target resolution for the content to be projected is lower than the original resolution of the content to be projected; and encoding and wirelessly projecting the content to be projected based on the target resolution. This can reduce the bitrate while minimizing any negative impact on the user experience.
[0016] On the second aspect, a screen projection method is provided, including: determining whether to perform bit rate adjustment based on the frequency of the current foreground application switching from the background to the foreground within a preset time period; if so, encoding and wirelessly projecting the content to be projected based on the target bit rate, and the target bit rate is lower than the original bit rate of the content to be projected; if not, encoding and wirelessly projecting the content to be projected based on the original bit rate.
[0017] According to the user's historical operation behavior, the probability of the user switching the foreground application in the next period of time can be predicted. If the probability of the user switching the foreground application next is high, it is more inclined not to adjust the bit rate, because after switching the foreground application, if the bit rate of the foreground application switched to is reduced, it will have a great impact on the user's subjective feelings, which will easily reduce the user experience; if the probability of the user switching the foreground application next is small, it is more inclined to adjust the bit rate, because the bit rate reduction in a stable scenario has a small impact on the user's perception, and the bit rate reduction is not easy to reduce the user experience. Dynamic bit rate adjustment is implemented according to the switching frequency of the foreground application, which can improve the user experience while reducing power consumption. In addition, the screen projection method in the embodiment of the present application does not need to wait until the temperature rises to a threshold before adjusting the bit rate, but implements dynamic adjustment of the bit rate based on the switching frequency of the foreground application, which can improve the temperature rise of the screen projection source device caused by screen projection, prolong the time of temperature rise, and reduce the probability of abnormalities caused by heat in the device.
[0018] In one possible implementation, determining whether to perform rate adjustment based on the frequency of a current foreground application switching from the background to the foreground within a preset period includes determining whether to perform rate adjustment based on the frequency of the current foreground application switching from the background to the foreground within the preset period and a second application type weight, where the second application type weight is the application type weight corresponding to a target application that is switched to the foreground application during the preset period, where the target application is an application other than the current foreground application. Determining whether to perform rate adjustment based on the switching frequency of the foreground application and the application type of the target application to which the application is switched can further improve the user experience.
[0019] In a possible implementation, the application type weight corresponding to the video or game application is greater than the application type weight corresponding to other applications.
[0020] In one possible implementation, determining whether to perform rate adjustment based on the frequency of the current foreground application switching from the background to the foreground within a preset period and the weight of the second application type includes: determining a rate adjustment index based on the frequency of the current foreground application switching from the background to the foreground within a preset period and the weight of the second application type; if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, then determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, then determining not to perform rate adjustment; the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the second application type, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the above-mentioned frequency. The necessity of rate adjustment represented by the rate adjustment index meeting the adjustment condition may mean that the rate adjustment index belongs to the first range, and the necessity of rate adjustment represented by the rate adjustment index not meeting the adjustment condition may mean that the rate adjustment index belongs to the second range.
[0021] In one possible implementation, encoding and wirelessly projecting the content to be projected based on a target bitrate includes: determining a target resolution for the content to be projected based on the target bitrate, where the target resolution for the content to be projected is lower than the original resolution of the content to be projected; and encoding and wirelessly projecting the content to be projected based on the target resolution. This can reduce the bitrate while minimizing any negative impact on the user experience.
[0022] On the third aspect, an embodiment of the present application provides a screen projection method, including: obtaining the projected content; determining the predicted bit rate of the content to be projected; determining the target bit rate of the content to be projected based on the predicted bit rate of the content to be projected and the perceptual coding distortion curve, the target bit rate of the content to be projected is less than the predicted bit rate; encoding and wirelessly projecting the content to be projected based on the target bit rate.
[0023] Determine the predicted bit rate of the content to be projected, and determine the target bit rate after the bit rate is reduced based on the predicted bit rate and the perceptual coding distortion curve. Encode the content to be projected and wirelessly project based on the target bit rate. Since the reduced target bit rate is determined based on the predicted bit rate and the perceptual coding distortion curve, the reduced target bit rate has a lower impact on user perception, and at the same time, reduces power consumption. In other words, the embodiment of the present application can dynamically adjust the bit rate of the projected video without affecting the user's subjective experience as much as possible, thereby improving the user experience while reducing power consumption. In addition, the projection method in the embodiment of the present application does not need to wait until the temperature rises to a threshold before adjusting the bit rate, but dynamically adjusts the bit rate based on the projected content, which can improve the temperature rise of the projection source device caused by projection, prolong the temperature rise time, and reduce the probability of abnormalities in the device due to heat.
[0024] In a possible implementation, determining the predicted bit rate of the content to be projected includes determining the predicted bit rate of the content to be projected based on the picture complexity of the projected content.
[0025] In one possible implementation, the vertical coordinate of the perceptual coding distortion curve is the image distortion rate perceived by the human eye, the horizontal coordinate of the perceptual coding distortion curve is the bit rate, the perceptual coding distortion curve has multiple steps, the width of the steps in the multiple steps is positively correlated with the bit rate, and the height of the steps in the multiple steps is negatively correlated with the bit rate; determining the target bit rate of the content to be projected based on the predicted bit rate of the content to be projected and the perceptual coding distortion curve includes: determining the step corresponding to the predicted bit rate of the content to be projected in the perceptual coding distortion curve; determining the bit rate on the left side of the predicted bit rate in the corresponding step as the target bit rate of the content to be projected. The width of the steps in the multiple steps is positively correlated with the bit rate, that is, under the condition of the same image quality, the higher the complexity of the image in the temporal and spatial domains, the stronger the visual masking effect. Therefore, if the predicted bit rate is large, the bit rate can be lowered more based on the predicted bit rate as the target bit rate, and it can still be ensured that the human eye cannot perceive the distortion caused by the bit rate reduction. The height of each step is negatively correlated with the bitrate. This means that, for the same image quality, the greater the temporal and spatial complexity of the image, the less impact bitrate reduction has on human perception. Dynamically adjusting the bitrate based on the aforementioned perceptual coding distortion curve can further enhance the user experience.
[0026] In one possible implementation, determining the predicted bitrate of the content to be projected based on the picture complexity of the projected content includes: determining the target picture complexity of the content to be projected based on the picture complexity of the projected content; and determining the predicted bitrate of the content to be projected based on the target picture complexity of the content to be projected. Under the premise of the same image quality, the complexity of the image is positively correlated with the bitrate required for the image. After obtaining the picture complexity of the content to be projected, the bitrate of the content to be projected can be determined based on the correlation between the picture complexity and the bitrate.
[0027] In one possible implementation, determining the target screen complexity of the content to be projected according to the screen complexity of the projected content includes: calculating the target screen complexity of the content to be projected according to the following formula: C N+1 is the target screen complexity of the content to be projected, N is the number of frames in the multi-frame projected content, i is the sequence number of the frame in the multi-frame projected content, and the value of i is positively correlated with the time sequence of the multi-frame projected content. i is the complexity weight coefficient of the i-th frame in the multi-frame projected content, C i The complexity of the i-th frame in the multi-frame projected content; W i Positively correlated with i.
[0028] In one possible implementation, L i is the encoding length corresponding to the screen content of the i-th frame, QP iis the encoding parameter corresponding to the projected content of the i-th frame.
[0029] In a possible implementation, determining the predicted bit rate of the content to be projected according to the target screen complexity of the content to be projected includes: calculating the encoding length corresponding to the content to be projected according to the following formula; L N+1 QP is the encoding length corresponding to the content to be projected. N+1 is the encoding parameter corresponding to the content to be projected. qp i is the weight coefficient of the encoding parameter of the i-th frame in the multi-frame projected content, qp i Positively correlated with i, C N+1 is the target screen complexity of the content to be projected; the predicted bit rate of the content to be projected is calculated according to the following formula: predicted bit rate = L N+1 ×Frame rate.
[0030] In a possible implementation, the above method also includes: obtaining a first application type weight, the first application type weight being the application type weight corresponding to the current foreground application; determining whether to perform rate adjustment based on a rate adjustment parameter, the rate adjustment parameter including the first application type weight, and if so, performing a process of encoding and wirelessly projecting the content to be projected based on the target rate, and if not, encoding and wirelessly projecting the content to be projected based on the original rate. It is easier to determine rate adjustment based on a higher application type weight. In this scenario, encoding and wirelessly projecting based on a dynamically reduced rate can reduce power consumption on the one hand, and have less impact on user perception on the other. For some application types, there may be unstable or less complex scenarios. In these scenarios, reducing the rate has a greater impact on user perception, so it is easier to determine not to perform rate adjustment, that is, encoding and wirelessly projecting the content to be projected based on the original rate.
[0031] In a possible implementation, the application type weight corresponding to the video or game application is greater than the application type weight corresponding to other applications.
[0032] In one possible implementation, determining whether to perform rate adjustment based on the rate adjustment parameter includes: determining a rate adjustment index based on the rate adjustment parameter, and if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, then determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, then determining not to perform rate adjustment, and the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the first application type. The weight of the first application type is positively correlated with the power consumption benefit of rate reduction in the scenario, and the user experience can be improved by dynamically adjusting the projection bit rate based on the application type. The necessity of rate adjustment represented by the rate adjustment index meeting the adjustment condition may mean that the rate adjustment index belongs to the first range, and the necessity of rate adjustment represented by the rate adjustment index not meeting the adjustment condition may mean that the rate adjustment index belongs to the second range.
[0033] In a possible implementation, the bitrate adjustment parameter also includes the frequency of the current foreground application switching from the background to the foreground within a preset period of time. Determining whether to perform bitrate adjustment based on the switching frequency of the foreground application can further improve user experience.
[0034] In one possible implementation, the rate adjustment parameters also include a second application type weight, which is the application type weight corresponding to a target application that is switched to the foreground application during a preset period of time, where the target application is an application other than the current foreground application. Determining whether to perform rate adjustment based on the switching frequency of the foreground application and the application type of the target application being switched to can further improve the user experience.
[0035] In one possible implementation, determining whether to perform rate adjustment based on the rate adjustment parameter includes: determining a rate adjustment index based on the rate adjustment parameter, if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment, if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment, the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the first application type, the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the second application type, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the switching frequency.
[0036] In a possible implementation, determining whether to perform rate adjustment according to the rate adjustment parameter includes: determining a rate adjustment index k according to the following formula: k=W app1 2 / (a×f / W app2 ), if k is greater than the threshold, it is determined to adjust the bit rate; if k is not greater than the threshold, it is determined not to adjust the bit rate, W app1is the weight of the first application type, f is the frequency of the current foreground application switching from the background to the foreground within a preset period, W app2 is the weight of the second application type, and a is a constant. Determining the bitrate adjustment index based on this formula can more accurately achieve dynamic adjustment of the bitrate.
[0037] In one possible implementation, encoding and wirelessly projecting the content to be projected based on a target bitrate includes: determining a target resolution of the content to be projected based on the target bitrate of the content to be projected, the target resolution of the content to be projected being lower than the original resolution of the content to be projected; and encoding and wirelessly projecting the content to be projected based on the target resolution. Bitrate adjustment is achieved by maintaining the quality of a single pixel and determining the target resolution by reducing the resolution. This bitrate reduction minimizes the degradation of image quality displayed on the target projection device.
[0038] In a fourth aspect, an electronic device is provided, comprising: a processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the electronic device executes the above method.
[0039] In a fifth aspect, a computer-readable storage medium is provided, comprising a program or an instruction. When the program or the instruction is run on a computer, the above method is executed.
[0040] In a sixth aspect, a computer program product is provided, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0042] FIG1 is a schematic diagram of three screen projection scenarios involved in the embodiments of the present application;
[0043] FIG2 is a schematic diagram of the structure of an electronic device involved in an embodiment of the present application;
[0044] FIG3 is a software structure block diagram of an electronic device according to an embodiment of the present application;
[0045] FIG4 is a schematic diagram of a flow chart of a screen projection method in an embodiment of the present application;
[0046] FIG5 is a schematic diagram of a perceptual coding distortion curve in an embodiment of the present application;
[0047] FIG6 is a flow chart of another screen projection method according to an embodiment of the present application;
[0048] FIG7 is a schematic diagram showing the change of resolution at different stages under three different comparative examples;
[0049] FIG8 is a schematic diagram of a resolution coding relationship in an embodiment of the present application;
[0050] FIG9 is a schematic diagram of a temperature rise curve comparing the embodiment of the present application with other methods;
[0051] FIG10 is a flow chart of another screen projection method according to an embodiment of the present application;
[0052] Figure 11 is a flow chart of another screen projection method in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0054] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0055] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0056] It should be understood that the term "and / or" as used herein simply describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A alone, A and B together, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the associated objects.
[0057] First, the application scenarios involved in the embodiments of this application are described. The embodiments of this application involve wireless screen projection scenarios, as shown in Figure 1, such as projecting the screen from a mobile phone to a computer, a mobile phone to a TV, or a mobile phone to a tablet. The projection here can be mirrored screen projection. The wireless screen projection scenario involves two electronic devices: a screen projection source device and a screen projection target device.
[0058] FIG2 shows a schematic structural diagram of the electronic device 100 .
[0059] The electronic device 100 may include a processor 110 , an external memory interface 120 , an internal memory 121 , a wireless communication module 160 , a display screen 194 , an antenna 1 , and the like.
[0060] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0061] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The processor 110 may be used for functions such as encoding and decoding of audio and video streams.
[0062] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0063] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0064] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the wireless communication module 160, the modem processor and the baseband processor.
[0065] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 1, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 1. The wireless communication module 160 includes, for example, a Bluetooth chip.
[0066] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0067] Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0068] In some embodiments, the electronic device 100 may include a touch sensor on the display screen 194. The touch sensor and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor is configured to detect touch operations applied thereto or in the vicinity thereof. The touch sensor may transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations may be provided via the display screen 194. In other embodiments, the touch sensor may be located on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0069] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0070] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.
[0071] FIG3 is a software structure block diagram of the electronic device 100 according to an embodiment of the present application.
[0072] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0073] The application layer can include a series of application packages.
[0074] As shown in FIG3 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
[0075] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0076] As shown in FIG3 , the application framework layer may include a window manager, a content provider, a view system, a resource manager, and the like.
[0077] The window manager manages window applications. Content providers store and retrieve data and make it accessible to applications. This data can include video, images, audio, incoming and outgoing calls, browsing history and bookmarks, and phone books.
[0078] The view system includes visual controls, such as controls for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views.
[0079] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0080] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
[0081] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.
[0082] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.
[0083] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0084] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.
[0085] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0086] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0087] A 2D graphics engine is a drawing engine for 2D drawings.
[0088] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, Bluetooth driver, audio driver, and sensor driver.
[0089] The electronic devices involved in the embodiments of the present application may be any product such as smart TVs, mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, drone devices, smart cars, smart speakers, robots, smart glasses, etc.
[0090] The above-mentioned electronic device can be a screen projection source device or a screen projection target device in a wireless screen projection scenario.
[0091] The present application provides a screen projection method, which is applied to a screen projection source device. As shown in FIG4 , the screen projection method includes:
[0092] Step 101: Perform wireless screen projection;
[0093] Before wireless screen projection, a wireless connection is established between the projection source device and the projection target device. During the wireless screen projection process, the projection source device will capture its own display screen, which is the projection content, and encode the projection content. The encoded projection content is then sent to the projection target device via a wireless connection. After receiving the projection content, the projection target device will decode and play the projection content, thus realizing wireless screen projection. At the beginning of the projection, the projection source device can encode and wirelessly project the projection content based on the original bit rate.
[0094] Step 102: Obtain the projected content.
[0095] During the screen projection process, the screen projection source device can obtain the screen projection content of the recent period, such as the screen projection content of the last minute.
[0096] Step 103: Determine the predicted bit rate of the content to be projected based on the complexity of the screen of the projected content;
[0097] The projected content is a frame-by-frame image. The corresponding complexity can be determined based on any frame image. In the video, the frame images are continuous, and there is a strong correlation between adjacent or time-close frame images. The image content is usually similar, so the complexity between the images is also relatively close, and usually no mutations occur. Therefore, the bit rate of the content to be projected can be predicted based on the image complexity of the most recently projected content, that is, the predicted bit rate of the content to be projected can be determined.
[0098] It can be understood that determining the predicted bit rate of the content to be projected based on the picture complexity of the projected content is only one implementation method. In other possible implementation methods, the predicted bit rate of the content to be projected can also be determined by other methods. For example, the predicted bit rate of the content to be projected can be determined by the actual bit rate of the projected content. For example, the average value of the actual bit rate of the projected content over a period of time is calculated and used as the predicted bit rate of the content to be projected.
[0099] Step 104: Determine a target bit rate for the content to be projected based on the predicted bit rate of the content to be projected and a perceptual coding distortion curve. The target bit rate for the content to be projected is less than the predicted bit rate.
[0100] The perceptual coding distortion curve is a pre-set curve or mapping relationship based on the relationship between the image distortion rate and the image bitrate as perceived by the human eye. For example, Figure 5 illustrates the relationship between the statistical coding distortion curve and the perceptual coding distortion curve. The statistical coding distortion curve is the theoretical correspondence curve between the image distortion rate and the bitrate. From a computer perspective, the correlation between the image distortion rate and the bitrate appears as a continuous curve. The perceptual coding distortion curve is the correspondence curve between the image distortion rate and the bitrate as perceived by the human eye. Due to the influence of visual masking, the correlation between the image distortion rate and the bitrate appears as a discounted curve. In other words, the distortion rate is only perceived by the human eye after the accumulated bitrate distortion reaches a certain threshold. In other words, the perceptual coding distortion curve has multiple steps. The image bitrate change corresponding to each step does not correspond to a change in the image distortion rate. Only changes in the bitrate between steps will cause a sudden change in the image distortion rate. In step 103, the position of the predicted bitrate of the content to be projected on the perceptual coding distortion curve is determined. Assuming the predicted bitrate of the content to be projected is A in FIG5 , which is located on the lowest step of the perceptual coding distortion curve. Since all bitrates on this step correspond to the same image distortion rate perceived by the human eye, the bitrate to the left of A on this step can be set as the target bitrate of the content to be projected. For example, A' is set as the target bitrate of the content to be projected. The smaller the target bitrate A', the greater the power consumption reduction effect. However, the target bitrate A' cannot be equal to or less than the bitrate s1 corresponding to the rising edge on the left side of the step. Because the image distortion rate perceived by the human eye remains unchanged on the same platform, the user will not perceive the distortion caused by the bitrate reduction. Therefore, s1 < A' < A. The closer A' is to the bitrate s1 corresponding to the rising edge on the left side of the step, the greater the bitrate reduction effect. Assuming the predicted bitrate of the content to be projected is B in FIG5 , and the bitrate corresponding to the rising edge on the left side of the step is s2, the bitrate B' between s2 and B can be set as the target bitrate of the content to be projected.
[0101] Step 105: Encode and wirelessly project the content to be projected based on the target bit rate.
[0102] Among them, the target bit rate is less than the predicted bit rate, that is, the bit rate of the content to be projected is reduced. In this way, during the wireless screen projection process, the wireless transmission image bit rate is low, that is, the amount of data transmitted is low, thereby reducing power consumption. At the same time, since the reduction in the target bit rate is determined based on the perceptual coding distortion curve, the bit rate reduction has little impact on human eye perception.
[0103] After step 105, step 102 may be performed again, that is, in the process of wireless screen projection, steps 102 to 105 are periodically performed. Take a specific scenario as an example to illustrate, for example, in a wireless screen projection process, the 1st to Nth frames are encoded and wirelessly projected at the default bit rate, and then, in step 103, the predicted bit rate of the N+1th frame to be projected is determined based on the complexity of the screen content of the 1st to Nth frames, in step 104, the target bit rate of the N+1th frame is determined according to the predicted bit rate of the N+1th frame, and in step 105, the N+1th frame is encoded and wirelessly projected according to the target bit rate. ; Then, based on the complexity of the screen content of the 2nd to N+1 frames, the predicted bit rate of the N+2 frame to be projected is determined, and the target bit rate of the N+2 frame is determined. The N+2 frame is encoded and wirelessly projected according to the target bit rate. And so on. Then, based on the complexity of the screen content of the 3rd to N+3 frames, the predicted bit rate of the N+3 frame to be projected is determined, and the target bit rate of the N+3 frame is determined. The N+3 frame is encoded and wirelessly projected according to the target bit rate. In this way, the bit rate can be dynamically adjusted based on the projected content during the wireless projection process.
[0104] The screen projection method in the embodiment of the present application obtains the predicted bit rate of the content to be projected based on the content that has been projected, and determines the target bit rate after the bit rate is reduced based on the predicted bit rate and the perceptual coding distortion curve. The content to be projected is encoded and wirelessly projected based on the target bit rate. Since the reduced target bit rate is determined based on the predicted bit rate and the perceptual coding distortion curve, the reduced target bit rate has a lower impact on user perception, and at the same time, power consumption is reduced. In other words, the embodiment of the present application can dynamically adjust the bit rate of the projected video without affecting the user's subjective experience as much as possible, thereby improving the user experience while reducing power consumption. In addition, the screen projection method in the embodiment of the present application does not need to wait until the temperature rises to a threshold before adjusting the bit rate, but dynamically adjusts the bit rate based on the content that has been projected, which can improve the temperature rise of the projection source device caused by projection, prolong the time of temperature rise, and reduce the probability of abnormalities caused by heat in the device.
[0105] In one possible embodiment, as shown in FIG5 , the ordinate of the perceptual coding distortion curve is the image distortion rate perceived by the human eye, the abscissa of the perceptual coding distortion curve is the bit rate, and the perceptual coding distortion curve has multiple steps. The above-mentioned step 104, determining the target bit rate of the content to be projected based on the predicted bit rate of the content to be projected and the perceptual coding distortion curve, includes: determining the step corresponding to the predicted bit rate of the content to be projected in the perceptual coding distortion curve; determining the bit rate on the left side of the predicted bit rate in the corresponding step as the target bit rate of the content to be projected, and the bit rate on the left side of the predicted bit rate in the corresponding step does not include the rising edge on the left side of the step. Among them, the width of the steps in the multiple steps is positively correlated with the bit rate, that is, under the condition of the same image quality, the higher the complexity of the image in the temporal and spatial domains, the stronger the visual masking effect. Therefore, if the predicted bit rate is large, the bit rate can be adjusted down a lot based on the predicted bit rate as the target bit rate, and it can still be ensured that the human eye cannot perceive the distortion caused by the bit rate reduction. The height of the steps in the multiple steps is negatively correlated with the bit rate. That is, under the condition of the same image quality, the higher the complexity of the image in the temporal and spatial domains, the smaller the impact on human eye perception caused by reducing the bit rate. For example, if the screen projection content is a video, the video and film content are relatively complex. In this scenario, even if the bit rate is reduced more, the user will not easily perceive the image distortion; on the other hand, if the screen projection content is the chat interface of an instant messaging application, the chat interface is less complex. In this scenario, the image distortion caused by the bit rate reduction is easily perceived by the user. Therefore, dynamically adjusting the bit rate based on the above-mentioned perceptual coding distortion curve can further improve the user experience.
[0106] The following is an example of how to determine the bit rate on the left side of the predicted bit rate in the corresponding step as the target bit rate of the content to be projected. For example, a positive number less than 1 is set as the target bit rate adjustment coefficient, such as 0.8. When determining the target bit rate of the content to be projected, the predicted bit rate of the content to be projected is directly multiplied by the coefficient 0.8 as the target bit rate.
[0107] In a possible embodiment, the above-mentioned step 103, determining the predicted bit rate of the content to be projected based on the picture complexity of the projected content, includes: step 1031 and step 1032. Step 1031, determining the target picture complexity of the content to be projected based on the picture complexity of the projected content. For example, in the content projected in the last minute, one frame of image is acquired per second, and 60 frames of image are acquired. The picture complexity of the content to be projected is predicted based on the picture complexity of these 60 frames of image; for another example, in the content projected in the last second, each frame of image is acquired based on the picture display frame rate. Assuming that the frame rate is 60Hz, 60 consecutive frames of image of the most recent projection are acquired. The picture complexity of the content to be projected is predicted based on the picture complexity of these 60 frames of image. Step 1032, determining the predicted bit rate of the content to be projected based on the target picture complexity of the content to be projected. Under the premise of the same image quality, there is a positive correlation between the complexity of the image and the bit rate required for the image. After obtaining the picture complexity of the content to be projected, the bit rate of the content to be projected can be determined based on the correlation between the picture complexity and the bit rate. This bit rate is called the predicted bit rate in the embodiment of the present application.
[0108] In a possible implementation, the above step 1031, determining the target screen complexity of the content to be projected according to the screen complexity of the projected content, includes: calculating the target screen complexity of the content to be projected according to the following formula: C N+1 is the target screen complexity of the content to be projected, N is the number of frames in the multi-frame projected content, i is the sequence number of the frame in the multi-frame projected content, and the value of i is positively correlated with the time sequence of the multi-frame projected content. i is the complexity weight coefficient of the i-th frame in the multi-frame projected content, C i The complexity of the i-th frame in the multi-frame projected content; W i Positively correlated with i.
[0109] Specifically, multiple frames of projected content can be selected from the most recently projected content, and the target screen complexity of the content to be projected is determined based on the screen complexity of the selected multiple frames of projected content. In one embodiment, for example, all 60 frames of projected content in the last second can be used as the multiple frames of projected content in step 1031, N = 60, and the values of i are 1, 2, 3, ..., 60. The values of i are positively correlated with the time series of the multiple frames of projected content, that is, the larger the value of i, the later the time in the corresponding 60 frames, and C N+1 and C NIt can correspond to two adjacent frames. The closer the frame is to the content to be projected, the higher the correlation with the content to be projected. Therefore, the complexity of the content to be projected can be determined based on the multiple frames of projected content adjacent to the content to be projected. In addition, for this reason, in the calculation formula, the larger the complexity weight coefficient is, the greater the value of i is, so as to improve the prediction accuracy of the complexity of the content to be projected. In another embodiment, for example, one frame can be selected every 1 second from the 360 frames of projected content in the last minute, and 60 frames of them can be used as the multiple frames of projected content in step 1031.
[0110] In one possible implementation, L i is the encoding length corresponding to the screen content of the i-th frame, QP i is the encoding parameter corresponding to the screen content of the i-th frame, QP i It is usually a natural number between 0 and 51. The larger the value, the lower the image quality. The values corresponding to different frames may be different, but QP i are known parameters.
[0111] In addition, in addition to the above formula to determine the image complexity of the projected content, other methods can also be used to determine the image complexity of the projected content. For example, the image complexity can be determined by the color distribution of the projected content. The color distribution may be related to image parameters such as the variance or standard deviation of RGB pixels. In the embodiments of the present application, the image complexity is determined based on C i The formula for determining the complexity of the projected content is used as an example to illustrate.
[0112] In one possible implementation, the above step 1032, determining the predicted bit rate of the content to be projected according to the target screen complexity of the content to be projected, includes: calculating the encoding length corresponding to the content to be projected according to the following formula; L N+1 QP is the encoding length corresponding to the content to be projected. N+1 is the encoding parameter corresponding to the content to be projected. qp i is the weight coefficient of the encoding parameter of the i-th frame in the multi-frame projected content, qp i Positively correlated with i, C N+1 is the target screen complexity of the content to be projected; the predicted bit rate of the content to be projected is calculated according to the following formula: predicted bit rate = L N+1 ×Frame rate. The frame rate can be the frequency at which screen data of the projected content is collected on the source device.
[0113] In a possible implementation, as shown in FIG6 , the above method further includes: step 106, obtaining the first application type weight, the first application type weight being the application type weight corresponding to the current foreground application; step 107, determining whether to perform rate adjustment based on the rate adjustment parameter, the rate adjustment parameter including the first application type weight, if so, executing step 105, encoding and wirelessly projecting the content to be projected based on the target rate, if not, executing step 108, encoding and wirelessly projecting the content to be projected based on the original rate. After step 105, step 106 may be executed again to determine whether rate adjustment is performed in the next cycle, that is, to implement periodic dynamic rate adjustment. After step 108, step 106 may be executed again to determine whether rate adjustment is performed in the next cycle, that is, to implement periodic dynamic rate adjustment.
[0114] Specifically, whether to reduce the screen projection bitrate can be determined based on the current foreground application type. The first application type weight is used to indicate that the current foreground application has the value of bitrate adjustment. The greater the weight, the greater the possibility of determining bitrate adjustment in step 107. The current foreground application corresponds to the scene of the content to be projected. If it is in a relatively stable scene, that is, the continuity of the image is relatively good, and the probability of application switching is relatively low, then the application type weight corresponding to this application is relatively high; if it is in a scene with a higher degree of complexity, then the first application type weight corresponding to this application is relatively high, because the higher the bitrate, the more complex the scene. As shown in Figure 5, the higher the bitrate, the smaller the impact of reducing the bitrate on the user, that is, the greater the power consumption benefit of bitrate adjustment, so the first application type weight corresponding to this application is relatively high. According to the higher first application type weight, it is easier to determine to adjust the bitrate in step 107. In this scenario, encoding and wireless projection based on the dynamically reduced bitrate can reduce power consumption on the one hand, and have less impact on user perception on the other hand. For some application types, there may be unstable or less complex scenarios. In these scenarios, reducing the bit rate has a greater impact on user perception. Therefore, it is easier to determine not to adjust the bit rate in step 107, that is, to encode and wirelessly project the content to be projected based on the original bit rate in step 108.
[0115] It should be noted that in the process shown in Figure 6, when it is determined to be yes in step 107, steps 102 to 105 are executed, that is, the target bit rate is determined after determining to perform bit rate adjustment. However, the embodiment of the present application does not limit the order between steps 102 to 104 and step 107. That is to say, in other possible implementations, the target bit rate can also be determined before determining whether to perform bit rate adjustment or during the process of determining bit rate adjustment. Whether encoding and wireless projection are performed based on the target bit rate needs to be triggered according to the result determined in step 107.
[0116] In one possible embodiment, the bit rate is related to the resolution, and the bit rate is related to the quality of each pixel. The bit rate is approximately equal to the resolution × the quality of each pixel. Therefore, for the adjustment of the bit rate, the amount of data for each pixel can be reduced by keeping the resolution unchanged, that is, reducing the quality of each pixel. In other words, step 105 includes determining the target quality of each pixel corresponding to the content to be projected based on the target bit rate of the content to be projected, the target quality of each pixel is less than the original quality of each corresponding pixel, and the resolution is kept unchanged. The content to be projected is encoded and wirelessly projected based on the target quality of each pixel and the unchanged resolution. It can be understood that in other possible ways, the quality of each pixel and the resolution can also be reduced at the same time, and the content to be projected is encoded and wirelessly projected based on the reduced quality of each pixel and the reduced resolution.
[0117] In one possible implementation, the above-mentioned step 105, encoding and wirelessly projecting the content to be projected based on the target bit rate, includes: determining the target resolution of the content to be projected based on the target bit rate of the content to be projected, the target resolution of the content to be projected being lower than the original resolution of the content to be projected; encoding and wirelessly projecting the content to be projected based on the target resolution.
[0118] Specifically, in most screen projection scenarios, the resolution of the picture captured by the screen projection source device is relatively high, and when the screen projection target device displays it, the received data will be downsampled and sent to the display, so the resolution displayed by the screen projection target device is relatively low. For example, as shown in Figure 7, the size of the rectangle in Figure 7 represents the resolution. The larger the rectangle, the higher the resolution. In Comparative Example 1, the resolution of the picture captured by the screen projection source device is relatively high. It is encoded, transmitted, and decoded without changing the resolution, but the resolution of the picture displayed by the screen projection target device is relatively low. In Comparative Example 2, the resolution of encoding, transmission, and decoding is lower than the resolution of the captured picture, but the resolution of the picture displayed by the screen projection target device is even lower. In Comparative Example 3, the resolution of encoding, transmission, and decoding is the same as the resolution displayed by the screen projection target device. In this way, the power consumption during encoding, transmission, and decoding is the lowest, but the display effect is the same as the other two comparative examples. Therefore, in the embodiment of the present application, the quality of a single pixel is kept unchanged, and the target resolution is determined by reducing the resolution to achieve bit rate adjustment. This method of reducing the bit rate has a smaller reduction in the quality of the picture displayed by the screen projection target device. Due to the limitation of coding, under different coding parameters QP, the coding ratio and the resolution ratio have a corresponding relationship, as shown in Table 1 and Figure 8.
[0119] Table 1 shows the correspondence between resolution and bitrate, and Figure 8 shows the corresponding resolution and bitrate relationships. Bitrate and resolution are both expressed as percentages. In addition to illustrating the correspondence between resolution ratio and bitrate ratio, Table 1 and Figure 8 also illustrate the correspondence between two reference ratios and bitrate ratios. The single-side ratio refers to the pixel single-side ratio, and the correspondence between pixel area ratio and bitrate ratio can be equivalently understood as the ideal relationship between resolution and bitrate. However, due to encoding limitations, the actual correspondence between resolution ratio and bitrate is related to the encoding parameter QP. The resolution ratio and bitrate ratio relationships for different encoding parameters QP can be pre-stored in the projection source device. In determining the target resolution of the content to be projected based on the target bitrate of the content to be projected, the ratio of the reduced target bitrate to the original bitrate, i.e., the reduced bitrate ratio, can be determined. Based on the resolution ratio and bitrate ratio relationship corresponding to the current encoding parameter QP, the resolution ratio corresponding to the reduced bitrate ratio can be determined. Based on this resolution ratio, the corresponding target resolution can then be determined. The content to be projected can then be encoded and wirelessly projected based on this target resolution.
[0120] As shown in Table 2 and Figure 9.
[0121] Table 2
[0122] Table 2 shows the temperature test data of electronic devices under three scenarios. Figure 9 shows the temperature rise curves of electronic devices under three scenarios corresponding to Table 2. It can be seen that the temperature rises faster in the wireless screen projection scenario than in the local video playback scenario, and the wireless screen projection method of the embodiment of the present application has a slower temperature rise than the wireless screen projection method that does not change the bit rate. That is to say, the embodiment of the present application can improve the temperature rise of the screen projection source device caused by screen projection and prolong the temperature rise time.
[0123] As shown in FIG10 , the embodiment of the present application further provides a screen projection method, including:
[0124] Step 201: Obtain a first application type weight, where the first application type weight is the application type weight corresponding to the current foreground application;
[0125] Step 202: Determine whether to perform rate adjustment based on the rate adjustment parameters, where the rate adjustment parameters include the first application type weight. If yes, execute step 203: encode and wirelessly project the content to be projected based on the target rate, where the target rate is lower than the original rate of the content to be projected. If no, execute step 204: encode and wirelessly project the content to be projected based on the original rate.
[0126] Specifically, the executor of the screen projection method can be a screen projection source device, step 201 can be the same as step 106 in the above embodiment, step 202 can be the same as step 107, step 204 can be the same as step 108, and step 203 can be similar to step 105. The difference is that step 203 does not limit the method for determining the target bit rate. The target bit rate determination method in the above embodiment can be applied, and other possible target bit rate determination methods can also be applied, as long as the target bit rate is lower than the original bit rate.
[0127] In the screen projection method of the embodiment of the present application, the current foreground application corresponds to the scene of the content to be projected. If it is in a relatively stable scene, that is, the continuity of the image is relatively good, and the probability of application switching is relatively low, then the application type weight corresponding to this application is relatively high; if it is in a scene with a higher degree of complexity, then the application type weight corresponding to this application is relatively high, because the higher the bit rate, the more complex the scene, and the higher the bit rate, the smaller the impact of reducing the bit rate on the user, that is, the greater the power consumption benefit of bit rate adjustment, so the application type weight corresponding to this application is relatively high. According to the higher application type weight, it is easier to determine whether to adjust the bit rate. In this scenario, encoding and wireless projection based on the reduced bit rate can reduce power consumption on the one hand, and have less impact on user perception on the other hand. For some application types, there may be unstable or less complex scenes. In these scenarios, reducing the bit rate has a greater impact on user perception, so it is easier to determine not to adjust the bit rate, that is, to encode and wirelessly project the content to be projected based on the original bit rate. In addition, the screen projection method in the embodiment of the present application does not need to wait until the temperature rises to a threshold value before adjusting the bit rate, but dynamically adjusts the bit rate based on the foreground application type, which can improve the temperature rise of the screen projection source device caused by screen projection, extend the temperature rise time, and reduce the probability of device abnormalities due to heat.
[0128] In one possible implementation, as shown in Figures 6 and 10, step 107 or step 202, determining whether to perform rate adjustment based on the rate adjustment parameter, includes: if the weight of the first application type is greater than a preset weight, determining to perform rate adjustment; if the weight of the first application type is not greater than the preset weight, determining not to perform rate adjustment. In other words, in step 107 or 202, whether to perform rate adjustment can be determined directly based on the weight of the first application type.
[0129] In one possible implementation, as shown in FIG6 and FIG10, the application type weight corresponding to the video or game application is greater than the application type weight corresponding to other applications; the above-mentioned step 107 or step 202, determining whether to perform bit rate adjustment based on the bit rate adjustment parameter includes: determining a bit rate adjustment index based on the first application type weight; if the necessity of bit rate adjustment represented by the bit rate adjustment index meets the adjustment condition, then determining to perform bit rate adjustment; if the necessity of bit rate adjustment represented by the bit rate adjustment index does not meet the adjustment condition, then determining not to perform bit rate adjustment; the necessity of bit rate adjustment represented by the bit rate adjustment index is positively correlated with the weight of the first application type. The first application type weight is positively correlated with the power consumption benefit of bit rate reduction in the scenario. By dynamically adjusting the projection bit rate based on the application type, the user experience can be improved.
[0130] Specifically, the rate adjustment index is correlated with the weight of the first application type. For example, the two may be positively correlated. In this case, the rate adjustment index is greater than the adjustment threshold, that is, the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, then it is determined to perform rate adjustment. If the rate adjustment index is not greater than the adjustment threshold, that is, the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, then it is determined not to perform rate adjustment. The rate adjustment index may be negatively correlated with the weight of the first application type. In this case, the necessity of rate adjustment represented by the rate adjustment index is not greater than the adjustment threshold, that is, the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, then it is determined to perform rate adjustment. If the rate adjustment index is greater than the adjustment threshold, that is, the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, then it is determined not to perform rate adjustment. For video applications and game applications, the frame rate is usually high and highly complex images are prone to appear. The frame rate is usually stable at 30, 60 or 120fps, and the front and back images are highly correlated. This type of application has a large original power consumption when used as the foreground for screen projection, and the power consumption benefit of reducing the bit rate is obvious. Therefore, the application type weight corresponding to the video or game application can be set to 1, that is, it has the highest priority in determining whether to adjust the bit rate. For other applications besides videos and games, since the probability of highly complex images is low, a lower application type weight can be set. For other applications, further classification can be made. For example, a music application dynamically displays lyrics when playing a song, and the frame rate is usually stable at 30 or 60 fps. The image complexity is less than that of games or videos, and the power consumption benefit of bitrate reduction is medium and relatively stable. Therefore, the application type weight corresponding to the music application can be set to 0.5, that is, it has medium priority in the process of determining whether to perform bitrate adjustment. For other applications besides music applications, these refer to applications other than video applications, game applications, and music applications, such as instant messaging applications or memo applications. Taking instant messaging applications as an example, when the window is static, its frame rate is usually less than 5 fps, and the screen projection bitrate is low. When sliding the window or refreshing other functions with image or video interfaces, the instantaneous frame rate may quickly rise to 60 or 120 fps. The response speed of bitrate reduction is not easy to match the frame rate and bitrate change speed of the application, and the bitrate reduction is likely to affect the user's subjective experience. In addition, the overall bitrate of such applications is relatively low, and the power consumption benefit of bitrate reduction is not obvious. Therefore, the lowest application type weight is set. For example, the application type weight corresponding to other applications besides music applications can be set to 0. The weight of the first application type is positively correlated with the power consumption benefit of reducing the bit rate in the scenario. By dynamically adjusting the projection bit rate based on the application type, the user experience can be improved.
[0131] In a possible implementation, as shown in Figures 6 and 10, the bit rate adjustment parameter also includes the frequency of the current foreground application switching from the background to the foreground within a preset time period. That is, in step 107 or 202, it can be determined whether to perform bit rate adjustment based on the first application type weight and the frequency of the current foreground application switching from the background to the foreground within the preset time period.
[0132] Specifically, the preset time period is a recent period of time, such as the last 1 minute. The frequency of the current foreground application switching from the background to the foreground within the preset time period can represent the user's historical operation behavior, and user operations are usually continuous and relevant. For example, some users are accustomed to switching to instant messaging applications to reply to messages while watching videos, while some users rarely switch applications while watching videos. Therefore, based on the user's historical operation behavior, the probability of the user switching the foreground application in the next period of time can be predicted. If the probability of the user switching the foreground application next is high, it is more inclined not to adjust the bit rate, because after switching the foreground application, if the bit rate of the switched foreground application is reduced, it will have a great impact on the user's subjective feelings, which is likely to reduce the user experience; if the probability of the user switching the foreground application next is small, it is more inclined to adjust the bit rate, because in a stable scenario, the bit rate reduction has less impact on the user's perception, and the bit rate reduction is not easy to reduce the user experience. For example, if a foreground application switches within the last minute, step 204 is executed for the next 10 minutes without reducing the bitrate. Step 202 is then executed again to determine whether to adjust the bitrate in the next cycle, thus implementing periodic dynamic bitrate adjustment. If no foreground application switches within the last minute, step 203 is executed for the next 10 minutes to reduce the bitrate and perform screen projection. Step 202 is then executed again to determine whether to adjust the bitrate in the next cycle, thus implementing periodic dynamic bitrate adjustment. Determining whether to adjust the bitrate based on the switching frequency of the foreground application can further improve the user experience.
[0133] In a possible implementation, as shown in Figures 6 and 10, the bit rate adjustment parameter also includes a second application type weight, which is the application type weight corresponding to the target application that is switched to the foreground application during a preset period, and the target application is an application other than the current foreground application.
[0134] Specifically, if the user has frequently switched to an instant messaging application to reply to messages while watching videos in the recent period, it means that in the next period of time, the user is more likely to switch to an instant messaging application to reply to messages while watching videos. Since instant messaging applications and video applications are different in application type, the impact of reducing the bit rate on user experience is also different. Therefore, the necessity of bit rate adjustment is not only related to the switching frequency, but also to the application type weight corresponding to the target application. For example, if the target application that the user has switched to in the recent period is a video application, the corresponding application type weight is larger, so it is more inclined to perform bit rate adjustment; if the target application that the user has switched to in the recent period is, for example, an instant messaging application, the corresponding application type weight is smaller, so it is more inclined not to perform bit rate adjustment. Determining whether to perform bit rate adjustment based on the switching frequency of the foreground application and the application type of the target application switched to can further improve the user experience.
[0135] In one possible implementation, as shown in Figures 6 and 10, step 107 or 202, determining whether to perform rate adjustment based on the rate adjustment parameter, includes: determining a rate adjustment index based on the first application type weight and the frequency of the current foreground application switching from the background to the foreground within a preset time period; if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment; the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the first application type weight, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the above-mentioned frequency.
[0136] In one possible implementation, as shown in FIG6 and FIG10, step 107 or 202, determining whether to perform rate adjustment based on the rate adjustment parameter, includes: determining a rate adjustment index based on the first application type weight and the second application type weight; if the necessity of rate adjustment represented by the rate adjustment index satisfies the adjustment condition, determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not satisfy the adjustment condition, determining not to perform rate adjustment; the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the first application type weight, and the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the second application type weight.
[0137] In one possible implementation, as shown in Figures 6 and 10, step 107 or 202, determining whether to perform rate adjustment based on the rate adjustment parameter, includes: determining a rate adjustment index based on the second application type weight and the frequency of the current foreground application switching from the background to the foreground within a preset time period; if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment; the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the second application type weight, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the frequency.
[0138] In one possible implementation, as shown in Figures 6 and 10, step 107 or 202, determining whether to perform rate adjustment based on the rate adjustment parameter, includes: determining a rate adjustment index based on the first application type weight, the second application type weight, and the frequency of the current foreground application switching from the background to the foreground during a preset period; if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment; the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the first application type weight, the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the second application type weight, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the frequency.
[0139] Specifically, whether it is the current foreground application or the target application that has been switched recently, it may be the application corresponding to the next screen projection content. Both can reflect the next screen projection scene. Therefore, the necessity of bit rate adjustment represented by the bit rate adjustment index can be set to be positively correlated with the first application type weight and the second application type weight. In other words, the greater the weight of the application type that has been switched to the foreground application, the greater the probability that the bit rate of the next screen projection scene will be higher, and therefore the more inclined to perform bit rate adjustment. The higher the switching frequency, the lower the stability of the next screen projection scene, and therefore the more inclined not to perform bit rate adjustment. Determining whether to perform bit rate adjustment based on the switching frequency of the foreground application, the application type of the target application switched to, and the application type of the current foreground application can further improve the user experience.
[0140] In a possible implementation, determining whether to perform rate adjustment according to the rate adjustment parameter includes: determining a rate adjustment index k according to the following formula: k=W app1 2 / (a×f / W app2 ), if k is greater than the threshold, it is determined to adjust the bit rate; if k is not greater than the threshold, it is determined not to adjust the bit rate, W app1is the weight of the first application type, f is the frequency of the current foreground application switching from the background to the foreground within a preset period, W app2 is the weight of the second application type, and a is a constant. Determining the bit rate adjustment index based on this formula can more accurately achieve dynamic adjustment of encoding.
[0141] Specifically, a×f / W app2 It can be used to express the estimated probability of switching to an application type that should not be rate-adjusted in the next period of time. Assuming that in the first scenario, the current foreground application is a game application, its corresponding application type weight W app1 =1, the user switches to the music application once in the last minute. The switching frequency of once per minute is set to f=1, for example, and the music application is the target application. The corresponding application type weight W app2 =0.5; Assuming that the second scenario is similar to the first scenario, the only difference is that the user switches to the music application 5 times in the last minute. The switching frequency of 5 times in 1 minute is set to f=5, then the switching frequency in the second scenario is higher than that in the first scenario. Therefore, the bit rate adjustment index k is smaller and is less likely to exceed the threshold, that is, it is less likely to perform bit rate adjustment; Assuming that the second scenario is similar to the first scenario, the only difference is that the current foreground application is an instant messaging application, and its corresponding application type weight W app1 =0, the bitrate adjustment index k=0, the threshold is a positive number, k must be less than the threshold, so no bitrate adjustment is performed; assuming that the second scenario is similar to the first scenario, the only difference is that the target application is an instant messaging application, and its corresponding application type weight W app2 = 0, the rate adjustment index k = 0, the threshold is a positive number, k must be less than the threshold, so no rate adjustment is performed. In order to ensure the normal calculation, if there is no switching within the preset period, f and W can be set app2 is a preset value other than 0. By determining the bitrate adjustment index based on this formula, the bitrate can be adjusted dynamically more accurately.
[0142] In one possible implementation, step 203, encoding and wirelessly projecting the content to be projected based on the target bitrate, includes: determining a target resolution for the content to be projected based on the target bitrate, where the target resolution for the content to be projected is lower than the original resolution of the content to be projected; and encoding and wirelessly projecting the content to be projected based on the target resolution. This reduces the bitrate while minimizing the adverse impact on the user experience. The specific process and principles are the same as those of step 105 in the above embodiment and are not further described here.
[0143] As shown in FIG11 , the embodiment of the present application further provides a screen projection method, including:
[0144] Step 301: Determine whether to adjust the bit rate based on the frequency of the current foreground application switching from the background to the foreground within a preset time period. If so, execute step 302: encode and wirelessly project the content to be projected based on the target bit rate. The target bit rate is lower than the original bit rate of the content to be projected. If it is determined to be no in step 301, execute step 303: encode and wirelessly project the content to be projected based on the original bit rate.
[0145] Specifically, the executor of the screen projection method can be a screen projection source device, step 301 can be the same as the above step 107, step 303 can be the same as the above step 108, and step 302 is similar to the above step 105. The difference is that step 303 does not limit the method for determining the target bit rate. The target bit rate determination method in the above embodiment can be applied, or other possible target bit rate determination methods can be applied, as long as the target bit rate is lower than the original bit rate.
[0146] The screen projection method of the embodiment of the present application can predict the probability of the user switching the foreground application in the next period of time based on the user's historical operation behavior. If the probability of the user switching the foreground application next is high, it is more inclined not to adjust the bit rate, because after switching the foreground application, if the bit rate of the foreground application switched to is reduced, it will have a great impact on the user's subjective feelings, which is likely to reduce the user experience; if the probability of the user switching the foreground application next is small, it is more inclined to adjust the bit rate, because the bit rate reduction in a stable scenario has a small impact on the user's perception, and the bit rate reduction is not likely to reduce the user experience. Dynamic bit rate adjustment is implemented according to the switching frequency of the foreground application, which can improve the user experience while reducing power consumption. In addition, the screen projection method in the embodiment of the present application does not need to wait until the temperature rises to a threshold before adjusting the bit rate, but dynamically adjusts the bit rate based on the switching frequency of the foreground application, which can improve the temperature rise of the screen projection source device caused by screen projection, prolong the time of temperature rise, and reduce the probability of abnormalities caused by heat in the device.
[0147] In a possible embodiment, the above-mentioned step 301, determining whether to perform rate adjustment based on the frequency of the current foreground application switching from the background to the foreground within a preset time period, includes: determining whether to perform rate adjustment based on the frequency of the current foreground application switching from the background to the foreground within a preset time period and the second application type weight, the second application type weight being the application type weight corresponding to the target application that is switched to the foreground application within the preset time period, and the target application being an application other than the current foreground application. For example, if the target application that the user has switched to in the recent period is a video application, its corresponding application type weight is larger, and therefore it is more inclined to perform rate adjustment; if the target application that the user has switched to in the recent period is, for example, an instant messaging application, its corresponding application type weight is smaller, and therefore it is more inclined not to perform rate adjustment. Determining whether to perform rate adjustment based on the switching frequency of the foreground application and the application type of the target application switched to can further improve the user experience.
[0148] In a possible implementation, the application type weight corresponding to the video or game application is greater than the application type weight corresponding to other applications.
[0149] In a possible implementation, determining whether to perform rate adjustment based on the frequency of the current foreground application switching from the background to the foreground within a preset time period and the weight of the second application type includes: determining a rate adjustment index based on the frequency of the current foreground application switching from the background to the foreground within a preset time period and the weight of the second application type; if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment; if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment; the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the second application type, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the frequency. That is to say, the higher the frequency of switching from the background to the foreground within the preset time period, the worse the stability of the screen to be projected, and therefore the lower the necessity of bitrate adjustment, and the lower the switching frequency, the higher the stability of the screen to be projected, and therefore the higher the necessity of bitrate adjustment; the higher the application type weight of the target application, the greater the probability that the screen to be projected is a high bitrate, that is, the higher the necessity of bitrate adjustment, and the lower the application type weight of the target application, the smaller the probability that the screen to be projected is a high bitrate, that is, the lower the necessity of bitrate adjustment.
[0150] In one possible implementation, step 303, encoding and wirelessly projecting the content to be projected based on the target bitrate, includes: determining a target resolution for the content to be projected based on the target bitrate, where the target resolution for the content to be projected is lower than the original resolution of the content to be projected; and encoding and wirelessly projecting the content to be projected based on the target resolution. This reduces the bitrate while minimizing the adverse impact on the user experience. The specific process and principles are the same as those in the above embodiment and are not further described here.
[0151] The present application also provides an electronic device, including a processor and a memory, wherein the memory is configured to store at least one instruction. When the instruction is loaded and executed by the processor, the electronic device executes the method of any of the above embodiments. The specific process and principles of the method are the same as those of the above embodiments and are not further described here. The electronic device may specifically be the electronic device illustrated in FIG2 .
[0152] The electronic devices involved in this application may be any product such as smart TVs, mobile phones, tablet computers, personal computers (PCs), personal digital assistants (PDAs), smart watches, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, vehicle-mounted devices, drone devices, smart cars, smart speakers, robots, smart glasses, etc.
[0153] An embodiment of the present application further provides a computer-readable storage medium, comprising a program or instructions. When the program or instructions are run on a computer, the method in any of the above embodiments is executed.
[0154] An embodiment of the present application further provides a computer program product, which includes executable instructions. When the executable instructions are executed on a computer, the computer executes the method in any of the above embodiments.
[0155] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).
[0156] In the embodiments of the present application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0157] The above are merely preferred embodiments of the present application and are not intended to limit the present application. Those skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A screen projection method, characterized in that: include: Obtaining a first application type weight, where the first application type weight is an application type weight corresponding to a current foreground application; Determine whether to perform bit rate adjustment according to the bit rate adjustment parameter, the bit rate adjustment parameter includes the first application type weight, if yes, encode and wirelessly project the content to be projected based on the target bit rate, and the target bit rate is lower than the original bit rate of the content to be projected, if no, encode and wirelessly project the content to be projected based on the original bit rate.
2. The method according to claim 1, characterized in that: The application type weight corresponding to video or game applications is greater than the application type weight corresponding to other applications.
3. The method according to claim 1 or 2, characterized in that: Determining whether to perform bit rate adjustment according to the bit rate adjustment parameter includes: If the weight of the first application type is greater than the preset weight, it is determined to perform rate adjustment; if the weight of the first application type is not greater than the preset weight, it is determined not to perform rate adjustment.
4. The method according to claim 1, characterized in that: The bit rate adjustment parameters also include the frequency of the current foreground application switching from the background to the foreground within a preset time period.
5. The method according to claim 5, characterized in that: The determining whether to perform rate adjustment according to the rate adjustment parameter includes: determining a rate adjustment index according to the rate adjustment parameter, and if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment, and if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment, the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the weight of the first application type, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the frequency.
6. The method according to claim 1 or 4, characterized in that: The bit rate adjustment parameter also includes a second application type weight, where the second application type weight is an application type weight corresponding to a target application that is switched to a foreground application during the preset time period, and the target application is an application other than the current foreground application.
7. The method according to any one of claims 1 to 6, characterized in that The encoding of the content to be projected and the wireless projection based on the target bit rate include: Determining a target resolution of the content to be projected based on a target bit rate, wherein the target resolution of the content to be projected is lower than an original resolution of the content to be projected; The content to be projected is encoded and wirelessly projected based on the target resolution.
8. A screen projection method, characterized in that: include: Whether to perform bitrate adjustment is determined based on the frequency of the current foreground application switching from the background to the foreground within a preset time period. If so, the content to be projected is encoded and wirelessly projected based on the target bitrate, and the target bitrate is lower than the original bitrate of the content to be projected. If not, the content to be projected is encoded and wirelessly projected based on the original bitrate.
9. The method according to claim 8, characterized in that The determining whether to perform bitrate adjustment based on the frequency of the current foreground application switching from the background to the foreground within a preset time period includes: determining whether to perform bitrate adjustment based on the frequency of the current foreground application switching from the background to the foreground within a preset time period and a second application type weight, wherein the second application type weight is an application type weight corresponding to a target application that is switched to the foreground application within the preset time period, and the target application is an application other than the current foreground application.
10. The method according to claim 9, characterized in that The application type weight corresponding to video or game applications is greater than the application type weight corresponding to other applications.
11. The method according to claim 9, characterized in that The determining whether to perform rate adjustment according to the frequency of the current foreground application switching from the background to the foreground within a preset period of time and the second application type weight includes: determining a rate adjustment index according to the frequency of the current foreground application switching from the background to the foreground within a preset period of time and the second application type weight, if the necessity of rate adjustment represented by the rate adjustment index meets the adjustment condition, determining to perform rate adjustment, if the necessity of rate adjustment represented by the rate adjustment index does not meet the adjustment condition, determining not to perform rate adjustment, the necessity of rate adjustment represented by the rate adjustment index is positively correlated with the second application type weight, and the necessity of rate adjustment represented by the rate adjustment index is negatively correlated with the frequency.
12. The method according to any one of claims 8 to 11, characterized in that The encoding of the content to be projected and the wireless projection based on the target bit rate include: Determining a target resolution of the content to be projected based on a target bit rate, wherein the target resolution of the content to be projected is lower than an original resolution of the content to be projected; The content to be projected is encoded and wirelessly projected based on the target resolution.
13. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store at least one instruction, and when the instruction is loaded and executed by the processor, the electronic device executes the method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that: The method comprises a program or an instruction, and when the program or the instruction is run on a computer, the method according to any one of claims 1 to 12 is executed.
15. A computer program product, characterized in that The computer program product comprises executable instructions, and when the executable instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Coded data processing method and device, computer equipment and storage medium
CN111193927A
Method and device for compressing memory
CN113886060A
Screen projection method and device, storage medium and electronic equipment
CN116257195A
Content-aware video coding
US20190014332A1
Cited By
Omnidirectional channel prediction and dynamic coding joint decision-making method, system and medium
CN121357376A