Data display method and device

By calculating the size of the video after being scaled when the live video is played in full screen and displaying it in non-overlapping areas, the problem of business components blocking the live video is solved, improving the user experience.

CN119094832APending Publication Date: 2024-12-06SHANGHAI BILIBILI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411281545.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

During the live broadcast process, opening the business components will block the live broadcast screen and affect the user experience.

Method used

When playing live videos in full screen, you can obtain the specified area size of the current screen and the original size of the video, calculate the size after the video is scaled, and display the video and components in non-overlapping areas, and use adaptive filling to avoid occlusion.

Benefits of technology

It realizes the display of live screen and business components at the same time during full screen playback, avoiding occlusion and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094832A_ABST
    Figure CN119094832A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data display method, and the method comprises the steps: obtaining a first size of a pre-designated first region of a current screen and an original size of a video under the condition that a video of a current live broadcasting room is played in a full screen and a triggering instruction of a target assembly is received; determining a second size of the zoomed video according to the first size and the original size; the video is zoomed according to the second size and displayed in the first area, the target component is displayed in a second area of the current screen, and the second area and the first area are not overlapped. According to the technical scheme provided by the embodiment of the invention, the service component opened during full-screen playing of the live broadcast picture of the live broadcast room does not shield the live broadcast picture, so that the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer technology, and in particular, to a data display method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] During the live broadcast, the anchor often needs to open some business components on the live broadcast page to display some data or use some functions. Business components include gift panels, recommended live broadcast room lists, event schedules, real-time game data, etc.

[0003] However, when a business component (panel) is opened, the newly opened business component will cover the underlying live screen, causing the live screen to be partially blocked, affecting the user's viewing of the complete live screen and reducing the user experience.

[0004] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the invention

[0005] The embodiments of the present application provide a data display method, apparatus, computer device, computer-readable storage medium, and computer program product to solve or alleviate one or more of the technical problems raised above.

[0006] One aspect of an embodiment of the present application provides a data display method, the method comprising:

[0007] When the video in the current live broadcast room is played in full screen and a trigger instruction of the target component is received, obtaining a first size of a first area pre-designated on the current screen and an original size of the video;

[0008] Determine a second size of the video after scaling according to the first size and the original size;

[0009] The video is scaled according to the second size and displayed in the first area, and the target component is displayed in a second area of ​​the current screen, wherein the second area does not overlap with the first area.

[0010] Optionally, determining the second size of the video after scaling according to the first size and the original size includes:

[0011] When the aspect ratio of the first size is greater than the aspect ratio of the original size, the height of the first size is determined to be the height of the video after scaling, and the width of the video after scaling is determined according to the aspect ratio of the original size and the height of the first size, to obtain the second size;

[0012] When the aspect ratio of the first size is smaller than the aspect ratio of the original size, the width of the first size is determined as the width of the video after scaling, and the height of the video after scaling is determined according to the aspect ratio of the original size and the width of the first size to obtain the second size.

[0013] Optionally, scaling the video according to the second size and displaying it in the first area includes:

[0014] When the aspect ratio of the first size is greater than the aspect ratio of the original size, determining the remaining width of the first area when the video is displayed in the first area, scaling the video according to the second size and displaying it in the first area, and filling the area corresponding to the remaining width with a black border;

[0015] When the aspect ratio of the first size is smaller than the aspect ratio of the original size, determine the remaining height of the first area when the video is displayed in the first area, scale the video according to the second size and display it in the first area, and fill the area corresponding to the remaining height with a black border.

[0016] Optionally, scaling the video according to the second size and displaying it in the first area includes:

[0017] Get the total display duration of the pre-configured video zoom animation;

[0018] Start the zoom animation of the video, obtain the animation start time, and obtain the current time according to the screen refresh callback;

[0019] Determine the current animation progress percentage according to the animation start time, the current time and the total display duration;

[0020] Determine an offset corresponding to the current time according to the current animation progress percentage and the easing function, wherein the offset includes a size offset and a position offset;

[0021] The target value of the video after scaling at the current time is determined according to the offset, and the video corresponding to the current time is displayed according to the target value, wherein the target value includes the target size and target position of the video after scaling.

[0022] Optionally, the method is applied to a component management container, which is used to receive the addition of tasks, each of which includes target configuration information, and the component management container displays the component corresponding to the current task and scales the video according to the target configuration information. The target configuration information includes configuration information of the target component, the trigger instruction, the first area, the second area and the process view layout.

[0023] Optionally, the component management container is also used to manage the hierarchical relationship between different components when executing the task.

[0024] Optionally, the component management container is further used to determine whether the video has been scaled before executing the current task, and if the video has been scaled, to perform display of the component corresponding to the current task.

[0025] Optionally, the component management container is also used to close the display of the target component and restore the video to full-screen playback after all tasks are executed.

[0026] Another aspect of an embodiment of the present application provides a data display device, the device comprising:

[0027] An acquisition module, used for acquiring a first size of a first area pre-designated on the current screen and an original size of the video when the video in the current live broadcast room is played in full screen and a trigger instruction of a target component is received;

[0028] A determination module, configured to determine a second size of the video after scaling according to the first size and the original size;

[0029] A display module is used to scale the video according to the second size and display it in the first area, and to display the target component in a second area of ​​the current screen, wherein the second area does not overlap with the first area.

[0030] Another aspect of an embodiment of the present application provides a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein: the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described above.

[0031] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method described above is implemented.

[0032] Another aspect of an embodiment of the present application provides a computer program product, including a computer program, which implements the method described above when executed by a processor.

[0033] The above technical solution adopted in the embodiment of the present application may have the following advantages:

[0034] By playing the video in the current live broadcast room in full screen and receiving a trigger instruction of the target component, the first size of the first area pre-specified on the current screen and the original size of the video are obtained, a second size of the video after scaling is determined according to the first size and the original size, the video is scaled according to the second size and displayed in the first area, and the target component is displayed in the second area of ​​the current screen, wherein the second area does not overlap with the first area. When the live video is played in full screen, the components to be displayed and the live screen can be displayed simultaneously in two non-overlapping areas, so that the opened business components will not block the live screen, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0036] Figure 1 The following schematically shows an operating environment diagram of the data display method according to the first embodiment of the present application;

[0037] Figure 2 The flowchart of the data display method according to the first embodiment of the present application is schematically shown;

[0038] Figure 3 Schematically shows Figure 2 Flow chart of sub-steps of step S202;

[0039] Figure 4 A schematic diagram showing an effect example of the data display method according to the first embodiment of the present application is shown;

[0040] Figure 5 Schematically shows Figure 2 Flow chart of sub-steps of step S204;

[0041] Figure 6 Schematically shows Figure 2 Another sub-step flow chart of step S204;

[0042] Figure 7 The following is a schematic diagram showing an example flow chart of a data display method according to Embodiment 1 of the present application;

[0043] Figure 8 The schematic diagram shows a principle diagram of a component management mechanism in a data display method according to Embodiment 1 of the present application;

[0044] Fig. 9 A block diagram schematically shows a data display device according to the second embodiment of the present application; and

[0045] Fig.10 The hardware architecture diagram of the computer device according to the third embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0047] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0048] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.

[0049] First, the following terms are explained:

[0050] Component: It is a core concept in software development and architecture. It refers to a software unit that can be independently designed, developed, tested, deployed and replaced. It encapsulates the code, resources (such as images, style sheets) and logic required to complete a specific function.

[0051] Easing function: a mathematical function used to control the rate of change during animation or motion. This function makes the animation or motion look more natural and smooth by adjusting the change in animation speed from constant speed to acceleration and then to deceleration, avoiding the abrupt feeling that may be caused by simple linear changes.

[0052] Component management container: It is an environment or framework that provides a series of services and management functions, and is used to store, organize, manage and interact with various components. These components can be code snippets, service units or functional modules in the software system. They interact through the interfaces and mechanisms provided by the container and together form a complete system or application.

[0053] Secondly, in order to facilitate those skilled in the art to understand the technical solutions provided in the embodiments of the present application, the relevant technologies are described below:

[0054] In the related art, when a live video is played in full screen, if a service component (panel) is opened, the newly opened service component will cover the underlying live screen, causing the live screen to be partially blocked, affecting the user's ability to watch the complete live screen, and reducing the user experience. Since the display area of ​​the live broadcast room's playback screen is drawn frame by frame by the GPU using absolute coordinates, there is no way to directly use the zoom animation provided by the system to achieve zoom and displacement effects.

[0055] To this end, the embodiment of the present application provides a data display technical solution. In this technical solution, the business components that can be opened when the live broadcast screen of the live broadcast room is played in full screen will not block the live broadcast screen, thereby improving the user experience. See below for details.

[0056] Finally, for ease of understanding, an exemplary operating environment is provided below.

