WO2022135093A1 - 画面显示方法、装置及电子设备 - Google Patents

画面显示方法、装置及电子设备 Download PDF

Info

Publication number
WO2022135093A1
WO2022135093A1 PCT/CN2021/134887 CN2021134887W WO2022135093A1 WO 2022135093 A1 WO2022135093 A1 WO 2022135093A1 CN 2021134887 W CN2021134887 W CN 2021134887W WO 2022135093 A1 WO2022135093 A1 WO 2022135093A1
Authority
WO
WIPO (PCT)
Prior art keywords
resolution
client
effective display
display area
picture
Prior art date
Application number
PCT/CN2021/134887
Other languages
English (en)
French (fr)
Inventor
彭帮
吴旺邦
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Priority to US18/256,617 priority Critical patent/US12093592B2/en
Priority to EP21909090.9A priority patent/EP4231650A4/en
Publication of WO2022135093A1 publication Critical patent/WO2022135093A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/36Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of a graphic pattern, e.g. using an all-points-addressable [APA] memory
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/222Secondary servers, e.g. proxy server, cable television Head-end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234363Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
    • H04N21/234372Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution for performing aspect ratio conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25808Management of client data
    • H04N21/25825Management of client data involving client display capabilities, e.g. screen resolution of a mobile phone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440263Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA
    • H04N21/440272Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by altering the spatial resolution, e.g. for displaying on a connected PDA for performing aspect ratio conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/4508Management of client data or end-user data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47214End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for content reservation or setting reminders; for requesting event notification, e.g. of sport results or stock market
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server
    • H04N21/6582Data stored in the client, e.g. viewing habits, hardware capabilities, credit card number
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G2340/00Aspects of display data processing
    • G09G2340/04Changes in size, position or resolution of an image
    • G09G2340/0407Resolution change, inclusive of the use of different resolutions for different screen areas