[0057] like Figure 1 As shown, the environment diagram includes a service platform 2, a network 4, and a client 6, wherein:

[0058] The service platform 2 may be composed of a single or multiple computing devices. The multiple computing devices may include virtualized computing instances. Virtualized computing instances may include virtual machines, such as simulations of computer systems, operating systems, servers, etc. The computing device may load a virtual machine based on a virtual image and / or other data defining specific software (e.g., operating system, dedicated application, server) for simulation. As the demand for different types of processing services changes, different virtual machines may be loaded and / or terminated on one or more computing devices. A hypervisor may be implemented to manage the use of different virtual machines on the same computing device.

[0059] The service platform 2 may be configured to communicate with the client 6 or the like via a network 4. The network 4 includes various network devices, such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network 4 may include physical links, such as coaxial cable links, twisted pair cable links, optical fiber links, combinations thereof, and the like, or wireless links, such as cellular links, satellite links, Wi-Fi links, and the like.

[0060] The service platform 2 can provide storage, reading, writing, querying, deleting and other services, such as providing a live broadcast viewing service for the client.

[0061] Client 6 can be a Windows, Android TM) or iOS operating systems, such as smart phones, tablet devices, laptop computers, virtual reality devices, gaming devices, set-top boxes, car terminals, and smart TVs. Based on the above operating systems, various applications can be run, such as an application for watching live broadcasts.

[0062] The client 6 may provide / configure a user access page for manipulating the service platform 2 or uploading an object, etc.

[0063] It should be noted that the above devices are exemplary, and the number and type of devices are adjustable in different scenarios or according to different needs.

[0064] The following describes the technical solution of the present application through multiple embodiments, taking the client as the execution subject. It should be noted that these embodiments can be implemented in a variety of different forms and should not be interpreted as being limited to the embodiments described here.

[0065] Embodiment 1

[0066] Figure 2 The flowchart of the data display method according to the first embodiment of the present application is schematically shown.

[0067] like Figure 2 As shown, the data display method may include steps S200 to S204, wherein:

[0068] Step S200, when the video in the current live broadcast room is played in full screen and a trigger instruction of the target component is received, the first size of the first area pre-specified on the current screen and the original size of the video are obtained.

[0069] Step S202: determining a second size of the video after scaling according to the first size and the original size.

[0070] Step S204: scaling the video according to the second size and displaying it in the first area, and displaying the target component in the second area of ​​the current screen, wherein the second area does not overlap with the first area.

[0071] The data display method provided in this embodiment obtains the first size of the first area pre-specified in the current screen and the original size of the video when the video in the current live broadcast room is played in full screen and the trigger instruction of the target component is received, determines the second size of the video after scaling according to the first size and the original size, scales the video according to the second size and displays it in the first area, and displays the target component in the second area of ​​the current screen, wherein the second area does not overlap with the first area, and when the live video is played in full screen, the components to be displayed and the live screen can be displayed simultaneously in two non-overlapping areas, so that the opened business components will not block the live screen, thereby improving the user experience.

[0072] The following combination Figure 2 , each step in steps S200 to S204 and other optional steps are described in detail.

[0073] Step S200 , when the video in the current live broadcast room is played in full screen and a trigger instruction of the target component is received, the first size of the first area pre-specified on the current screen and the original size of the video are obtained.

[0074] The full-screen video playback in the live broadcast room can be vertical full-screen playback or horizontal full-screen playback.

[0075] The triggering instruction of the target component may vary depending on the specific component, for example, swiping from the right side of the screen to the left, swiping from the top of the screen to the bottom, swiping from the bottom of the screen to the top, long pressing or double clicking, etc.

[0076] The first area pre-specified on the current screen refers to the area displayed after the video is scaled, which may vary according to the screen size of the terminal device corresponding to the specific client. The first area may be a rectangular area, and the aspect ratio of the first area may be determined according to the aspect ratio of most live videos, so that the first area can be adapted to more scaled live videos as much as possible. The position of the first area may be on the left or right side. When the position of the first area is on the left side, the second area corresponding to the business component may be on the right side; when the position of the first area is on the right side, the second area corresponding to the business component may be on the left side. Of course, it may also be the case that the first area is on the upper left side and the second area is on the lower right side, or the first area is on the upper right side and the second area is on the lower left side. The proportion of the first area to the current screen may be 60% to 80%, so that the live screen is not scaled too small to affect viewing. The first size of the first area may be determined according to factors such as the size of the current screen, the proportion of the first area to the screen, and the aspect ratio of most live videos. Optionally, after determining the first size, the client may also specify or determine the position of the first area according to the first size, for example, the starting coordinates of the first area may be determined by the screen coordinate system.

[0077] Step S202 , determining a second size of the video after scaling according to the first size and the original size.

[0078] The client can first obtain the screen filling method of the first area, wherein the screen filling method may include adaptive, stretching or filling methods, and the screen filling method may be pre-configured. Among them, the adaptive method may be to calculate the scaling ratio of the video according to the aspect ratio in the first size and the aspect ratio of the original size, and then obtain the second size of the video after scaling according to the scaling ratio; the stretching method may directly use the first size as the second size of the video after scaling; and the filling method may be to calculate the aspect ratio of the first size and the aspect ratio of the original size, scale the video according to the shorter side of the video, and crop the excess part. It is understandable that since the stretching method may cause video deformation and the filling method may cause information loss, it is preferred to adopt an adaptive method. Optionally, the filling method can be defaulted or specified as an adaptive method.

[0079] In an optional embodiment, if Figure 3 As shown, step S202 may further include steps S300 to S302:

[0080] Step S300, when the aspect ratio of the first size is greater than the aspect ratio of the original size, determine the height of the first size as the height of the video after scaling, and determine the width of the video after scaling according to the aspect ratio of the original size and the height of the first size to obtain a second size.

[0081] Step S302, when the aspect ratio of the first size is smaller than the aspect ratio of the original size, the width of the first size is determined as the width of the video after scaling, and the height of the video after scaling is determined according to the aspect ratio of the original size and the width of the first size to obtain a second size.

[0082] Specifically, when the aspect ratio of the first size is greater than the aspect ratio of the original size of the video, the height of the first size is used as the height of the video after scaling, and the height of the first size is multiplied by the aspect ratio of the original size to obtain the width of the video after scaling, thereby obtaining the second size of the video after scaling; when the aspect ratio of the first size is less than the aspect ratio of the original size of the video, the width of the first size is used as the width of the video after scaling, and the width of the first size is divided by the aspect ratio of the original size to obtain the width of the video after scaling, thereby obtaining the second size of the video after scaling. In particular, when the aspect ratio of the first size is equal to the aspect ratio of the original size of the video, the first size is directly used as the second size of the video after scaling.

[0083] In this optional embodiment, when the aspect ratio of the first size is greater than the aspect ratio of the original size, the height of the first size is determined as the height of the video after scaling, and the width of the video after scaling is determined according to the aspect ratio of the original size and the height of the first size, so as to obtain the final size of the video after scaling; when the aspect ratio of the first size is less than the aspect ratio of the original size, the width of the first size is determined as the width of the video after scaling, and the height of the video after scaling is determined according to the aspect ratio of the original size and the width of the first size, so as to obtain the final size of the video after scaling. The final size of the video after scaling can be adaptively determined according to the size of the first area and the original size of the video, so as to avoid deformation or information loss of the live broadcast picture after scaling, ensure the viewing quality of the live broadcast picture after scaling, and improve the user experience.

[0084] Step S204 , scaling the video according to the second size and displaying it in the first area, and displaying the target component in the second area of ​​the current screen, wherein the second area does not overlap with the first area.

[0085] Please refer to Figure 4 , which is a specific example diagram of the data display method. As shown in the figure, the video of the live broadcast room (i.e., the live broadcast screen) is scaled to the first area on the left side of the screen, while the target component is in the second area on the right side of the screen. The second area is adjacent to the first area but does not overlap, so that the business component and the live broadcast screen can be displayed at the same time without the business component blocking the live broadcast screen.

[0086] In an optional embodiment, if Figure 5 As shown, in step S204, scaling the video according to the second size and displaying it in the first area may further include steps S400 to S402:

[0087] Step S400, when the aspect ratio of the first size is greater than the aspect ratio of the original size, determine the remaining width of the first area when the video is displayed in the first area, scale the video according to the second size and display it in the first area, and fill the area corresponding to the remaining width with a black border.

[0088] Step S402, when the aspect ratio of the first size is smaller than the aspect ratio of the original size, determine the remaining height of the first area when the video is displayed in the first area, scale the video according to the second size and display it in the first area, and fill the area corresponding to the remaining height with a black border.

[0089] When the aspect ratio of the first size is greater than that of the original size, when the video is displayed in the first area, there will be extra width in the first area, i.e., residual width, and the area corresponding to the residual width can be filled with a black border. When the video is displayed in the first area, it can be displayed centered along the width direction, so that the residual widths on the left and right sides of the first area are equal. Accordingly, the residual width of any side can be equal to the width of the first size minus the width of the second size divided by 2, so that the width of the black border is the residual width, and the height of the black border is the height corresponding to the first size.

[0090] When the aspect ratio of the first size is smaller than that of the original size, when the video is displayed in the first area, there will be extra height in the first area, i.e., residual height, and the area corresponding to the residual height can be filled with a black border. When the video is displayed in the first area, it can be displayed centered in the height direction so that the residual heights on the upper and lower sides of the first area are equal. Accordingly, the residual height of any side can be equal to the height of the first size minus the height of the second size divided by 2, so that the height of the black border is the residual height, and the width of the black border is the width corresponding to the first size.

[0091] In this optional embodiment, when the aspect ratio of the first size is greater than the aspect ratio of the original size, the remaining width of the first area when the video is displayed in the first area is determined, the video is scaled according to the second size and displayed in the first area, and the area corresponding to the remaining width is filled with black borders; when the aspect ratio of the first size is less than the original size, the remaining height of the first area when the video is displayed in the first area is determined, the video is scaled according to the second size and displayed in the first area, and the area corresponding to the remaining height is filled with black borders. This can adapt to different aspect ratios of live videos, implement adaptive black border processing, maintain the original proportions of the video to avoid deformation, and provide a better visual experience.

[0092] In an optional embodiment, if Figure 6 As shown, in step S204, scaling the video according to the second size and displaying it in the first area may further include steps S500 to S508:

[0093] Step S500, obtaining the total display duration of the pre-configured video zoom animation.

[0094] Step S502, start the video zoom animation, obtain the animation start time, and obtain the current time according to the screen refresh callback.

[0095] Step S504, determining the current animation progress percentage according to the animation start time, the current time and the total display duration.

[0096] Step S506, determining an offset corresponding to the current time according to the current animation progress percentage and the easing function, where the offset includes a size offset and a position offset.

[0097] Step S508, determining a target value of the video after scaling at the current time according to the offset, and displaying the video corresponding to the current time according to the target value, wherein the target value includes a target size and a target position after scaling the video.

[0098] The pre-configured total display duration may be 0.2 seconds, 0.3 seconds, or 0.5 seconds, etc., and may be set according to actual needs, and is not limited here.

[0099] When the video zoom animation starts, the start time of the zoom animation is obtained, and the current time is obtained according to the screen refresh callback. The current time can be obtained after the animation starts and at each screen refresh callback. After obtaining the current time, the animation start time is subtracted from the current time to obtain the current animation time, and then the current animation time is divided by the total display time to obtain the current animation progress percentage.

[0100] The easing function may include linear easing, accelerated easing, decelerated easing, accelerated decelerated easing, rebound easing, elastic easing, and custom easing, etc. Preferably, the easing function may adopt a cosine function to achieve a slow animation effect at the beginning and end of the animation, and a gradual in and out animation effect of acceleration in the middle, which is a kind of accelerated decelerated easing.

[0101] The size offset may refer to the value of the current time video size deviating from the original size, which may be specifically calculated by (size offset = (second size - original size) * easing value), wherein the easing value is a value obtained based on the easing function and the current animation progress percentage. Taking the cosine function as an example, the easing value may be calculated by (easeInOutOffset = -0.5*cos(progress*M_PI)+0.5), and the final easing value is between 0-1, wherein easeInOutOffset represents the easing value, progress represents the current animation progress percentage, and M_PI represents pi. The position offset may refer to the value of the current time video deviating from the initial position, which may be specifically calculated by (position offset = (final position - initial position) * easing value).

[0102] After obtaining the offset, the initial value plus the offset can be used to obtain the target value after the video is scaled at the current time, and then the current time scaling animation is displayed according to the target value. When using the screen coordinate system, the width, height, X coordinate and Y coordinate corresponding to the current video can be obtained respectively, so that the animation display of the current time can be performed. Optionally, the target value can also include the transparency of the video after scaling. Accordingly, the transparency can also be calculated by the easing function to obtain the offset, and then the transparency corresponding to the current time is calculated according to the offset, so that the animation effect of transparency change is also provided during the scaling of the live screen.

[0103] In this optional embodiment, by obtaining the total display time of a pre-configured video zoom animation, obtaining the current time according to the screen refresh callback, determining the current animation progress percentage according to the current time and the total display time, determining the offset corresponding to the current time according to the current animation progress percentage and the easing function; then determining the target value of the current time video after zooming according to the offset, and displaying the video corresponding to the current time according to the target value, the animation effect of zooming the live screen can be achieved, thereby reducing the abruptness of the video zooming process, achieving a smooth transition effect, and improving the visual experience.

[0104] Please refer to Figure 7 , which is a flowchart of the data display method. As shown in the figure, it can generally include the following contents:

[0105] 1. User clicks or system services trigger the simultaneous display of live broadcast images and business components;

[0106] 2. Data processing stage: Get the original frame and the scaled frame, determine the screen filling mode, and when the screen filling mode is adaptive, process the black edges on the top and bottom or left and right through adaptive frame calculation, and save the original frame and the calculated scaled frame; when the screen filling mode is stretch or fill, perform non-adaptive frame calculation, and save the original frame and the calculated scaled frame;

[0107] 3. Start the zoom animation of the live screen, determine the current time according to the screen refresh callback, and determine the current animation progress percentage according to the current time and the animation start time;

[0108] 4. Determine the current animation progress percentage. If the current animation progress percentage is less than 100%, proceed to step 5, otherwise proceed to step 6.

[0109] 5. Calculate the current offset according to the current animation progress percentage, calculate the position and size of the current live screen according to the current offset, render it, and return to execution 3;

[0110] 6. The zoom animation of the live screen is completed.

[0111] It is understandable that there may be many different business requirements for the live broadcast room, and different business requirements will have many different trigger mechanisms. For example: when a component button is clicked, the corresponding panel of the component pops up and the live broadcast screen is scaled; or when the system service pushes an activity, the live broadcast screen is scaled while the page is opened. If there is no unified class to manage different trigger mechanisms and business components, it will cause problems such as scattered trigger logic, high subsequent maintenance costs, and easy online problems, resulting in uncontrollable stability of the entire function.

[0112] In an optional embodiment, the data display method is applied to a component management container, which is used to receive the addition of tasks. Each task includes target configuration information. The component management container displays the components corresponding to the current task and scales the video according to the target configuration information. The target configuration information includes configuration information of the target component, trigger instruction, first area, second area and process view layout.

[0113] Among them, different tasks correspond to different target components. Different tasks configure the corresponding target components, trigger instructions, the size and position of the first area, the size and position of the second area, and the process view layout through target configuration information, so that the component management container can realize different business needs according to the target configuration information of different tasks.

[0114] In this optional embodiment, the data display method is implemented through a component management container. The component management container is used to receive the addition of tasks. Each task includes target configuration information. The component management container displays the components corresponding to the current task and zooms in on the video according to the target configuration information. The target configuration information includes configuration information of the target component, trigger instructions, the first area, the second area, and the process view layout. The component management container can be used to manage different business needs, thereby improving the stability of the business and subsequent maintainability and expansion.

[0115] In an optional embodiment, the component management container is also used to manage the hierarchical relationship of different components when executing a task. Specifically, there may be multiple target components corresponding to a task. When executing a task containing multiple target components, the component management container manages the hierarchical relationship of the multiple target components and ensures the orderly display of each target component. In addition, when executing two or more tasks at a similar time, the component management container can manage the hierarchical relationship of the target components corresponding to different tasks to ensure the orderly display of each component.

[0116] In an optional embodiment, the component management container is also used to determine whether the video has been scaled before executing the current task, and if it has been scaled, to display the component corresponding to the current task. Since the component management container may execute two or more tasks in a similar time, if the current task is the first task, the target component will be displayed while the video is scaled; if the current task is not the first task, since the video has been scaled, there is no need to perform the video scaling process again, and the target component corresponding to the current task can be directly displayed.

[0117] In this optional embodiment, the component management container determines whether the video has been scaled before executing the current task. If it has been scaled, it directly executes the display of the component corresponding to the current task. The component management container can be used to uniformly manage the live screen scaling and component display involved in multiple tasks, so that business developers do not need to worry about the scaling of the current live screen, thereby reducing development difficulty and improving business stability.

[0118] In an optional embodiment, the component management container is also used to close the display of the target component and restore the video to full-screen playback after all tasks are executed.

[0119] Please refer to Figure 8 , which is a schematic diagram of the principle of the component management mechanism, where the component management mechanism includes two sub-processes: component display and component closing:

[0120] Component display:

[0121] 1. Process the tasks added to the component management container and display the task view according to the task view layout;

[0122] 2. Determine whether the current task is the only task. If so, trigger the player zoom animation and business component display at the same time; if not, the current task display is completed.

[0123] Component shutdown:

[0124] 1. Close the current task, remove the task view, and remove the current task;

[0125] 2. Determine whether there are any tasks currently. If so, close the current task. If not, it means that all current tasks have been completed, and restore the player to full-screen playback.

[0126] In this optional embodiment, the component management container is also used to close the display of the target component and restore the video to full-screen playback after all tasks are executed. The component management container can be used to centrally and uniformly manage different tasks to improve the stability of business implementation. At the same time, the live broadcast screen can be automatically restored to full-screen playback at the end of the component display, further improving the automation process of the live broadcast screen and improving the user experience.

[0127] Embodiment 2

[0128] Fig. 9 The block diagram of the data display device 600 according to the second embodiment of the present application is schematically shown. The device 600 can be divided into one or more program modules, one or more program modules are stored in a storage medium, and are executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. Fig. 9 As shown, the device 600 may include: an acquisition module 610, a determination module 620 and a display module 630, wherein:

[0129] The acquisition module 610 is used to acquire the first size of the first area pre-designated on the current screen and the original size of the video when the video in the current live broadcast room is played in full screen and a trigger instruction of the target component is received;

[0130] A determination module 620, configured to determine a second size of the video after scaling according to the first size and the original size;

[0131] The display module 630 is used to scale the video according to the second size and display it in the first area, and to display the target component in the second area of ​​the current screen, wherein the second area does not overlap with the first area.

[0132] In an optional embodiment, the determination module 620 is further configured to:

[0133] When the aspect ratio of the first size is greater than the aspect ratio of the original size, the height of the first size is determined to be the height of the video after scaling, and the width of the video after scaling is determined according to the aspect ratio of the original size and the height of the first size, to obtain the second size;

[0134] When the aspect ratio of the first size is smaller than the aspect ratio of the original size, the width of the first size is determined as the width of the video after scaling, and the height of the video after scaling is determined according to the aspect ratio of the original size and the width of the first size to obtain the second size.

[0135] In an optional embodiment, the display module 630 is further used to:

[0136] When the aspect ratio of the first size is greater than the aspect ratio of the original size, determining the remaining width of the first area when the video is displayed in the first area, scaling the video according to the second size and displaying it in the first area, and filling the area corresponding to the remaining width with a black border;

[0137] When the aspect ratio of the first size is smaller than the aspect ratio of the original size, determine the remaining height of the first area when the video is displayed in the first area, scale the video according to the second size and display it in the first area, and fill the area corresponding to the remaining height with a black border.

[0138] In an optional embodiment, the display module 630 is further used to:

[0139] Get the total display duration of the pre-configured video zoom animation;

[0140] Start the zoom animation of the video, obtain the animation start time, and obtain the current time according to the screen refresh callback;

[0141] Determine the current animation progress percentage according to the animation start time, the current time and the total display duration;

[0142] Determine an offset corresponding to the current time according to the current animation progress percentage and the easing function, wherein the offset includes a size offset and a position offset;

[0143] The target value of the video after scaling at the current time is determined according to the offset, and the video corresponding to the current time is displayed according to the target value, wherein the target value includes the target size and target position of the video after scaling.

[0144] In an optional embodiment, the device 600 is applied to a component management container, which is used to receive the addition of tasks, each of which includes target configuration information, and the component management container displays the component corresponding to the current task and scales the video according to the target configuration information. The target configuration information includes configuration information of the target component, the trigger instruction, the first area, the second area, and the process view layout.

[0145] In an optional embodiment, the component management container is also used to manage the hierarchical relationship between different components when executing the task.

[0146] In an optional embodiment, the component management container is further used to determine whether the video has been scaled before executing the current task, and if it has been scaled, to perform display of the component corresponding to the current task.

[0147] In an optional embodiment, the component management container is also used to close the display of the target component and restore the video to full-screen playback after all tasks are executed.

[0148] Embodiment 3

[0149] Fig.10 The schematic diagram of the hardware architecture of a computer device 10000 suitable for implementing the data display method according to the third embodiment of the present application is schematically shown. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. In other embodiments, the computer device 10000 may be a rack server, a blade server, a tower server, or a cabinet server (including an independent server, or a server cluster composed of multiple servers), etc. Fig.10 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them:

[0150] The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10010 may be an internal storage module of the computer device 10000, such as a hard disk or a memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 may also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store an operating system and various application software installed in the computer device 10000, such as program codes of a data display method, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or are to be output.

[0151] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.

[0152] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.

[0153] It should be pointed out that Fig.10 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0154] In this embodiment, the data display method stored in the memory 10010 can also be divided into one or more program modules and executed by one or more processors (such as processor 10020) to complete the embodiment of the present application.

[0155] Embodiment 4

[0156] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the data display method in the embodiment are implemented.

[0157] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEP ROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium can be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium can also be an external storage device of a computer device, such as a plug-in hard disk equipped on the computer device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the computer-readable storage medium can also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the computer-readable storage medium is generally used to store the operating system and various application software installed on the computer device, such as the program code of the data display method in the embodiment, etc. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or are to be output.

[0158] Embodiment 5

[0159] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.

[0160] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices, optionally, they can be implemented by executable program codes of computer devices, so that they can be stored in a storage device and executed by the computer device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0161] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A data display method, It is characterized in that The method comprises: When the video in the current live broadcast room is played in full screen and a trigger instruction of the target component is received, obtaining a first size of a first area pre-designated on the current screen and an original size of the video; Determine a second size of the video after scaling according to the first size and the original size; The video is scaled according to the second size and displayed in the first area, and the target component is displayed in a second area of ​​the current screen, wherein the second area does not overlap with the first area.

2. The method according to claim 1, It is characterized in that The step of determining a second size of the video after scaling according to the first size and the original size includes: When the aspect ratio of the first size is greater than the aspect ratio of the original size, the height of the first size is determined to be the height of the video after scaling, and the width of the video after scaling is determined according to the aspect ratio of the original size and the height of the first size, to obtain the second size; When the aspect ratio of the first size is smaller than the aspect ratio of the original size, the width of the first size is determined as the width of the video after scaling, and the height of the video after scaling is determined according to the aspect ratio of the original size and the width of the first size to obtain the second size.

3. The method according to claim 2, It is characterized in that The step of scaling the video according to the second size and displaying the video in the first area includes: When the aspect ratio of the first size is greater than the aspect ratio of the original size, determining the remaining width of the first area when the video is displayed in the first area, scaling the video according to the second size and displaying it in the first area, and filling the area corresponding to the remaining width with a black border; When the aspect ratio of the first size is smaller than the aspect ratio of the original size, determine the remaining height of the first area when the video is displayed in the first area, scale the video according to the second size and display it in the first area, and fill the area corresponding to the remaining height with a black border.

4. The method according to claim 1, It is characterized in that The step of scaling the video according to the second size and displaying the video in the first area includes: Get the total display duration of the pre-configured video zoom animation; Start the zoom animation of the video, obtain the animation start time, and obtain the current time according to the screen refresh callback; Determine the current animation progress percentage according to the animation start time, the current time and the total display duration; Determine an offset corresponding to the current time according to the current animation progress percentage and the easing function, wherein the offset includes a size offset and a position offset; The target value of the video after scaling at the current time is determined according to the offset, and the video corresponding to the current time is displayed according to the target value, wherein the target value includes the target size and target position of the video after scaling.

5. The method according to any one of claims 1 to 4, It is characterized in that The method is applied to a component management container, which is used to receive the addition of tasks. Each task includes target configuration information. The component management container displays the component corresponding to the current task and scales the video according to the target configuration information. The target configuration information includes configuration information of the target component, the trigger instruction, the first area, the second area and the process view layout.

6. The method according to claim 5, It is characterized in that The component management container is also used to manage the hierarchical relationship of different components when executing the task.

7. The method according to claim 5, It is characterized in that The component management container is also used to determine whether the video has been scaled before executing the current task, and if it has been scaled, to perform display of the component corresponding to the current task.

8. The method according to claim 5, It is characterized in that The component management container is also used to close the display of the target component and restore the video to full-screen playback after all tasks are executed.

9. A data display device, It is characterized in that The device comprises: An acquisition module, used for acquiring a first size of a first area pre-designated on the current screen and an original size of the video when the video in the current live broadcast room is played in full screen and a trigger instruction of a target component is received; A determination module, configured to determine a second size of the video after scaling according to the first size and the original size; A display module is used to scale the video according to the second size and display it in the first area, and to display the target component in a second area of ​​the current screen, wherein the second area does not overlap with the first area.

10. A computer device, It is characterized in that include: at least one processor; and a memory communicatively coupled to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.