Definitions

  • the embodiments of the present disclosure relate to the technical field of image display, and in particular, to a picture display method, an apparatus, an electronic device, a storage medium, and a computer program product.
  • the video screen played by the client is output by the server.
  • a live broadcast request is sent to the server, and the server receives the live broadcast request and outputs the corresponding live broadcast to the corresponding client.
  • the resolution of the screen output by the server is the same as the resolution of the virtual display screen of the server.
  • different clients have different screen resolutions.
  • a server with the same resolution ratio must be matched for the client.
  • the resolution ratio of the virtual display screen of the server that needs to be matched to the client should also be 9:16 (for example, it can be 720 ⁇ 1280). If you can't provide a server with the same ratio as the client's display screen, the screen played by the client will have black borders at the top and bottom or all black borders, or even the screen will be cropped or stretched and deformed, which seriously reduces the picture quality.
  • Embodiments of the present disclosure provide a screen display method, apparatus, electronic device, storage medium, and computer program product, so as to overcome the complexity of scheduling matching servers and server management in the prior art, which requires a lot of time and labor costs High and low utilization of server equipment.
  • an embodiment of the present disclosure provides a screen display method, applied to a server, including:
  • an embodiment of the present disclosure provides a screen display method, applied to a client, including:
  • a picture display device including:
  • an acquisition module for acquiring the first resolution of the client display screen
  • an adaptation module configured to adjust the picture to be output according to the first resolution to obtain an effective display picture, and the display ratio of the effective display picture is the same as that of the first resolution
  • the first sending module is configured to send the valid display screen to the client for display.
  • an embodiment of the present disclosure provides a picture display device, including:
  • the second sending module is configured to send the first resolution of the display screen of the client to the server, so that the server adjusts the picture to be output according to the first resolution to obtain an effective display picture, the effective display picture
  • the display ratio of is the same as the ratio of the first resolution
  • a display module configured to receive and display the valid display screen sent by the server.
  • embodiments of the present disclosure provide an electronic device, including: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes computer-executable instructions stored in the memory, causing the at least one processor to perform the first aspect and various possible designs of the first aspect, the second aspect, and various possible designs of the second aspect as described above Design the described screen display method.
  • embodiments of the present disclosure provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the first aspect and the first aspect described above are implemented.
  • various possible designs, the second aspect, and various possible designs of the second aspect are described in the picture display method.
  • embodiments of the present disclosure provide a computer program product, including a computer program, which, when executed by a processor, enables the processor to implement the first aspect and various possible designs, The screen display method described in the second aspect and various possible designs of the second aspect.
  • embodiments of the present disclosure provide a computer program, which, when executed by a processor, enables the processor to implement various possible designs of the first aspect and the first aspect, the second aspect, and the third aspect.
  • various possible designs of the picture display method are described.
  • the method obtains the first resolution of the display screen of the client through the server, and then selects the screen according to the first resolution of the display of the client.
  • the display scale of the picture to be output is adjusted so that the scale of the effective display picture finally output by the server is the same as the scale of the display screen of the client, and then sent to the client for display.
  • the server only needs to obtain the resolution of the client's display screen, and then it can output an effective display screen with the same display ratio as the client, which ensures that the screen displayed by the client will not appear black borders, and there will be no screen deformation.
  • the effect that a server can support clients with different resolutions is realized, the management complexity of the server is reduced, and the utilization rate of the server equipment is improved.
  • FIG. 1 is a schematic diagram 1 of a picture adaptation result in the prior art
  • FIG. 2 is a schematic diagram 2 of a picture adaptation result in the prior art
  • FIG. 3 is a schematic diagram 3 of a picture adaptation result in the prior art
  • FIG. 4 is an application scenario diagram 1 of the screen display method provided by the embodiment of the present disclosure.
  • FIG. 5 is a schematic flowchart 1 of a screen display method according to an embodiment of the present disclosure.
  • FIG. 6 is a second schematic flowchart of a screen display method according to an embodiment of the present disclosure.
  • FIG. 7 is a third schematic flowchart of a screen display method provided by an embodiment of the present disclosure.
  • FIG. 8 is a second application scenario diagram of the screen display method provided by the embodiment of the present disclosure.
  • FIG. 9 is an application scenario diagram 3 of the screen display method provided by the embodiment of the present disclosure.
  • FIG. 10 is a fourth application scenario diagram of the screen display method provided by the embodiment of the present disclosure.
  • FIG. 11 is an application scenario diagram 5 of the screen display method provided by the embodiment of the present disclosure.
  • FIG. 12 is a schematic structural diagram 1 of a screen display device provided by an embodiment of the present disclosure.
  • FIG. 13 is a schematic structural diagram of an adaptation module in a picture display device according to an embodiment of the present disclosure.
  • FIG. 14 is a second schematic structural diagram of a screen display device according to an embodiment of the present disclosure.
  • FIG. 15 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure.
  • the video screen played by the client is output by the server.
  • a live broadcast request is sent to the server, and the server receives the live broadcast request and outputs the corresponding live broadcast to the corresponding client.
  • the resolution of the screen output by the server is the same as the resolution of the virtual display screen of the server.
  • the resolutions displayed by different clients are different.
  • a server with the same resolution ratio must be matched for the client. If it cannot provide the same ratio as the client's display screen On the server side, the screen played by the client will have black borders up and down or all black borders, and even the screen will be cropped or stretched and deformed, which seriously affects the picture quality.
  • the client display screen resolution (horizontal pixels ⁇ vertical pixels) is 720 ⁇ 1280, and its resolution ratio is 9:16
  • the corresponding virtual display screen of the server that matches the client is given.
  • the resolution ratio is also 720 ⁇ 1280, then the display ratio of the server virtual display screen is the same as that of the client display screen, both of which are 9:16.
  • the screen output by the server (the elements in the screen include "display" two characters) can be displayed in full screen on the client display screen.
  • the actual display screen on the client display screen may have upper and lower black borders ( As shown in a in Figure 2), or, the screen is vertically stretched so that the client can display it in full screen but the top and bottom of the screen are stretched and deformed (as shown in b in Figure 2), or, the screen is enlarged in the same proportion to make the client full screen is displayed, but the picture is cropped left and right (as shown in c in Figure 2).
  • the actual display image on the client display screen may have left and right black borders ( As shown in a in Figure 3), or, the screen is stretched left and right so that the client can display it in full screen but the screen is stretched and deformed in the left and right directions (as shown in b in Figure 3), or, the screen is enlarged in the same proportion so that the client can display
  • the end display screen can be displayed in full screen but is cropped up and down (as shown in c in Figure 3).
  • the technical concept of the embodiments of the present disclosure mainly includes: providing a method for multi-resolution image adaptation, in which the server adjusts the to-be-output image according to the resolution of the client display screen, so that an effective display obtained after adjustment is performed.
  • the ratio of the screen is the same as the resolution ratio of the client display screen, so that the effective display screen is sent to the client for display.
  • the server only needs to obtain the client
  • the resolution of the display screen can output an effective display screen with the same display ratio as that of the client.
  • the server adjusts the to-be-output image according to the resolution of the display screen of the client, it may not directly send the adjusted image to the client for display, but first display the screen virtually on the server according to the resolution of the display screen of the client.
  • the effective display area is divided into the effective display area, and the proportion of the effective display area is the same as that of the client display screen.
  • the adjusted to-be-output image is projected into the effective display area, and then the server displays the entire display image of its virtual display screen.
  • Sent to the client that is, the ratio of the entire display screen sent to the client is the ratio of the virtual display screen of the server.
  • the client After receiving the entire display, the client extracts the effective display in the effective display area of the entire display.
  • the server-side encoding and transmission are always the size of the server-side virtual display screen.
  • the resolution of the entire display screen transmitted by the server-side is the same, but the clients with different resolutions have their own
  • the resolutions of the valid display images in the corresponding valid display area are inconsistent, which is beneficial for the server to continuously push the stream without the need to reconfigure the decoder after the client resolution changes.
  • FIG. 4 is an application scenario diagram 1 of the screen display method provided by the embodiment of the present disclosure.
  • the basic architecture of the application scenario provided by the embodiment of the present disclosure mainly includes: at least one server 401 and a client 402; when a user uses the client to live broadcast or watch a video, click the corresponding Send an acquisition request to at least one server.
  • at least one server schedules a server with the same resolution ratio as the client's display screen in at least one server.
  • the virtual display screen has the same resolution ratio as the client display screen, and the first server outputs the corresponding live or video image to the client; if there is no server with the same resolution ratio as the client 402 in at least one server , then select a server that is currently in an idle state to output the screen requested by the client.
  • FIG. 5 is a schematic flow chart 1 of a screen display method provided by an embodiment of the present disclosure.
  • the execution body of the method provided by the embodiment of the present disclosure is a server.
  • the method provided by the embodiment of the present disclosure may include the following steps.
  • the client when the user uses the client to live broadcast or watch a video, click the corresponding playback control, and then the client sends a scheduling request to at least one server, the scheduling request carries the first resolution of the display screen of the client, and the at least one server sends a scheduling request.
  • the server After receiving the scheduling request sent by the client, a server that is currently in an idle state is scheduled, and the server parses the scheduling request to obtain the first resolution of the display screen of the client.
  • each server adds a scheduling request to a waiting queue, and processes the scheduling request when one of the servers finishes executing tasks. It should be noted that when a server starts to process a scheduling request, the server will send instruction information to other servers to instruct other servers to clear the scheduling request from the waiting queue, so as to avoid multiple servers from repeatedly processing the request. Schedule request.
  • S502 Adjust the picture to be output according to the first resolution to obtain an effective display picture, where the display ratio of the effective display picture is the same as that of the first resolution.
  • the ratio of the first resolution is the ratio of horizontal pixels to vertical pixels
  • the image to be output is an image that the server needs to push to the client.
  • the server determines the aspect ratio of the client display screen according to the first resolution, that is, the ratio of horizontal pixels to vertical pixels in the first resolution, and rearranges the output screen according to the aspect ratio of the client display screen,
  • the adjusted aspect ratio of the image to be output is made equal to the aspect ratio of the client display screen.
  • the server determines the aspect ratio of the display screen of the client to be 9:16 after receiving the first resolution of the display screen of the client.
  • the server will output a picture with a resolution of 720 ⁇ 1440 (width-height ratio of 1:2) to the client, because the width-height ratio of the client-side display screen is different from that of the server-side output screen. , which will cause black borders or the screen to be clipped, stretched and deformed when the client displays the screen.
  • the server automatically rearranges and adjusts the elements in the screen to be output, so that the adjusted resolution of the screen to be output (ie, the effective display screen) is 720 ⁇ 1280, and the adjusted aspect ratio of the screen to be output Also 9:16.
  • S503 Send the valid display screen to the client for display.
  • the server adjusts the aspect ratio of the screen to be output to be consistent with the aspect ratio of the display screen of the client, so that the aspect ratio of the effective display screen received by the client is the same as that of the display screen of the client.
  • the aspect ratio is the same, and the client only needs to tile the display to display the effective display screen normally in full screen, without stretching, cropping and other operations on the screen, and there will be no black borders, which ensures the quality of the screen.
  • FIG. 6 is a second schematic flowchart of a screen display method provided by an embodiment of the present disclosure.
  • the embodiment of the present disclosure takes the interaction between a server and a client as an example, and further describes the screen display method in detail based on the embodiment shown in FIG. 5 and an example.
  • the method provided by the embodiment of the present disclosure may include the following steps.
  • the client sends the first resolution of the display screen to the server.
  • a user uses a client such as a mobile phone, tablet, monitor, etc. to perform live broadcast or watch a video, click the corresponding live broadcast control or video playback control on the display screen in a touch-controlled manner, or use a remote control to select a video to be played, then
  • the client sends a resolution scheduling request carrying the display screen of the client to the server, and the server can parse the resolution of the display screen of the client from the received scheduling request.
  • the client terminal sends scheduling requests to multiple server devices at the same time, and the multiple server devices schedule a server currently in an idle state to output a corresponding screen for the client.
  • the background server includes three devices: server A, server B, and server C.
  • the user uses the mobile phone 801 to perform live broadcast. When the user clicks the start live broadcast control on the screen of the mobile phone, the mobile phone sends the message to the mobile phone.
  • the three servers send scheduling requests that carry the screen resolution of the mobile phone. If server A is currently idle, after server A receives the scheduling request sent by the mobile phone, server A will output the live screen to the mobile phone, and server A will send the live screen to the other mobile phones.
  • the two servers B and C send the indication information. After the servers B and C receive the indication information, they will not process the scheduling request sent by the mobile phone, so as to avoid multiple servers from repeatedly processing the scheduling request.
  • the display 802 will send a scheduling request with the display resolution to the servers A, B and C. Since the server A is currently outputting the live image to the mobile phone 801 , one of the servers B and C is selected to output the video image to the display 802 .
  • each server adds a scheduling request to the waiting queue, and processes the scheduling request when one of the servers completes the task execution.
  • the server determines, according to the received first resolution, an effective display area of the to-be-output image on the server's virtual display screen, where the ratio of the effective display area is the same as the ratio of the first resolution.
  • the method for the server to determine, according to the received first resolution, the effective display area of the to-be-output image in the server virtual display screen may include the following steps.
  • the background picture is created according to the resolution of the virtual display screen of the server, and the resolution of the created background picture is the same as the physical resolution of the virtual display screen.
  • the size of the created background image is also 720 ⁇ 1440.
  • S6022 Determine the width and height of the effective display area according to the first resolution and the second resolution.
  • the width and height of the effective display area are determined according to the first horizontal pixel (width) and the first vertical pixel (height) of the client display screen and the second horizontal pixel and the second vertical pixel of the created background image , so that the aspect ratio of the effective display area is consistent with the aspect ratio of the client display screen.
  • the ratio of the first vertical pixel to the first horizontal pixel of the first resolution is determined, and the ratio (ratio) of the height to the width of the display screen of the client is obtained. If it is determined that the second vertical pixel of the second resolution (that is, the height of the background image) is greater than the product of the second horizontal pixel of the second resolution (that is, the width of the background image) and the ratio, then the The second horizontal pixel is determined as the width of the effective display area, and the product of the second horizontal pixel and the ratio is determined as the height of the effective display area; if the second vertical pixel of the second resolution is determined Less than or equal to the product of the second horizontal pixel of the second resolution and the ratio, then the second vertical pixel is determined as the height of the effective display area, and the second vertical pixel is compared with the ratio. Division, and the division result is determined as the width of the effective display area.
  • S6023 Determine the coordinate information of the effective display area relative to the background image according to the height and width of the effective display area.
  • a coordinate system is established with the lower left corner of the background image as the coordinate origin. If the resolution of the virtual display screen of the server is 720 ⁇ 1440, then each vertex of the background image is in the coordinate system. The coordinates of are shown in b in Figure 9.
  • the abscissa and ordinate of the first vertex of the effective display area are determined, wherein the abscissa of the first vertex is half of the difference between the width of the second horizontal pixel and the effective display area , the ordinate of the first vertex is half of the difference between the height of the second vertical pixel and the effective display area.
  • the second vertex is the diagonal vertex of the first vertex
  • the abscissa of the second vertex is the first vertex
  • the sum of the abscissa and the width of the effective display area, the ordinate of the second vertex is the sum of the ordinate of the first vertex and the height of the effective display area.
  • the effective display area is divided in the background picture.
  • the coordinates of the first vertex of the effective display area are (offX, offY), and the coordinates of the second vertex are (offX+outWidth, offY+outHeight).
  • displayAspect in the first line of code represents the ratio of the height (first vertical pixel) and width (first horizontal pixel) of the client display screen
  • videoHeight represents the height of the server virtual display screen (ie the second vertical pixel)
  • videoWidth represents the width of the server-side virtual display screen (ie, the second horizontal pixel)
  • outHeight represents the height of the effective display area
  • outWidth represents the width of the effective display area.
  • the effective display area is centered in the background image.
  • the resolution of the server-side virtual display screen is 720 ⁇ 1440 (that is, the width ⁇ height of the created background image), and the client-side display screen has a resolution of 720 ⁇ 1280
  • the coordinates of the first vertex are (0, 80)
  • the coordinate of the second vertex is (720, 1360)
  • the resolution of the virtual display screen of the server is 720 ⁇ 1440 (that is, the width ⁇ height of the created background image)
  • the resolution of the display screen of the client is 720 ⁇ 1680
  • the height of the background picture is 1440, and the width of the effective display area is 1440/(21/9), rounding up an integer is approximately equal to 618, that is, the resolution of the effective display area is 618 ⁇ 1440.
  • the coordinate of the first vertex is (51, 0)
  • the coordinate of the second vertex is (669, 1440).
  • the server rearranges the to-be-output image, and projects the rearranged to-be-output image into the effective display area.
  • the to-be-output picture that is, according to the height and width of the effective display area, adjust the vertical pixels and horizontal pixels of the to-be-output picture pixels, so that the vertical pixels of the picture to be output are equal to the height of the effective display area and the horizontal pixels of the picture to be output are equal to the width of the effective display area, and then the adjusted picture to be output is projected onto the background within the effective display area on the screen.
  • the technician needs to create a background image with the same resolution as that of the virtual display screen of the server.
  • the corresponding code is IBinder createDisplay(String name, boolean secure), and the background image is created. After that, according to the previously determined coordinate information of the effective display area, set the effective display area in the background image.
  • the server-side system re-layouts and projects the to-be-output image into the effective display area according to the effective display area set by the technician. Since the proportion of the divided effective display area is the same as that of the client's display screen, the server-side direct Layout the to-be-output image into an effective display image with the same proportion as the client display screen, without stretching or cropping the image.
  • the server sends the entire display image in its virtual display screen to the client.
  • the entire display image on the server-side virtual display screen is the created background image, and an effective display area is set in the background image, and the image displayed in the effective display area is an effective display image with the same scale as the client display screen. That is, for clients with different resolutions, the picture sent by the server to the client is always the background picture with the same size as the virtual display screen of the server, but the effective display picture in the effective display area set in the background picture is inconsistent, and the effective display Regions are adjusted based on client resolution.
  • the resolution of the virtual display screen of the server is 720 ⁇ 1440
  • the resolution of the display screen of the first client is 720 ⁇ 1280
  • the resolution of the display screen of the second client is 720 ⁇ 1680
  • the size of the background images sent by the server to the first client and the second client is the same, 720 ⁇ 1440, but the valid display images in the background images sent to the two clients are inconsistent, and sent to the first client
  • the effective display picture in the background picture of the client is 720 ⁇ 1280
  • the effective display picture in the background picture sent to the second client is 618 ⁇ 1440.
  • the client receives the entire display screen.
  • the client extracts the pictures in the effective display area of the entire display picture for display.
  • the client after the client receives the entire display image in the virtual display screen sent by the server (that is, the background image on which the effective display image is projected), since the ratio of the effective display area in the background image is the same as the ratio of the client display screen , the client will automatically extract the effective display in the effective display area, and since the ratio of the extracted effective display is the same as that of the client's display, as shown in Figure 11, the client only needs to tile the display.
  • the extracted effective display picture can be displayed normally on the display screen without stretching, cropping and other operations on the picture, which ensures the picture quality displayed by the client.
  • FIG. 12 is a first structural schematic diagram of an image display device according to an embodiment of the present disclosure.
  • the apparatus includes: an acquisition module 121, an adaptation module 122, and a first sending module 123; wherein, the acquisition module 121 is used to acquire the first resolution of the display screen of the client;
  • the configuration module 122 is used to adjust the picture to be output according to the first resolution to obtain an effective display picture, and the display ratio of the effective display picture is the same as that of the first resolution;
  • the first sending module 123 is used for Send the valid display screen to the client for display.
  • the adaptation module includes:
  • the determining unit 1221 is configured to determine, according to the first resolution, the effective display area of the to-be-output image on the server-side virtual display screen, and the ratio of the effective display area is the same as the ratio of the first resolution;
  • the projection unit 1222 is configured to rearrange the to-be-output image, and project the rearranged to-be-output image into the effective display area to obtain an effective display image.
  • the determining unit includes:
  • a creation subunit is used to create a background picture, the second resolution of the background picture is the same as the resolution of the virtual display screen of the server;
  • a calculation subunit for determining the width and height of the effective display area according to the first resolution and the second resolution
  • the calculation subunit is further configured to: determine the coordinate information of the effective display area relative to the background image according to the height and width of the effective display area;
  • a dividing subunit configured to divide the effective display area in the background picture according to the coordinate information.
  • calculation subunit is specifically used for:
  • the second horizontal pixel is determined as the width of the effective display area, determining the product of the second horizontal pixel and the ratio as the height of the effective display area;
  • the second vertical pixel of the second resolution is less than or equal to the product of the second horizontal pixel of the second resolution and the ratio, the second vertical pixel is determined as the height of the effective display area , dividing the second vertical pixel by the ratio, and determining the division result as the width of the effective display area.
  • calculation subunit is specifically used for:
  • the second vertex is the diagonal vertex of the first vertex
  • the abscissa of the second vertex is the abscissa of the first vertex
  • the ordinate of the second vertex is the sum of the ordinate of the first vertex and the height of the effective display area.
  • the projection unit is specifically used for:
  • the vertical pixels and horizontal pixels of the to-be-output image are adjusted so that the vertical pixels of the to-be-output image are equal to the height of the effective display area and the horizontal pixels of the to-be-output image are equal to is equal to the width of the effective display area;
  • the first sending module is specifically used for:
  • the acquiring module is specifically configured to: receive a device scheduling request sent by the client, the device scheduling request is used to schedule idle servers, and the device scheduling request carries the resolution of the display screen of the client; When it is determined that the server that the client requests for scheduling is itself, the device scheduling request is parsed to obtain the first resolution of the display screen of the client.
  • FIG. 14 is a second schematic structural diagram of an image display device according to an embodiment of the present disclosure.
  • the screen display device includes: a second sending module 141 and a display module 142 ; wherein the second sending module 141 is configured to send the first resolution of the display screen of the client terminal to the server, so that the server adjusts the picture to be output according to the first resolution to obtain an effective display picture, and the display ratio of the effective display picture is the same as that of the first resolution; the display module 142, It is used to receive and display the valid display screen sent by the server.
  • the display module is specifically used for:
  • the effective display area is divided by the server in the background image according to the first resolution, and the effective display image is the server
  • the to-be-output picture is rearranged, and the rearranged to-be-output picture is projected into the effective display area.
  • the second sending module is specifically configured to: send a device scheduling request, where the device scheduling request is used to schedule idle servers, and the device scheduling request carries the first resolution of the display screen of the client to The server is made to parse the device scheduling request to obtain the first resolution of the display screen of the client.
  • the electronic device 150 may be a terminal device or a server.
  • the terminal equipment may include, but is not limited to, such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (Personal Digital Assistant, referred to as PDA), tablet computers, portable multimedia players (Portable Media Player, referred to as PMP), vehicle Mobile terminals such as terminals such as in-vehicle navigation terminals, etc., and stationary terminals such as digital TVs, desktop computers, and the like.
  • PDA Personal Digital Assistant
  • PMP portable multimedia players
  • vehicle Mobile terminals such as terminals such as in-vehicle navigation terminals, etc.
  • stationary terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 15 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 150 may include a processing device (such as a central processing unit, a graphics processor, etc.) 1501, which may be stored in a read only memory (Read Only Memory, ROM for short) 1502 according to a program or from a storage device 1508 is a program loaded into a random access memory (Random Access Memory, RAM for short) 1503 to perform various appropriate actions and processes.
  • ROM Read Only Memory
  • RAM Random Access Memory
  • various programs and data required for the operation of the electronic device 150 are also stored.
  • the processing device 1501, the ROM 1502, and the RAM 1503 are connected to each other through a bus 1504.
  • An input/output (I/O) interface 1505 is also connected to bus 1504 .
  • the following devices can be connected to the I/O interface 1505: input devices 1506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD for short) ), speaker, vibrator, etc. output device 1507; storage device 1508 including, eg, magnetic tape, hard disk, etc.; and communication device 1509. Communication means 1509 may allow electronic device 150 to communicate wirelessly or by wire with other devices to exchange data. While FIG. 15 shows an electronic device 150 having various means, it should be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
  • input devices 1506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.
  • LCD Liquid Crystal Display
  • speaker vibrator
  • storage device 1508 including, eg, magnetic tape, hard disk, etc.
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method shown in the flowchart, when the computer program is When executed by the processor, the processor is caused to perform the above-mentioned functions defined in the methods of the embodiments of the present disclosure.
  • the computer program may be downloaded and installed from the network via the communication device 1509, or from the storage device 1508, or from the ROM 1502.
  • the processing apparatus 1501 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable Read Only Memory (EPROM or Flash), Optical Fiber, Portable Compact Disc-Read Only Memory (CD-ROM), Optical Storage Device, Magnetic Storage Device, or any suitable of the above The combination.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • the program code embodied on the computer-readable medium may be transmitted by any suitable medium, including but not limited to: electric wire, optical fiber cable, radio frequency (RF), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more computer programs, and when the above-mentioned one or more computer programs are executed by the electronic device, causes the electronic device to execute the methods shown in the above-mentioned embodiments.
  • the computer program includes computer program code that may be written in one or more programming languages, including object-oriented programming languages, such as Java, or a combination thereof, for performing operations of the present disclosure , Smalltalk, C++, and also conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, can be connected to an external A computer (eg using an internet service provider to connect via the internet).
  • LAN Local Area Network
  • WAN Wide Area Network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner.
  • the name of the unit does not constitute a limitation of the unit itself under certain circumstances, for example, the first obtaining unit may also be described as "a unit that obtains at least two Internet Protocol addresses".
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (Application Specific Standard Products) Standard Product, ASSP), system on chip (System On Chip, SOC), complex programmable logic device (Complex Programmable Logic Device, CPLD) and so on.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSP Application Specific Standard Products
  • ASOC System On Chip
  • complex programmable logic device Complex Programmable Logic Device, CPLD
  • a computer-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium.
  • Computer-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • Computer-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • optical storage devices magnetic storage devices, or any suitable combination of the foregoing.
  • a screen display method which is applied to a server, and the method includes:
  • the adjusting the picture to be output according to the first resolution to obtain a valid display picture includes:
  • the first resolution determine the effective display area of the to-be-output image on the server-side virtual display screen, and the ratio of the effective display area is the same as the ratio of the first resolution
  • the to-be-output picture is rearranged, and the rearranged to-be-output picture is projected into the effective display area to obtain an effective display picture.
  • the determining, according to the first resolution, an effective display area of the to-be-output image on the server-side virtual display screen includes:
  • the second resolution of the background picture is the same as the resolution of the virtual display screen of the server;
  • the effective display area is divided in the background image according to the coordinate information.
  • the determining the width and height of the effective display area according to the first resolution and the second resolution includes:
  • the second horizontal pixel is determined as the width of the effective display area, determining the product of the second horizontal pixel and the ratio as the height of the effective display area;
  • the second vertical pixel of the second resolution is less than or equal to the product of the second horizontal pixel of the second resolution and the ratio, the second vertical pixel is determined as the height of the effective display area , divide the second vertical pixel by the ratio, and determine the division result as the width of the effective display area.
  • determining the coordinate information of the effective display area relative to the background image according to the height and width of the effective display area includes:
  • the second vertex is the diagonal vertex of the first vertex
  • the abscissa of the second vertex is the abscissa of the first vertex
  • the ordinate of the second vertex is the sum of the ordinate of the first vertex and the height of the effective display area.
  • the rearranging the to-be-output picture and projecting the rearranged to-be-output picture into the effective display area includes:
  • the vertical pixels and horizontal pixels of the to-be-output image are adjusted so that the vertical pixels of the to-be-output image are equal to the height of the effective display area and the horizontal pixels of the to-be-output image are equal to is equal to the width of the effective display area;
  • the sending the valid display screen to the client for display includes:
  • the obtaining the first resolution of the display screen of the client includes:
  • the device scheduling request is used to schedule idle servers, and the device scheduling request carries the resolution of the display screen of the client;
  • the device scheduling request is parsed to obtain the first resolution of the display screen of the client.
  • the obtaining the first resolution of the display screen of the client includes:
  • the first resolution of the display screen returned by the client is received.
  • a screen display method which is applied to a client, and the method includes:
  • the receiving and displaying the valid display screen sent by the server includes:
  • the effective display area is divided by the server in the background image according to the first resolution, and the effective display image is the server
  • the to-be-output picture is rearranged, and the rearranged to-be-output picture is projected into the effective display area.
  • the sending the first resolution of the display screen of the client to the server includes:
  • the device scheduling request is used to schedule idle servers, and the device scheduling request carries the first resolution of the display screen of the client, so that the server parses the device scheduling request and obtains The client displays the first resolution of the screen.
  • a screen display device comprising: an acquisition module, an adaptation module and a first sending module; wherein, the acquisition module is used to acquire the data of the client display screen. a first resolution; an adaptation module, configured to adjust the picture to be output according to the first resolution to obtain an effective display picture, the display ratio of the effective display picture is the same as that of the first resolution; the first sending The module is configured to send the valid display screen to the client for display.
  • the adaptation module includes:
  • a determining unit configured to determine, according to the first resolution, an effective display area of the to-be-output image on the server-side virtual display screen, where the ratio of the effective display area is the same as the ratio of the first resolution;
  • the projection unit is configured to rearrange the to-be-output picture, and project the rearranged to-be-output picture into the effective display area to obtain an effective display picture.
  • the determining unit includes:
  • a creation subunit is used to create a background picture, the second resolution of the background picture is the same as the resolution of the virtual display screen of the server;
  • a calculation subunit for determining the width and height of the effective display area according to the first resolution and the second resolution
  • the calculation subunit is further configured to: determine the coordinate information of the effective display area relative to the background image according to the height and width of the effective display area;
  • a dividing subunit configured to divide the effective display area in the background image according to the coordinate information.
  • the computing subunit is specifically used for:
  • the second horizontal pixel is determined as the width of the effective display area, determining the product of the second horizontal pixel and the ratio as the height of the effective display area;
  • the second vertical pixel of the second resolution is less than or equal to the product of the second horizontal pixel of the second resolution and the ratio, the second vertical pixel is determined as the height of the effective display area , divide the second vertical pixel by the ratio, and determine the division result as the width of the effective display area.
  • the computing subunit is specifically used for:
  • the second vertex is the diagonal vertex of the first vertex
  • the abscissa of the second vertex is the abscissa of the first vertex
  • the ordinate of the second vertex is the sum of the ordinate of the first vertex and the height of the effective display area.
  • the projection unit is specifically used for:
  • the vertical pixels and horizontal pixels of the to-be-output image are adjusted so that the vertical pixels of the to-be-output image are equal to the height of the effective display area and the horizontal pixels of the to-be-output image are equal to is equal to the width of the effective display area;
  • the first sending module is specifically configured to:
  • the obtaining module is specifically configured to: receive a device scheduling request sent by a client, where the device scheduling request is used to schedule idle servers, and the device scheduling request carries the client The resolution of the display screen of the terminal; when it is determined that the server that the client requests for scheduling is itself, the device scheduling request is parsed to obtain the first resolution of the display screen of the client.
  • a picture display device comprising: a second sending module and a display module; wherein the second sending module is used to display the display screen of the client
  • the first resolution is sent to the server, so that the server adjusts the screen to be output according to the first resolution to obtain an effective display screen, and the display ratio of the effective display screen is the same as the ratio of the first resolution ;
  • a display module for receiving and displaying the valid display screen sent by the server.
  • the display module is specifically used for:
  • the effective display area is divided by the server in the background image according to the first resolution, and the effective display image is the server
  • the to-be-output picture is rearranged, and the rearranged to-be-output picture is projected into the effective display area.
  • the second sending module is specifically configured to: send a device scheduling request, where the device scheduling request is used to schedule idle servers, and the device scheduling request carries the client display The first resolution of the screen, so that the server parses the device scheduling request to obtain the first resolution of the display screen of the client.
  • an embodiment of the present disclosure provides an electronic device, including: at least one processor and a memory;
  • the memory stores computer-executable instructions
  • the at least one processor executes computer-executable instructions stored in the memory, causing the at least one processor to perform the first aspect and various possible designs of the first aspect, the second aspect, and various possible designs of the second aspect as described above Design the described screen display method.
  • embodiments of the present disclosure provide a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and when a processor executes the computer-executable instructions, the above-mentioned first aspect and Various possible designs of the first aspect, the second aspect, and various possible designs of the second aspect are described in the picture display method.
  • embodiments of the present disclosure provide a computer program product, including a computer program, which, when executed by a processor, enables the processor to implement the first aspect and various possible designs of the first aspect , the second aspect, and the picture display method described in various possible designs of the second aspect.
  • embodiments of the present disclosure provide a computer program, which, when executed by a processor, enables the processor to implement the first aspect and various possible designs of the first aspect, the second aspect, and the In the second aspect, various possible designs are described in the picture display method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Business, Economics & Management (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Transforming Electric Information Into Light Information (AREA)

Abstract

本公开实施例提供一种画面显示方法、装置、电子设备、存储介质及计算机程序产品,该方法包括:获取客户端显示屏幕的第一分辨率;根据第一分辨率调整待输出画面得到有效显示画面,有效显示画面的显示比例和第一分辨率的比例相同;将有效显示画面发送至客户端显示。本公开实施例针对不同分辨率的客户端,不需要技术人员部署更多种显示比例的服务端,也不需要为不同分辨率的客户端去匹配相同比例分辨率的服务端,只需要获取到客户端显示屏幕的分辨率,便可以输出与客户端相同显示比例的有效显示画面,在保证客户端显示的画面不出现黑边、不会变形的情况下,实现了一个服务端能够支持各种不同分辨率的客户端的效果,降低了服务端的管理复杂度、提高服务端设备利用率。

Description

画面显示方法、装置及电子设备
本申请要求于2020年12月25日提交的申请号为202011566807.3、名称为“画面显示方法、装置及电子设备”的中国专利申请的优先权,此申请的内容通过引用并入本文。
技术领域
本公开实施例涉及图像显示技术领域,尤其涉及一种画面显示方法、装置、电子设备、存储介质及计算机程序产品。
背景技术
近年来,科学技术和互联网技术迅速发展,越来越多的智能终端设备应运而生,人们可以使用手机、电脑、显示器等终端设备直播、看视频、玩游戏等,极大的丰富了人们的生活。随着社会生活水平的提高,人们对这些终端设备的功能效果要求也越来越高,比如,人们在进行直播、看视频、玩游戏等娱乐活动时,对直播画面、视频画面以及游戏画面的观看质量要求越来越高。
相关技术中,客户端播放的视频画面是由服务端输出的,比如,用户使用客户端进行直播时,向服务端发送直播请求,服务端接收到直播请求之后向相应的客户端输出相应的直播画面,服务端输出的画面的分辨率与服务端的虚拟显示屏幕的分辨率相同。然而,不同的客户端显示屏幕的分辨率是不同的,若要保证客户端播放的画面质量,则必须为客户端匹配一个相同分辨率比例的服务端。比如,客户端显示屏幕分辨率为720×1280,其分辨率比例为9:16,则需要给该客户端匹配的服务端的虚拟显示屏幕的分辨率比例也应该为9:16(比如可以是720×1280)。如果不能提供和客户端显示屏幕比例一样的服务端,客户端播放的画面就会出现上下黑边或者所有黑边,甚至画面被裁剪或者被拉伸变形,严重影像了画面质量。
由于针对每个客户端都要为其匹配分辨率比例相同的服务端,需要耗费大量的时间成本和人力成本去调度匹配服务端。并且一个服务端只能支持同样比例分辨率的客户端,因此若要保证所有分辨率的客户端播放画面质量,就需要部署更多支持不同比例的分辨率的服务端,从而导致服务端的管理复杂度高,设备利用率低。
发明内容
本公开实施例提供一种画面显示方法、装置、电子设备、存储介质及计算机程序产品,以克服现有技术中,需要耗费大量的时间成本和人力成本去调度匹配服务端、服务端管理复杂度高以及服务端设备利用率低的问题。
第一方面,本公开实施例提供一种画面显示方法,应用于服务端,包括:
获取客户端显示屏幕的第一分辨率;
根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
将所述有效显示画面发送至所述客户端显示。
第二方面,本公开实施例提供一种画面显示方法,应用于客户端,包括:
将所述客户端的显示屏幕的第一分辨率发送至服务端,以使所述服务端根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
接收并显示所述服务端发送的所述有效显示画面。
第三方面,本公开实施例提供一种画面显示装置,包括:
获取模块,用于获取客户端显示屏幕的第一分辨率;
适配模块,用于根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
第一发送模块,用于将所述有效显示画面发送至所述客户端显示。
第四方面,本公开实施例提供一种画面显示装置,包括:
第二发送模块,用于将客户端的显示屏幕的第一分辨率发送至服务端,以使所述服务端根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
显示模块,用于接收并显示所述服务端发送的所述有效显示画面。
第五方面,本公开实施例提供一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上述第一方面以及第一方面各种可能的设计、第二方面以及第二方面各种可能的设计所述的画面显示方法。
第六方面,本公开实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上述第一方面以及第一方面各种可能的设计、第二方面以及第二方面各种可能的设计所述的画面显示方法。
第七方面,本公开实施例提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,使得所述处理器实现如上述第一方面以及第一方面各种可能的设计、第二方面以及第二方面各种可能的设计所述的画面显示方法。
第八方面,本公开实施例提供一种计算机程序,所述计算机程序被处理器执行时,使得所述处理器实现如上述第一方面以及第一方面各种可能的设计、第二方面以及第二方面各种可能的设计所述的画面显示方法。
本公开实施例提供的画面显示方法、装置、电子设备、存储介质及计算机程序产品,该方法通过服务端获取客户端显示屏幕的第一分辨率,然后根据客户端显示屏幕的第一分辨率去调整待输出画面的显示比例,使得服务端最终输出的有效显示画面的比例和客户端显示屏幕的比例相同,进而在发送至所述客户端显示。本公开实施例提供的方法中,针对不同分辨率的客户端,不需要技术人员部署更多种显示比例的服务端,也不需要为不同分辨率的客户端去匹配相同比例分辨率的服务端,服务端只需要获取到客户端显示屏幕的分辨率,便可以输出与客户端相同显示比例的有效显示画面,在保证了客户端显示的画面不会出现黑边,也不会出现画面变形的情况下,实现了一个服务端能够支持各种不同分辨率的客户端的效果,降低了服务端的管理复杂度、提高服务端设备利用率。
附图说明
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为现有技术中的画面适配结果的示意图一;
图2为现有技术中的画面适配结果的示意图二;
图3为现有技术中的画面适配结果的示意图三;
图4为本公开实施例提供的画面显示方法的应用场景图一;
图5为本公开实施例提供的画面显示方法流程示意图一;
图6为本公开实施例提供的画面显示方法流程示意图二;
图7为本公开实施例提供的画面显示方法流程示意图三;
图8为本公开实施例提供的画面显示方法的应用场景图二;
图9为本公开实施例提供的画面显示方法的应用场景图三;
图10为本公开实施例提供的画面显示方法的应用场景图四;
图11为本公开实施例提供的画面显示方法的应用场景图五;
图12为本公开实施例提供的画面显示装置的结构示意图一;
图13为本公开实施例提供的画面显示装置中适配模块的结构示意图;
图14为本公开实施例提供的画面显示装置的结构示意图二;
图15为本公开实施例提供的电子设备的硬件结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
相关技术中,客户端播放的视频画面是由服务端输出的,比如,用户使用客户端进行直播时,向服务端发送直播请求,服务端接收到直播请求之后向相应的客户端输出相应的直播画面,服务端输出的画面的分辨率与服务端的虚拟显示屏幕的分辨率相同。然而,不同的客户端显示屏幕的分辨率是不同的,若要保证客户端播放的画面质量,则必须为客户端匹配一个相同分辨率比例的服务端,如果不能提供和客户端显示屏幕比例一样的服务端,客户端播放的画面就会出现上下黑边或者所有黑边,甚至画面被裁剪或者被拉伸变形,严重影像了画面质量。示例性的,如图1所示,若客户端显示屏幕分辨率(水平像素×垂直像素)为720×1280,其分辨率比例为9:16,给该客户端匹配的服务端的虚拟显示屏幕的分辨率比例也为720×1280,则服务端虚拟显示屏幕的显示比例和客户端显示屏幕的比例相同,均为9:16,如此,服务端输出的画面(画面中的元素包括“显示”两个字)在客户端显示屏幕中能够全屏显示。如果匹配的服务端虚拟显示屏幕的分辨率为720×720,客户端显示屏幕分辨率为720 ×1280,则如图2所示,客户端显示屏幕中的实际显示画面可能会出现上下黑边(如图2中的a所示),或者,画面纵向拉伸使得客户端能够全屏显示但是画面上下被拉伸变形(如图2中的b所示),或者,画面同比例放大使得客户端全屏显示,但是画面左右被裁剪(如图2中的c所示)。如果匹配的服务端虚拟显示屏幕的分辨率为360×1280,客户端显示屏幕分辨率为720×1280,则如图3所示,客户端显示屏幕中的实际显示画面可能会出现左右黑边(如图3中的a所示),或者,画面被左右拉伸使得客户端能够全屏显示但是画面左右方向被拉伸变形(如图3中的b所示),或者,画面同比例放大使得客户端显示屏幕能够全屏显示但是上下被裁剪(如图3中的c所示)。
由于针对每个客户端都要为其匹配分辨率比例相同的服务端,需要耗费大量的时间成本和人力成本去调度匹配服务端。并且一个服务端只能支持同样比例分辨率的客户端,因此若要保证所有分辨率的客户端播放画面质量,就需要部署更多支持不同比例的分辨率的服务端,从而导致服务端的管理复杂度高,设备利用率低。
针对此缺陷,本公开实施例的技术构思主要包括:提供一种多分辨率画面适配的方法,在服务端按照客户端显示屏幕的分辨率对待输出画面进行调整,使得调整后得到的有效显示画面的比例和客户端显示屏幕的分辨率比例相同,进而将有效显示画面发送至所述客户端显示。针对不同分辨率的客户端,不需要技术人员部署更多种显示比例的服务端,也不需要为不同分辨率的客户端去匹配相同比例分辨率的服务端,服务端只需要获取到客户端显示屏幕的分辨率,便可以输出与客户端相同显示比例的有效显示画面,在保证了客户端显示的画面不会出现黑边,也不会出现画面变形的情况下,实现了一个服务端能够支持各种不同分辨率的客户端的效果,降低了服务端的管理复杂度、提高服务端设备利用率。并且,服务端在根据客户端显示屏幕的分辨率调整待输出画面之后,可以不将调整后的画面直接发送至客户端显示,而是先按照客户端显示屏幕的分辨率在服务端虚拟显示屏幕中划分出有效显示区域,该有效显示区域的比例和客户端显示屏幕的显示比例相同,将调整后的待输出画面投射到该有效显示区域中,然后服务端将其虚拟显示屏幕的整个显示画面发送至客户端,即发送至客户端的整个显示画面的画面比例是服务端虚拟显示屏幕的比例,客户端在接收到整个显示画面后,将整个显示画面中有效显示区域内的有效显示画面提取出来进行显示,这样服务端编码传输的一直都是服务端虚拟显示屏幕的尺寸,针对不同分辨率的客户端,服务端传输的整个显示画面的分辨率是一致的,只是不同分辨率的客户端各自对应的有效显示区域中的有效显示画面的分辨率不一致,这样有利于服务端持续推流,而不需要在客户端分辨率发生改变后重新配置解码器。
图4为本公开实施例提供的画面显示方法的应用场景图一。
如图4所示,本公开实施例提供的应用场景的基本架构主要包括:至少一个服务端401和客户端402;当用户使用客户端直播或观看视频时,点击相应的播放控件,然后客户端向至少一个服务端发送获取请求,至少一个服务端接收到客户端发送的获取请求之后,在至少一个服务端中调度与该客户端显示屏幕的分辨率比例相同的服务端,假设第一服务端的虚拟显示屏幕与该客户端显示屏幕的分辨率比例相同,则由第一服务端向客户端输出相应的直播或视频画面;若至少一个服务端中没有与客户端402分辨率比例一致的服务端,则从中选择一个当前处于空闲状态的服务端输出客户端请求的画面。
图5为本公开实施例提供的画面显示方法流程示意图一,本公开实施例提供的方法的执行主体为服务端。
如图5所示,本公开实施例提供的方法可以包括以下步骤。
S501,获取客户端显示屏幕的第一分辨率。
具体的,当用户使用客户端直播或观看视频时,点击相应的播放控件,然后客户端向至少一个服务端发送调度请求,该调度请求携带客户端显示屏幕的第一分辨率,至少一个服务端接收到客户端发送的调度请求之后,调度一个当前处于空闲状态的服务端,该服务端解析调度请求获得客户端显示屏幕的第一分辨率。
在一种可能的实施例中,若至少一个服务端当前都处于非空闲状态,则每个服务端将调度请求加入等待队列,当其中有服务端执行完任务时处理该调度请求。需要说明的是,当有服务端开始处理调度请求时,该服务端会向其他服务端发送指示信息,以指示其他服务端将该调度请求在等待队列中清除,避免多个服务端重复处理该调度请求。
S502,根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同。
其中,第一分辨率的比例即为水平像素与垂直像素的比,待输出画面是服务端需要向客户端推流的图像。
具体的,服务端根据第一分辨率确定客户端显示屏幕的宽高比例,即第一分辨率中的水平像素和垂直像素的比,根据客户端显示屏幕的宽高比例对待输出画面重新布局,使得调整后的待输出画面的宽高比例等于客户端显示屏幕的宽高比例。
示例性的,假设服务端虚拟显示屏幕的分辨率为720×1440,该服务端接收到客户端显示屏幕的第一分辨率后确定该客户端显示屏幕的宽高比例为9:16,若采用现有技术,服务端会向该客户端输出分辨率为720×1440(宽高比例为1:2)的画面,由于客户端显示屏幕的宽高比例与服务端输出画面的宽高比例不相同,因此会导致客户端显示该画面时出现黑边或者画面被裁减、被拉伸变形。而本公开实施例中服务端自动对待输出画面中的元素重新布局调整,使得调整后的待输出画面(即有效显示画面)的分辨率为720×1280,调整后的待输出画面的宽高比例也为9:16。
S503,将所述有效显示画面发送至所述客户端显示。
具体的,由于上一步骤中服务端将待输出画面的宽高比例调整到和客户端显示屏幕的宽高比例一致,使得客户端接收到的有效显示画面的宽高比例和客户端显示屏幕的宽高比例相同,客户端只需要平铺显示就可以在显示屏幕中正常全屏显示有效显示画面,不需要对画面进行拉伸、裁剪等操作,也不会出现黑边,保证了画面质量。
本公开实施例中,针对不同分辨率的客户端,不需要技术人员部署更多种显示比例的服务端,也不需要为不同分辨率的客户端去匹配相同比例分辨率的服务端,服务端只需要获取到客户端显示屏幕的分辨率,便可以输出与客户端相同显示比例的有效显示画面,在保证了客户端显示的画面不会出现黑边,也不会出现画面变形的情况下,实现了一个服务端能够支持各种不同分辨率的客户端的效果,降低了服务端的管理复杂度、提高服务端设备利用率。
图6为本公开实施例提供的画面显示方法流程示意图二,本公开实施例以服务端和客户端的交互为例,在图5所示实施例的基础上结合实例对画面显示方法进一步详细描述。
如图6所示,本公开实施例提供的方法可以包括以下步骤。
S601,客户端将显示屏幕的第一分辨率发送至服务端。
一些实施例中,当用户使用手机、平板、显示器等客户端进行直播或者观看视频时,以触控的方式点击显示屏幕上相应的直播控件或者视频播放控件或者用遥控选择待播放的视频,则客户端响应于用户输入的操作向服务端发送携带有客户端显示屏幕的分辨率调度请求,服务端可以在接收到的调度请求中解析出客户端显示屏幕的分辨率。
在本公开实施例的一种可能的情况下,客户端会同时将调度请求发送至多个服务端设备,多个服务端设备调度当前处于空闲状态的服务端来为该客户端输出相应的画面。
示例性的,如图8所示,后台服务端包括服务器A、服务器B和服务器C这三个设备,用户使用手机801进行直播,则当用户点击手机屏幕上的发起直播控件时,手机向这三个服务器发送携带有手机显示屏幕分辨率的调度请求,若服务器A当前处于空闲状态,则服务器A接收到手机发送的调度请求之后,由服务器A向手机输出直播画面,同时服务器A会向其余两个服务器B和C发送指示信息,服务器B和C接收到该指示信息之后便不会再对手机发送的调度请求进行处理,避免多个服务器重复处理该调度请求。此时,若有用户使用显示器802看电视,则用户可以使用遥控器803选择想要播放的视频,确认选择之后,显示器802会向服务器A、B和C发送携带有显示器分辨率的调度请求,由于服务器A此时正在为手机801输出直播画面,则在服务器B和C中选择一个向显示器802输出视频画面。
需要说明的是,若这三个服务器当前都处于非空闲状态,则每个服务器将调度请求加入等待队列,当其中有服务端执行完任务时处理该调度请求。
S602,服务端根据接收到的第一分辨率,确定所述待输出画面在服务端虚拟显示屏幕中的有效显示区域,所述有效显示区域的比例与所述第一分辨率的比例相同。
在一种可能的实施例中,参见图7,服务端根据接收到的第一分辨率,确定所述待输出画面在服务端虚拟显示屏幕中的有效显示区域的方法可以包括以下步骤。
S6021,创建背景画面,所述背景画面的第二分辨率和所述服务端虚拟显示屏幕的分辨率相同。
具体的,根据服务端虚拟显示屏幕的分辨率创建背景画面,创建的背景画面的分辨率与虚拟显示屏幕的物理分辨率相同。
示例性的,假设服务端虚拟显示屏幕的分辨率为720×1440,则如图9中的a所示,创建的背景画面的尺寸也为720×1440。
S6022,根据所述第一分辨率和所述第二分辨率,确定所述有效显示区域的宽度和高度。
本步骤中,根据客户端显示屏幕的第一水平像素(宽度)和第一垂直像素(高度)和创建的背景画面的第二水平像素和第二垂直像素,来确定有效显示区域的宽度和高度,使得有效显示区域的宽高比例和客户端显示屏幕的宽高比例一致。
具体的,确定所述第一分辨率的第一垂直像素与第一水平像素的比值,得到客户端显示屏幕的高度与宽度的比例(比值)。若判定所述第二分辨率的第二垂直像素(即背景画面的高度)大于所述第二分辨率的第二水平像素(即背景画面的宽度)与所述比值的乘积,则将所述第二水平像素确定为所述有效显示区域的宽度,将所述第二水平像素与所述比值的乘积确定为所述有效显示区域的高度;若判定所述第二分辨率的第二垂直像素小于或等于所述第二分辨率的第二水平像素与所述比值的乘积,则所述第二垂直像素确定为所述有效显示区域的高度,将所述第二垂直像素与所述比值相除,将相除结果确定为所述有效显示区域的宽度。
S6023,根据所述有效显示区域的高度和宽度,确定所述有效显示区域相对于所述背景画面的坐标信息。
本步骤中,如图9中的a所示,以背景画面的左下角为坐标原点建立坐标系,若服务端虚拟显示屏幕的分辨率为720×1440,则背景画面的各个顶点在坐标系中的坐标如图9中的b所示。
具体的,确定所述有效显示区域的第一顶点的横坐标和纵坐标,其中,所述第一顶点的横坐标为所述第二水平像素与所述有效显示区域的宽度的差值的一半,所述第一顶点的纵坐标为所述第二垂直像素与所述有效显示区域的高度的差值的一半。
进一步的,确定所述有效显示区域的第二顶点的横坐标和纵坐标,所述第二顶点是所述第一顶点的对角顶点,所述第二顶点的横坐标为所述第一顶点的横坐标与所述有效显示区域的宽度之和,所述第二顶点的纵坐标为所述第一顶点的纵坐标与所述有效显示区域的高度之和。
S6024,根据所述坐标信息在所述背景画面中划分出所述有效显示区域。
具体的,确定了有效显示画面的两个对角顶点的坐标信息之后,在背景画面中划分出有效显示区域。
为了更清楚的理解划分有效显示区域的过程,下面以代码来描述有效显示区域的坐标信息的确定过程:
1.float displayAspect=sourceHeight/sourceWidth;
2.if(videoHeight>videoWidth*displayAspect){
3.outWidth=videoWidth;
4.outHeight=videoWidth*displayAspect;
5.}else{
6.outHeight=videoHeight;
7.outWidth=videoHeight/displayAspect;
8.}
9.offX=(videoWidth-outWidth)/2;
10.offY=(videoHeight-outHeight)/2;
计算后有效显示区域的第一顶点的坐标为(offX,offY),第二顶点的坐标为(offX+outWidth,offY+outHeight)。
其中,第一行代码中的displayAspect表示客户端显示屏幕的高度(第一垂直像素)和宽度(第一水平像素)的比值,videoHeight表示服务端虚拟显示屏幕的高度(即第二垂直像素),videoWidth表示服务端虚拟显示屏幕的宽度(即第二水平像素),outHeight表示有效显示区域的高度,outWidth表示有效显示区域的宽度。
需要说明的是,为了便于客户端在背景画面中提取有效显示区域中的有效显示画面,在划分有效显示区域时,将有效显示区域在背景画面中居中。
示例性的,若服务端虚拟显示屏幕的分辨率为720×1440(即创建的背景画面的宽度×高度),客户端显示屏幕的分辨率为720×1280,则先确定客户端显示屏幕的高度和宽度的比值为1280:720,即16/9;然后,背景画面的宽度与该比值的乘积为720*16/9=1280,该乘积小于背景画面的高度1440,则有效显示区域的宽度就等于背景画面的宽度720,有效显示区域的 高度就等于1280,即有效显示区域的分辨率为720×1280。在得到有效显示区域的宽度和高度之后,以背景画面为坐标系,确定有效显示区域的两个对角顶点的坐标,其中,第一顶点的横坐标为背景画面的宽度与有效显示区域的宽度的差值的一半,即(720-720)/2=0,第一顶点的纵坐标为背景画面的高度与有效显示区域的高度的差值的一半,即(1440-1280)/2=80,则第一顶点的坐标为(0,80);与第一顶点为对角顶点的第二顶点的横坐标为第一顶点的横坐标与所述有效显示区域的宽度之和,即0+720=720,第二顶点的纵坐标为所述第一顶点的纵坐标与所述有效显示区域的高度之和,即80+1280=1360,则第二顶点的坐标为(720,1360),依据有效显示区域的第一顶点和第二顶点的坐标在背景画面中划分出有效显示区域,如图9中的c所示。
示例性的,若服务端虚拟显示屏幕的分辨率为720×1440(即创建的背景画面的宽度×高度),客户端显示屏幕的分辨率为720×1680,则确定客户端显示屏幕的高度和宽度的比值为1680:720,即21/9;然后,背景画面的宽度与该比值的乘积为720*21/9=1680,该乘积大于背景画面的高度1440,则有效显示区域的高度就等于背景画面的高度1440,有效显示区域的宽度为1440/(21/9),向上取整数约等于618,即有效显示区域的分辨率为618×1440。在得到有效显示区域的宽度和高度之后,以背景画面为坐标系,确定有效显示区域的两个对角顶点的坐标,其中,第一顶点的横坐标为背景画面的宽度与有效显示区域的宽度的差值的一半,即(720-618)/2=51,第一顶点的纵坐标为背景画面的高度与有效显示区域的高度的差值的一半,即(1440-1440)/2=0,则第一顶点的坐标为(51,0);与第一顶点为对角顶点的第二顶点的横坐标为第一顶点的横坐标与所述有效显示区域的宽度之和,即51+618=669,第二顶点的纵坐标为所述第一顶点的纵坐标与所述有效显示区域的高度之和,即0+1440=1440,则第二顶点的坐标为(669,1440)。依据有效显示区域的第一顶点和第二顶点的坐标在背景画面中划分出有效显示区域,如图9中的d所示。
S603,服务端对所述待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中。
具体的,创建了背景画面并在背景画面中划分出有效显示区域之后,需要对待输出画面进行重新布局,即根据所述有效显示区域的高度和宽度,调整所述待输出画面的垂直像素和水平像素,使得所述待输出画面的垂直像素等于所述有效显示区域的高度且所述待输出画面的水平像素等于所述有效显示区域的宽度,然后将调整后的待输出画面投射到所述背景画面中的有效显示区域内。
在一种可能的实施例中,首先技术人员需要创建一个分辨率和服务端虚拟显示屏幕的分辨率一致的背景画面,对应的代码为IBinder createDisplay(String name,boolean secure),创建好了背景画面之后,按照之前确定的有效显示区域的坐标信息,在背景画面中设置有效显示区域,对应的代码为Transaction setDisplayProjection(IBinder displayToken,int orientation,Rect layerStackRect,Rect displayRect),其中,Rect表示描述一个区域,有一个开始点的横、纵坐标和设置的区域对应的宽、高,即x,y,width,height;其中,layerStackRect为对背景画面的区域描述,比如服务端虚拟显示屏幕的分辨率为720×1440,则相应的背景画面区域描述为(x=0,y=0,width=720,height=1440);displayRect,如确定了有效显示区域的宽高为720×1280,则经上述对有效显示区域的第一顶点坐标进行计算可知,有效显示区域描述为(x=0,y=80,width=720,heigt=1280)。然后服务端系统根据技术人员设置的有效显示区域,将待输出画面 重新布局投射到该有效显示区域中,由于划分出的有效显示区域的比例和客户端显示屏幕的比例相同,因此,服务端直接将待输出画面布局成与客户端显示屏幕相同比例的有效显示画面,不需要对画面进行拉伸、裁剪等操作。
S604,服务端将其虚拟显示屏幕中的整个显示画面发送至客户端。
具体的,服务端虚拟显示屏幕中的整个显示画面即为创建的背景画面,且背景画面中设置有有效显示区域,有效显示区域中显示的画面是与客户端显示屏幕比例相同的有效显示画面。即,针对不同分辨率的客户端,服务端向客户端发送的画面始终是与服务端虚拟显示屏幕尺寸相同的背景画面,只是背景画面中设置的有效显示区域中的有效显示画面不一致,有效显示区域会根据客户端分辨率进行调整。
示例性的,如图10所示,服务端虚拟显示屏幕的分辨率为720×1440,第一客户端显示屏幕的分辨率为720×1280,第二客户端显示屏幕的分辨率为720×1680,则服务端向第一客户端和第二客户端发送的背景画面的尺寸是一样的,都是720×1440,只是发送给两个客户端的背景画面中的有效显示画面不一致,发送给第一客户端的背景画面中的有效显示画面为720×1280,发送给第二客户端的背景画面中的有效显示画面为618×1440。
S605,客户端接收所述整个显示画面。
S606,客户端将所述整个显示画面中有效显示区域内的画面提取出来进行显示。
具体的,客户端接收到服务端发送的虚拟显示屏幕中的整个显示画面(即投射有有效显示画面的背景画面)之后,由于背景画面中的有效显示区域的比例和客户端显示屏幕的比例相同,客户端会自动提取出有效显示区域中的有效显示画面,并且,由于提取出的有效显示画面的比例和客户端显示屏幕的比例相同,如图11所示,客户端只需要平铺显示就可以在显示屏幕中正常显示提取到的有效显示画面,不需要对画面进行拉伸、裁剪等操作,保证了客户端显示的画面质量。
本公开实施例中,针对不同分辨率的客户端,不需要技术人员部署更多种显示比例的服务端,也不需要为不同分辨率的客户端去匹配相同比例分辨率的服务端,服务端只需要获取到客户端显示屏幕的分辨率,便可以输出与客户端相同显示比例的有效显示画面,在保证了客户端显示的画面不会出现黑边,也不会出现画面变形的情况下,实现了一个服务端能够支持各种不同分辨率的客户端的效果,降低了服务端的管理复杂度、提高服务端设备利用率。更进一步的,由于创建了和服务端虚拟显示屏幕尺寸相同的背景画面,在背景画面中设置有效显示区域,并将带输出画面重新布局投射到有效显示区域中,同一个服务端针对不同分辨率的客户端,进行编码传输的画面尺寸始终和虚拟显示屏幕的尺寸相同,这样有利于服务端持续的推流,而不需要在客户端分辨率改变后重新配置解码器。
图12为本公开实施例提供的画面显示装置的结构示意图一。
如图12所示,本公开实施例提供的装置包括:获取模块121,适配模块122和第一发送模块123;其中,获取模块121,用于获取客户端显示屏幕的第一分辨率;适配模块122,用于根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;第一发送模块123,用于将所述有效显示画面发送至所述客户端显示。
进一步的,如图13所示,所述适配模块包括:
确定单元1221,用于根据所述第一分辨率,确定所述待输出画面在服务端虚拟显示屏幕中的有效显示区域,所述有效显示区域的比例与所述第一分辨率的比例相同;
投射单元1222,用于对所述待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中,得到有效显示画面。
进一步的,所述确定单元包括:
创建子单元,用于创建背景画面,所述背景画面的第二分辨率和所述服务端虚拟显示屏幕的分辨率相同;
计算子单元,用于根据所述第一分辨率和所述第二分辨率,确定所述有效显示区域的宽度和高度;
所述计算子单元还用于:根据所述有效显示区域的高度和宽度,确定所述有效显示区域相对于所述背景画面的坐标信息;
划分子单元,用于根据所述坐标信息在所述背景画面中划分出所述有效显示区域。
进一步的,所述计算子单元具体用于:
确定所述第一分辨率的第一垂直像素与第一水平像素的比值;
若判定所述第二分辨率的第二垂直像素大于所述第二分辨率的第二水平像素与所述比值的乘积,则将所述第二水平像素确定为所述有效显示区域的宽度,将所述第二水平像素与所述比值的乘积确定为所述有效显示区域的高度;
若判定所述第二分辨率的第二垂直像素小于或等于所述第二分辨率的第二水平像素与所述比值的乘积,则所述第二垂直像素确定为所述有效显示区域的高度,将所述第二垂直像素与所述比值相除,将相除结果确定为所述有效显示区域的宽度。
进一步的,所述计算子单元具体用于:
确定所述有效显示区域的第一顶点的横坐标和纵坐标,其中,所述第一顶点的横坐标为所述第二水平像素与所述有效显示区域的宽度的差值的一半,所述第一顶点的纵坐标为所述第二垂直像素与所述有效显示区域的高度的差值的一半;
确定所述有效显示区域的第二顶点的横坐标和纵坐标,所述第二顶点是所述第一顶点的对角顶点,所述第二顶点的横坐标为所述第一顶点的横坐标与所述有效显示区域的宽度之和,所述第二顶点的纵坐标为所述第一顶点的纵坐标与所述有效显示区域的高度之和。
进一步的,所述投射单元具体用于:
根据所述有效显示区域的高度和宽度,调整所述待输出画面的垂直像素和水平像素,使得所述待输出画面的垂直像素等于所述有效显示区域的高度且所述待输出画面的水平像素等于所述有效显示区域的宽度;
将调整后的待输出画面投射到所述背景画面中的有效显示区域内。
进一步的,所述第一发送模块具体用于:
将投射后的背景画面发送至所述客户端,以使所述客户端在所述背景画面的有效显示区域中提取所述有效显示画面进行显示。
进一步的,所述获取模块具体用于:接收客户端发送的设备调度请求,所述设备调度请求用于调度空闲的服务端,所述设备调度请求携带所述客户端显示屏幕的分辨率;在确定所述客户端请求调度的服务端为自身时,解析所述设备调度请求,得到所述客户端显示屏幕的第一分辨率。
本公开实施例提供的服务端,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,本公开实施例此处不再赘述。
图14为本公开实施例提供的画面显示装置的结构示意图二。
如图14所示,本公开实施例提供的画面显示装置包括:第二发送模块141和显示模块142;其中,第二发送模块141,用于将所述客户端的显示屏幕的第一分辨率发送至服务端,以使所述服务端根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;显示模块142,用于接收并显示所述服务端发送的所述有效显示画面。
进一步的,所述显示模块具体用于:
接收服务端发送的背景画面;
提取所述背景画面的有效显示区域中的有效显示画面进行显示,所述有效显示区域是服务端根据所述第一分辨率在所述背景画面中划分出来的,所述有效显示画面是服务端对待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中的。
进一步的,所述第二发送模块具体用于:发送设备调度请求,所述设备调度请求用于调度空闲的服务端,所述设备调度请求携带所述客户端显示屏幕的第一分辨率,以使所述服务端解析所述设备调度请求,得到所述客户端显示屏幕的第一分辨率。
本公开实施例提供的设备,可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,本公开实施例此处不再赘述。
参考图15,其示出了用于实现本公开实施例的电子设备150的结构示意图,该电子设备150可以为终端设备或服务器。其中,终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(Personal Digital Assistant,简称PDA)、平板电脑、便携式多媒体播放器(Portable Media Player,简称PMP)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图15示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图15所示,电子设备150可以包括处理装置(例如中央处理器、图形处理器等)1501,其可以根据存储在只读存储器(Read Only Memory,简称ROM)1502中的程序或者从存储装置1508加载到随机访问存储器(Random Access Memory,简称RAM)1503中的程序而执行各种适当的动作和处理。在RAM 1503中,还存储有电子设备150操作所需的各种程序和数据。处理装置1501、ROM 1502以及RAM 1503通过总线1504彼此相连。输入/输出(I/O)接口1505也连接至总线1504。
通常,以下装置可以连接至I/O接口1505:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置1506;包括例如液晶显示器(Liquid Crystal Display,简称LCD)、扬声器、振动器等的输出装置1507;包括例如磁带、硬盘等的存储装置1508;以及通信装置1509。通信装置1509可以允许电子设备150与其他设备进行无线或有线通信以交换数据。虽然图15示出了具有各种装置的电子设备150,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码,当所述计算机程序被 处理器执行时,使得所述处理器执行本公开实施例的方法中限定的上述功能。在这样的实施例中,该计算机程序可以通过通信装置1509从网络上被下载和安装,或者从存储装置1508被安装,或者从ROM 1502被安装。在该计算机程序被处理装置1501执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Electrically Programmable Read Only Memory,EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(Compact Disc-Read Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(Radio Frequency,RF)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个计算机程序,当上述一个或者多个计算机程序被该电子设备执行时,使得该电子设备执行上述实施例所示的方法。
所述计算机程序包含计算机程序代码,可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network,简称LAN)或广域网(Wide Area Network,简称WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是, 框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(Field Programmable Gate Array,FPGA)、专用集成电路(Application Specific Integrated Circuit,ASIC)、专用标准产品(Application Specific Standard Product,ASSP)、片上系统(System On Chip,SOC)、复杂可编程逻辑设备(Complex Programmable Logic Device,CPLD)等等。
在本公开的上下文中,计算机可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。计算机可读介质可以是计算机可读信号介质或计算机可读存储介质。计算机可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。计算机可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学存储设备、磁存储设备、或上述内容的任何合适组合。
第一方面,根据本公开的一个或多个实施例,提供了一种画面显示方法,应用于服务端,所述方法包括:
获取客户端显示屏幕的第一分辨率;
根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
将所述有效显示画面发送至所述客户端显示。
根据本公开的一个或多个实施例,所述根据所述第一分辨率调整待输出画面,得到有效显示画面,包括:
根据所述第一分辨率,确定所述待输出画面在服务端虚拟显示屏幕中的有效显示区域,所述有效显示区域的比例与所述第一分辨率的比例相同;
对所述待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中,得到有效显示画面。
根据本公开的一个或多个实施例,所述根据所述第一分辨率,确定所述待输出画面在服务端虚拟显示屏幕中的有效显示区域,包括:
创建背景画面,所述背景画面的第二分辨率和所述服务端虚拟显示屏幕的分辨率相同;
根据所述第一分辨率和所述第二分辨率,确定所述有效显示区域的宽度和高度;
根据所述有效显示区域的高度和宽度,确定所述有效显示区域相对于所述背景画面的坐标信息;
根据所述坐标信息在所述背景画面中划分出所述有效显示区域。
根据本公开的一个或多个实施例,所述根据所述第一分辨率和所述第二分辨率,确定所述有效显示区域的宽度和高度,包括:
确定所述第一分辨率的第一垂直像素与第一水平像素的比值;
若判定所述第二分辨率的第二垂直像素大于所述第二分辨率的第二水平像素与所述比值的乘积,则将所述第二水平像素确定为所述有效显示区域的宽度,将所述第二水平像素与所述比值的乘积确定为所述有效显示区域的高度;
若判定所述第二分辨率的第二垂直像素小于或等于所述第二分辨率的第二水平像素与所述比值的乘积,则所述第二垂直像素确定为所述有效显示区域的高度,将所述第二垂直像素与所述比值相除,将相除结果确定为所述有效显示区域的宽度。
根据本公开的一个或多个实施例,所述根据所述有效显示区域的高度和宽度,确定所述有效显示区域相对于所述背景画面的坐标信息,包括:
确定所述有效显示区域的第一顶点的横坐标和纵坐标,其中,所述第一顶点的横坐标为所述第二水平像素与所述有效显示区域的宽度的差值的一半,所述第一顶点的纵坐标为所述第二垂直像素与所述有效显示区域的高度的差值的一半;
确定所述有效显示区域的第二顶点的横坐标和纵坐标,所述第二顶点是所述第一顶点的对角顶点,所述第二顶点的横坐标为所述第一顶点的横坐标与所述有效显示区域的宽度之和,所述第二顶点的纵坐标为所述第一顶点的纵坐标与所述有效显示区域的高度之和。
根据本公开的一个或多个实施例,所述对所述待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中,包括:
根据所述有效显示区域的高度和宽度,调整所述待输出画面的垂直像素和水平像素,使得所述待输出画面的垂直像素等于所述有效显示区域的高度且所述待输出画面的水平像素等于所述有效显示区域的宽度;
将调整后的待输出画面投射到所述背景画面中的有效显示区域内。
根据本公开的一个或多个实施例,所述将所述有效显示画面发送至所述客户端显示,包括:
将投射后的背景画面发送至所述客户端,以使所述客户端在所述背景画面的有效显示区域中提取所述有效显示画面进行显示。
根据本公开的一个或多个实施例,所述获取客户端显示屏幕的第一分辨率,包括:
接收客户端发送的设备调度请求,所述设备调度请求用于调度空闲的服务端,所述设备调度请求携带所述客户端显示屏幕的分辨率;
在确定所述客户端请求调度的服务端为自身时,解析所述设备调度请求,得到所述客户端显示屏幕的第一分辨率。
根据本公开的一个或多个实施例,所述获取客户端显示屏幕的第一分辨率,包括:
向所述客户端发送指示信息,所述指示信息用于指示所述客户端将所述显示屏幕的第一分辨率发送至服务端;
接收所述客户端返回的显示屏幕的第一分辨率。
第二方面,根据本公开的一个或多个实施例,提供了一种画面显示方法,应用于客户端,所述方法包括:
将所述客户端的显示屏幕的第一分辨率发送至服务端,以使所述服务端根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
接收并显示所述服务端发送的所述有效显示画面。
根据本公开的一个或多个实施例,所述接收并显示所述服务端发送的所述有效显示画面,包括:
接收服务端发送的背景画面;
提取所述背景画面的有效显示区域中的有效显示画面进行显示,所述有效显示区域是服务端根据所述第一分辨率在所述背景画面中划分出来的,所述有效显示画面是服务端对待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中的。
根据本公开的一个或多个实施例,所述将所述客户端的显示屏幕的第一分辨率发送至服务端,包括:
发送设备调度请求,所述设备调度请求用于调度空闲的服务端,所述设备调度请求携带所述客户端显示屏幕的第一分辨率,以使所述服务端解析所述设备调度请求,得到所述客户端显示屏幕的第一分辨率。
第三方面,根据本公开的一个或多个实施例,提供了一种画面显示装置,包括:获取模块,适配模块和第一发送模块;其中,获取模块,用于获取客户端显示屏幕的第一分辨率;适配模块,用于根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;第一发送模块,用于将所述有效显示画面发送至所述客户端显示。
根据本公开的一个或多个实施例,所述适配模块包括:
确定单元,用于根据所述第一分辨率,确定所述待输出画面在服务端虚拟显示屏幕中的有效显示区域,所述有效显示区域的比例与所述第一分辨率的比例相同;
投射单元,用于对所述待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中,得到有效显示画面。
根据本公开的一个或多个实施例,所述确定单元包括:
创建子单元,用于创建背景画面,所述背景画面的第二分辨率和所述服务端虚拟显示屏幕的分辨率相同;
计算子单元,用于根据所述第一分辨率和所述第二分辨率,确定所述有效显示区域的宽度和高度;
所述计算子单元还用于:根据所述有效显示区域的高度和宽度,确定所述有效显示区域相对于所述背景画面的坐标信息;
划分子单元,用于根据所述坐标信息在所述背景画面中划分出所述有效显示区域。
根据本公开的一个或多个实施例,所述计算子单元具体用于:
确定所述第一分辨率的第一垂直像素与第一水平像素的比值;
若判定所述第二分辨率的第二垂直像素大于所述第二分辨率的第二水平像素与所述比值的乘积,则将所述第二水平像素确定为所述有效显示区域的宽度,将所述第二水平像素与所述比值的乘积确定为所述有效显示区域的高度;
若判定所述第二分辨率的第二垂直像素小于或等于所述第二分辨率的第二水平像素与所述比值的乘积,则所述第二垂直像素确定为所述有效显示区域的高度,将所述第二垂直像素与所述比值相除,将相除结果确定为所述有效显示区域的宽度。
根据本公开的一个或多个实施例,所述计算子单元具体用于:
确定所述有效显示区域的第一顶点的横坐标和纵坐标,其中,所述第一顶点的横坐标为所述第二水平像素与所述有效显示区域的宽度的差值的一半,所述第一顶点的纵坐标为所述第二垂直像素与所述有效显示区域的高度的差值的一半;
确定所述有效显示区域的第二顶点的横坐标和纵坐标,所述第二顶点是所述第一顶点的对角顶点,所述第二顶点的横坐标为所述第一顶点的横坐标与所述有效显示区域的宽度之和,所述第二顶点的纵坐标为所述第一顶点的纵坐标与所述有效显示区域的高度之和。
根据本公开的一个或多个实施例,所述投射单元具体用于:
根据所述有效显示区域的高度和宽度,调整所述待输出画面的垂直像素和水平像素,使得所述待输出画面的垂直像素等于所述有效显示区域的高度且所述待输出画面的水平像素等于所述有效显示区域的宽度;
将调整后的待输出画面投射到所述背景画面中的有效显示区域内。
根据本公开的一个或多个实施例,所述第一发送模块具体用于:
将投射后的背景画面发送至所述客户端,以使所述客户端在所述背景画面的有效显示区域中提取所述有效显示画面进行显示。
根据本公开的一个或多个实施例,所述获取模块具体用于:接收客户端发送的设备调度请求,所述设备调度请求用于调度空闲的服务端,所述设备调度请求携带所述客户端显示屏幕的分辨率;在确定所述客户端请求调度的服务端为自身时,解析所述设备调度请求,得到所述客户端显示屏幕的第一分辨率。
第四方面,根据本公开的一个或多个实施例,提供了一种画面显示装置,包括:第二发送模块和显示模块;其中,第二发送模块,用于将所述客户端的显示屏幕的第一分辨率发送至服务端,以使所述服务端根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;显示模块,用于接收并显示所述服务端发送的所述有效显示画面。
根据本公开的一个或多个实施例,所述显示模块具体用于:
接收服务端发送的背景画面;
提取所述背景画面的有效显示区域中的有效显示画面进行显示,所述有效显示区域是服务端根据所述第一分辨率在所述背景画面中划分出来的,所述有效显示画面是服务端对待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中的。
根据本公开的一个或多个实施例,所述第二发送模块具体用于:发送设备调度请求,所述设备调度请求用于调度空闲的服务端,所述设备调度请求携带所述客户端显示屏幕的第一分辨率,以使所述服务端解析所述设备调度请求,得到所述客户端显示屏幕的第一分辨率。
第五方面,本公开实施例提供了一种电子设备,包括:至少一个处理器和存储器;
所述存储器存储计算机执行指令;
所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如上述第一方面以及第一方面各种可能的设计、第二方面以及第二方面各种可能的设计所述的画面显示方法。
第六方面,本公开实施例提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如上述第一方面以及第一方面各种可能的设计、第二方面以及第二方面各种可能的设计所述的画面显示方法。
第七方面,本公开实施例提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,使得所述处理器实现如上述第一方面以及第一方面各种可能的设计、第二方面以及第二方面各种可能的设计所述的画面显示方法。
第八方面,本公开实施例提供了一种计算机程序,所述计算机程序被处理器执行时,使得所述处理器实现如上述第一方面以及第一方面各种可能的设计、第二方面以及第二方面各种可能的设计所述的画面显示方法。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (17)

  1. 一种画面显示方法,其特征在于,包括:
    获取客户端显示屏幕的第一分辨率;
    根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
    将所述有效显示画面发送至所述客户端显示。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述第一分辨率调整待输出画面,得到有效显示画面,包括:
    根据所述第一分辨率,确定所述待输出画面在服务端虚拟显示屏幕中的有效显示区域,所述有效显示区域的比例与所述第一分辨率的比例相同;
    对所述待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中,得到所述有效显示画面。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一分辨率,确定所述待输出画面在服务端虚拟显示屏幕中的有效显示区域,包括:
    创建背景画面,所述背景画面的第二分辨率和所述服务端虚拟显示屏幕的分辨率相同;
    根据所述第一分辨率和所述第二分辨率,确定所述有效显示区域的宽度和高度;
    根据所述有效显示区域的高度和宽度,确定所述有效显示区域相对于所述背景画面的坐标信息;
    根据所述坐标信息在所述背景画面中划分出所述有效显示区域。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述第一分辨率和所述第二分辨率,确定所述有效显示区域的宽度和高度,包括:
    确定所述第一分辨率的第一垂直像素与第一水平像素的比值;
    若判定所述第二分辨率的第二垂直像素大于所述第二分辨率的第二水平像素与所述比值的乘积,则将所述第二水平像素确定为所述有效显示区域的宽度,将所述第二水平像素与所述比值的乘积确定为所述有效显示区域的高度;
    若判定所述第二分辨率的第二垂直像素小于或等于所述第二分辨率的第二水平像素与所述比值的乘积,则将所述第二垂直像素确定为所述有效显示区域的高度,将所述第二垂直像素与所述比值相除,将相除结果确定为所述有效显示区域的宽度。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述有效显示区域的高度和宽度,确定所述有效显示区域相对于所述背景画面的坐标信息,包括:
    确定所述有效显示区域的第一顶点的横坐标和纵坐标,其中,所述第一顶点的横坐标为所述第二水平像素与所述有效显示区域的宽度的差值的一半,所述第一顶点的纵坐标为所述第二垂直像素与所述有效显示区域的高度的差值的一半;
    确定所述有效显示区域的第二顶点的横坐标和纵坐标,所述第二顶点是所述第一顶点的对角顶点,所述第二顶点的横坐标为所述第一顶点的横坐标与所述有效显示区域的宽度之和,所述第二顶点的纵坐标为所述第一顶点的纵坐标与所述有效显示区域的高度之和。
  6. 根据权利要求3-5任一项所述的方法,其特征在于,所述对所述待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中,包括:
    根据所述有效显示区域的高度和宽度,调整所述待输出画面的垂直像素和水平像素,使得所述待输出画面的垂直像素等于所述有效显示区域的高度且所述待输出画面的水平像素等于所述有效显示区域的宽度;
    将调整后的待输出画面投射到所述背景画面中的有效显示区域内。
  7. 根据权利要求6所述的方法,其特征在于,所述将所述有效显示画面发送至所述客户端显示,包括:
    将投射后的背景画面发送至所述客户端,以使所述客户端在所述背景画面的有效显示区域中提取所述有效显示画面进行显示。
  8. 根据权利要求1-5任一项所述的方法,其特征在于,所述获取客户端显示屏幕的第一分辨率,包括:
    接收客户端发送的设备调度请求,所述设备调度请求用于调度空闲的服务端,所述设备调度请求携带所述客户端显示屏幕的分辨率;
    在确定所述客户端请求调度的服务端为自身时,解析所述设备调度请求,得到所述客户端显示屏幕的所述第一分辨率。
  9. 根据权利要求1-5任一项所述的方法,其特征在于,所述获取客户端显示屏幕的第一分辨率,包括:
    向所述客户端发送指示信息,所述指示信息用于指示所述客户端将所述显示屏幕的第一分辨率发送至服务端;
    接收所述客户端返回的显示屏幕的所述第一分辨率。
  10. 一种画面显示方法,其特征在于,包括:
    将客户端的显示屏幕的第一分辨率发送至服务端,以使所述服务端根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
    接收并显示所述服务端发送的所述有效显示画面。
  11. 根据权利要求10所述的方法,其特征在于,所述接收并显示所述服务端发送的所述有效显示画面,包括:
    接收服务端发送的背景画面;
    提取所述背景画面的有效显示区域中的有效显示画面进行显示,所述有效显示区域是服务端根据所述第一分辨率在所述背景画面中划分出来的,所述有效显示画面是服务端对待输出画面进行重新布局,并将重新布局的待输出画面投射到所述有效显示区域中的。
  12. 根据权利要求10或11所述的方法,其特征在于,所述将客户端的显示屏幕的第一分辨率发送至服务端,包括:
    发送设备调度请求,所述设备调度请求用于调度空闲的服务端,所述设备调度请求携带所述客户端显示屏幕的第一分辨率,以使所述服务端解析所述设备调度请求,得到所述客户端显示屏幕的所述第一分辨率。
  13. 一种画面显示装置,其特征在于,包括:
    获取模块,用于获取客户端显示屏幕的第一分辨率;
    适配模块,用于根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
    第一发送模块,用于将所述有效显示画面发送至所述客户端显示。
  14. 一种画面显示装置,其特征在于,包括:
    第二发送模块,用于将客户端的显示屏幕的第一分辨率发送至服务端,以使所述服务端根据所述第一分辨率调整待输出画面,得到有效显示画面,所述有效显示画面的显示比例和所述第一分辨率的比例相同;
    显示模块,用于接收并显示所述服务端发送的所述有效显示画面。
  15. 一种电子设备,其特征在于,包括:至少一个处理器和存储器;
    所述存储器存储计算机执行指令;
    所述至少一个处理器执行所述存储器存储的计算机执行指令,使得所述至少一个处理器执行如权利要求1-9或10-12任一项所述的画面显示方法。
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机执行指令,当处理器执行所述计算机执行指令时,实现如权利要求1-9或10-12任一项所述的画面显示方法。
  17. 一种计算机程序产品,其特征在于,包括计算机程序,所述计算机程序被处理器执行时,使得所述处理器实现如权利要求1-9或10-12任一项所述的画面显示方法。
PCT/CN2021/134887 2020-12-25 2021-12-01 画面显示方法、装置及电子设备 WO2022135093A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/256,617 US12093592B2 (en) 2020-12-25 2021-12-01 Picture displaying method and apparatus, and electronic device
EP21909090.9A EP4231650A4 (en) 2020-12-25 2021-12-01 IMAGE DISPLAY METHOD AND APPARATUS AND ELECTRONIC DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011566807.3 2020-12-25
CN202011566807.3A CN112738541B (zh) 2020-12-25 2020-12-25 画面显示方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2022135093A1 true WO2022135093A1 (zh) 2022-06-30

Family

ID=75616548

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134887 WO2022135093A1 (zh) 2020-12-25 2021-12-01 画面显示方法、装置及电子设备

Country Status (4)

Country Link
US (1) US12093592B2 (zh)
EP (1) EP4231650A4 (zh)
CN (1) CN112738541B (zh)
WO (1) WO2022135093A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112738541B (zh) 2020-12-25 2023-05-16 北京字节跳动网络技术有限公司 画面显示方法、装置及电子设备
CN113434101B (zh) * 2021-06-22 2023-06-09 青岛海尔科技有限公司 设备的控制方法、装置、存储介质及电子装置
CN113535105B (zh) * 2021-06-30 2023-03-21 北京字跳网络技术有限公司 媒体文件处理方法、装置、设备、可读存储介质及产品
CN115942031A (zh) * 2021-08-11 2023-04-07 广州视源电子科技股份有限公司 传屏方法、系统、传屏设备及接收设备
CN113873327B (zh) * 2021-09-24 2024-08-13 北京百度网讯科技有限公司 一种视频流呈现方法、装置、设备以及存储介质
CN114299851B (zh) * 2021-11-23 2023-05-30 深圳市时代华影科技股份有限公司 一种led显示设备、图像显示处理方法及存储介质
CN114995735A (zh) * 2022-04-22 2022-09-02 北京金山云网络技术有限公司 图像显示方法、系统、装置、电子设备及可读存储介质
CN114995775A (zh) * 2022-05-18 2022-09-02 慧之安信息技术股份有限公司 基于数据可视化的智慧矿山信息管控平台

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010124381A (ja) * 2008-11-21 2010-06-03 Hitachi Kokusai Electric Inc 監視システム
CN103713874A (zh) * 2013-12-31 2014-04-09 厦门明翰电气股份有限公司 电力系统实时画面Web界面展现方法
CN104679466A (zh) * 2013-11-29 2015-06-03 腾讯科技(深圳)有限公司 一种图像显示方法、装置及电子设备
CN106899620A (zh) * 2015-12-17 2017-06-27 西安中兴新软件有限责任公司 一种数据共享系统
CN107613238A (zh) * 2017-09-04 2018-01-19 西安万像电子科技有限公司 多媒体内容的处理方法和装置
CN111124334A (zh) * 2019-12-10 2020-05-08 上海擎感智能科技有限公司 适应车载屏幕显示图片的获取方法、系统、介质及智能终端
CN111147893A (zh) * 2018-11-02 2020-05-12 华为技术有限公司 一种视频自适应方法、相关设备以及存储介质
CN112738541A (zh) * 2020-12-25 2021-04-30 北京字节跳动网络技术有限公司 画面显示方法、装置及电子设备

Family Cites Families (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1232625A1 (en) * 1999-11-09 2002-08-21 Nokia Corporation Transferring fitted content for a user from a server
JP3761559B1 (ja) * 2004-10-05 2006-03-29 株式会社ソニー・コンピュータエンタテインメント 画像出力方法
US8319781B2 (en) * 2007-11-23 2012-11-27 Pme Ip Australia Pty Ltd Multi-user multi-GPU render server apparatus and methods
US8947595B1 (en) * 2010-01-26 2015-02-03 Google Inc. Fingerprinting to match videos having varying aspect ratios
WO2013077525A1 (ko) * 2011-11-24 2013-05-30 엘지전자 주식회사 제어 방법 및 그를 이용한 장치
TWI569648B (zh) * 2012-09-27 2017-02-01 晨星半導體股份有限公司 顯示方法與顯示裝置
US9245497B2 (en) * 2012-11-01 2016-01-26 Google Technology Holdings LLC Systems and methods for configuring the display resolution of an electronic device based on distance and user presbyopia
CN103530079A (zh) * 2013-09-30 2014-01-22 山西云途信息技术有限公司 一种适配不同分辨率的移动终端的图片显示方法及装置
CN103546715A (zh) 2013-10-30 2014-01-29 乐视致新电子科技(天津)有限公司 一种智能电视的画面比例调节方法及装置
US9832342B2 (en) * 2014-08-22 2017-11-28 Xiaomi Inc. Method and device for transmitting image
US10200725B2 (en) * 2015-06-15 2019-02-05 Intel Corporation Adaptive data streaming based on virtual screen size
KR102442527B1 (ko) * 2016-02-26 2022-09-13 엘지전자 주식회사 무선 디바이스
CN105955689A (zh) * 2016-05-19 2016-09-21 乐视控股(北京)有限公司 多屏互动时的屏幕适配方法及装置
CN106303573B (zh) * 2016-08-30 2019-12-13 上海乐欢软件有限公司 一种3d视频图像处理方法及服务器和客户端
CN108363604A (zh) * 2018-02-06 2018-08-03 四川虹美智能科技有限公司 一种分辨率适配方法、装置及业务系统
CN109408165A (zh) * 2018-09-19 2019-03-01 浙江省测绘科学技术研究院 数据可视化系统的多终端自适应方法及系统
US10986308B2 (en) * 2019-03-20 2021-04-20 Adobe Inc. Intelligent video reframing
CN110286868A (zh) 2019-06-28 2019-09-27 北京金山安全软件有限公司 视频显示调整方法、装置、电子设备及存储介质
CN110691259B (zh) * 2019-11-08 2022-04-22 北京奇艺世纪科技有限公司 视频播放方法、系统、装置、电子设备及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010124381A (ja) * 2008-11-21 2010-06-03 Hitachi Kokusai Electric Inc 監視システム
CN104679466A (zh) * 2013-11-29 2015-06-03 腾讯科技(深圳)有限公司 一种图像显示方法、装置及电子设备
CN103713874A (zh) * 2013-12-31 2014-04-09 厦门明翰电气股份有限公司 电力系统实时画面Web界面展现方法
CN106899620A (zh) * 2015-12-17 2017-06-27 西安中兴新软件有限责任公司 一种数据共享系统
CN107613238A (zh) * 2017-09-04 2018-01-19 西安万像电子科技有限公司 多媒体内容的处理方法和装置
CN111147893A (zh) * 2018-11-02 2020-05-12 华为技术有限公司 一种视频自适应方法、相关设备以及存储介质
CN111124334A (zh) * 2019-12-10 2020-05-08 上海擎感智能科技有限公司 适应车载屏幕显示图片的获取方法、系统、介质及智能终端
CN112738541A (zh) * 2020-12-25 2021-04-30 北京字节跳动网络技术有限公司 画面显示方法、装置及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4231650A4

Also Published As

Publication number Publication date
CN112738541A (zh) 2021-04-30
US12093592B2 (en) 2024-09-17
EP4231650A4 (en) 2024-05-22
CN112738541B (zh) 2023-05-16
US20240036792A1 (en) 2024-02-01
EP4231650A1 (en) 2023-08-23

Similar Documents

Publication Publication Date Title
WO2022135093A1 (zh) 画面显示方法、装置及电子设备
WO2022095840A1 (zh) 直播间创建方法、装置、电子设备及存储介质
US20240311069A1 (en) Screen projecting method and apparatus, electronic device and storage medium
WO2022017184A1 (zh) 交互方法、装置、电子设备及计算机可读存储介质
US11849211B2 (en) Video processing method, terminal device and storage medium
WO2023000888A1 (zh) 云应用的实现方法、装置、电子设备和存储介质
CN110290398B (zh) 视频下发方法、装置、存储介质及电子设备
US20240089551A1 (en) Interaction method and apparatus, and electronic device
US20220159197A1 (en) Image special effect processing method and apparatus, and electronic device and computer readable storage medium
WO2023045973A1 (zh) 直播礼物云渲染方法、装置、电子设备及存储介质
US20220272283A1 (en) Image special effect processing method, apparatus, and electronic device, and computer-readable storage medium
WO2023143217A1 (zh) 特效道具的展示方法、装置、设备及存储介质
CN115278275A (zh) 信息展示方法、装置、设备、存储介质和程序产品
CN112770159A (zh) 多屏互动系统、方法、装置、设备及存储介质
WO2024193511A1 (zh) 互动方法、装置、电子设备、计算机可读介质
CN113747227B (zh) 视频播放方法、装置、存储介质以及电子设备
US20240048665A1 (en) Video generation method, video playing method, video generation device, video playing device, electronic apparatus and computer-readable storage medium
WO2024032752A1 (zh) 转场特效图的生成方法、装置、设备及存储介质
US20220327580A1 (en) Method and apparatus for interacting with image, and medium and electronic device
US20240007590A1 (en) Image processing method and apparatus, and electronic device, and computer readable medium
US11847758B2 (en) Material display method and apparatus, terminal, and storage medium
US11805219B2 (en) Image special effect processing method and apparatus, electronic device and computer-readable storage medium
CN112486380A (zh) 一种显示界面的处理方法、装置、介质和电子设备
WO2023143318A1 (zh) 一种数据展示方法、装置、电子设备及存储介质
WO2024222439A1 (zh) 图像处理方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21909090

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021909090

Country of ref document: EP

Effective date: 20230517

WWE Wipo information: entry into national phase

Ref document number: 18256617

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE