Data display method, device, electronic device and storage medium
By pre-acquisitioning and cache the data of the second video page during the display of the first video page, the problem of long black screen time after the video page is switched is solved, and fast response and efficient display are achieved.
Patent Information
- Application Number
- CN202310001720.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-03
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-01-03
AI Technical Summary
In the existing video data loading and display methods, there is a long black screen time after switching of the video page, which affects the display effect.
During the display process of the first video page, the video data of the second video page is obtained from the server in advance and stored in the local cache. In response to the video page switching request, the second video data is directly read and rendered from the local cache for display.
By pre-acquisitioning and cacheing video data, the black screen time after switching of video pages is reduced, and the video data display efficiency and user experience are improved.
Smart Images

Figure CN116095386B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a data display method, device, electronic device, and storage medium. Background Art
[0002] With the development of short video technology, short video applications have emerged. These applications typically display multiple videos for users to browse and watch. These applications are installed on the user's client. When a user first accesses a short video page, the client requests video data from the server. Based on the video data requested from the server, the client renders the video and then displays the video on the client's display page.
[0003] In the current video data loading and display method, in response to a video page switching request, a request is made to the server for target video data. During the loading and display process of the target video data, the display page will temporarily be a black screen page or a loading state because the target video data has not yet been loaded into the display page.
[0004] However, in the current video data loading and display method, even if a preset display image is added to the black screen page to slow down the display time of the completely black screen page, the time required to wait for the target video data to be displayed is not actually shortened, which affects the display effect of the video data. Summary of the Invention
[0005] The present disclosure provides a data display method, device, electronic device, and storage medium to at least solve the problem of a long black screen after switching video pages in the related art. The technical solution of the present disclosure is as follows:
[0006] According to a first aspect of an embodiment of the present disclosure, a data presentation method is provided, comprising:
[0007] In the case of a cold start of the application, the first video page is displayed;
[0008] During the display of the first video page, second video data is obtained from the server in advance, wherein the second video data corresponds to a second video page, and the first video page is different from the second video page;
[0009] In response to the video page switching request, the second video page is displayed.
[0010] In an exemplary embodiment, displaying the second video page in response to the video page switching request includes:
[0011] In response to the video page switching request, the second video data in the local cache is read, the second video data is rendered, and the rendered second video data is displayed in the page instance corresponding to the pre-created second video page.
[0012] In an exemplary embodiment, before displaying the second video page in response to the video page switching request, the method further includes:
[0013] During the display of the first video page, request an interface for the second video page from the server;
[0014] The second video data corresponding to the second video page is requested from the server through the interface, and a page instance corresponding to the second video page is created, and the requested second video data and the page instance are stored in the local cache.
[0015] In an exemplary embodiment, after displaying the second video page in response to the video page switching request, the method further includes:
[0016] Obtain the current number of notification messages on the second video page;
[0017] If the current number of notification messages is greater than the number of notification messages of the second video page recorded during the display of the first video page, it is determined that the second video data is invalid;
[0018] Based on the latest notification message among the current number of notification messages, updated video data that meets a preset validity condition is determined, and the updated video data is displayed on the second video page.
[0019] In an exemplary embodiment, after displaying the second video page in response to the video page switching request, the method further includes:
[0020] Checking the association relationship between the video account corresponding to the second video data and the local account;
[0021] If the association relationship between the video account and the local account does not meet the preset association relationship condition, determining that the second video data is invalid;
[0022] Updated video data that meets preset validity conditions is obtained, and the updated video data is displayed on the second video page.
[0023] In an exemplary embodiment, after requesting the second video data corresponding to the second video page from the server through the interface, the method further includes:
[0024] The interface is detected to determine a data pre-acquisition result of requesting the second video data from the server, and the data pre-acquisition result is recorded locally.
[0025] In an exemplary embodiment, after displaying the second video page in response to the video page switching request, the method further includes:
[0026] If the current data pre-acquisition result is failure, determining that the second video data is invalid;
[0027] Updated video data that meets preset validity conditions is obtained, and the updated video data is displayed on the second video page.
[0028] According to a second aspect of an embodiment of the present disclosure, a data display device is provided, the device comprising:
[0029] A first display unit is configured to display a first video page when the application is cold started;
[0030] a pre-acquisition unit configured to acquire second video data from a server in advance during the display of the first video page, wherein the second video data corresponds to a second video page, and the first video page is different from the second video page;
[0031] The second display unit is configured to display the second video page in response to the video page switching request.
[0032] In an exemplary embodiment, the second display unit is specifically used to respond to a video page switching request, read the second video data in the local cache, render the second video data, and display the rendered second video data in a page instance corresponding to the pre-created second video page.
[0033] In an exemplary embodiment, the apparatus further comprises:
[0034] A requesting unit configured to execute an interface for requesting a second video page from a server during display of the first video page;
[0035] The storage unit is configured to execute a request for the second video data corresponding to the second video page from the server through the interface, create a page instance corresponding to the second video page, and store the requested second video data and the page instance in a local cache.
[0036] In an exemplary embodiment, the apparatus further comprises:
[0037] An acquiring unit, configured to acquire the current number of notification messages on the second video page;
[0038] A first determining unit is configured to determine that the second video data is invalid if the current number of notification messages is greater than the number of notification messages of the second video page recorded during the display of the first video page;
[0039] The third display unit is configured to determine updated video data that meets a preset validity condition based on the latest notification message in the current number of notification messages, and display the updated video data in the second video page.
[0040] In an exemplary embodiment, the apparatus further comprises:
[0041] A checking unit configured to check an association relationship between a video account corresponding to the second video data and a local account;
[0042] a second determining unit configured to determine that the second video data is invalid if the association relationship between the video account and the local account does not satisfy a preset association relationship condition;
[0043] The fourth display unit is configured to obtain updated video data that meets a preset validity condition and display the updated video data in the second video page.
[0044] In an exemplary embodiment, the apparatus further comprises:
[0045] The recording unit is configured to detect the interface, determine a data pre-acquisition result of requesting the second video data from the server, and record the data pre-acquisition result locally.
[0046] In an exemplary embodiment, the apparatus further comprises:
[0047] a third determining unit, configured to determine that the second video data is invalid if a current data pre-acquisition result is a failure;
[0048] The fifth display unit is configured to obtain updated video data that meets a preset validity condition and display the updated video data in the second video page.
[0049] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0050] processor;
[0051] a memory for storing instructions executable by the processor;
[0052] The processor is configured to execute the instructions to implement the data display method as described in any one of the first aspects above.
[0053] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data display method as described in any one of the first aspects above.
[0054] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided. When the instructions are executed by a processor of an electronic device, the electronic device is enabled to perform the data display method described in any one of the first aspects above.
[0055] The technical solutions provided by the embodiments of the present disclosure bring at least the following beneficial effects:
[0056] This method pre-requests the video data corresponding to other video pages other than the first video page from the server while the first video page is being displayed. This allows the client to quickly respond to a video page switch request after the user triggers it, displaying the second video page containing the second video data, thus minimizing the black screen duration during the second video page display.
[0057] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.
[0059] Figure 1 The figure is a flowchart of a data display method according to an exemplary embodiment.
[0060] Figure 2 The figure is a schematic diagram showing a time comparison between an original video data request method and a video data pre-request method according to an exemplary embodiment.
[0061] Figure 3 The figure is a flowchart showing a method for pre-requesting video data according to an exemplary embodiment.
[0062] Figure 4 The figure is a flowchart showing a method for verifying the validity of second video data according to an exemplary embodiment.
[0063] Figure 5 The flowchart of another method for verifying the validity of second video data is shown according to an exemplary embodiment.
[0064] Figure 6is a flowchart of another method for verifying the validity of second video data according to an exemplary embodiment.
[0065] Figure 7 The figure is a flowchart showing an example of a data display method according to an exemplary embodiment.
[0066] Figure 8 The figure is a block diagram of a data display device according to an exemplary embodiment.
[0067] Figure 9 It is a structural block diagram of some internal modules in a data display device according to an exemplary embodiment.
[0068] Figure 10 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0069] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0070] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0071] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0072] Figure 1 is a flow chart showing a data display method according to an exemplary embodiment. Figure 1 As shown, the data display method is used in the client and includes the following steps.
[0073] In step S110 , when the application is cold started, the first video page is displayed.
[0074] In implementation, the application for video data display is integrated in the client, and the user can start and run the application through the client. Then, in the case of a cold start of the application, the first video page associated with the application startup is displayed.
[0075] Specifically, there are two ways to start an application: a cold start and a hot start. The cold start method refers to the first time an application is entered or the second time an application is entered after the application was completely exited last time. Therefore, when the cold start of the application is triggered, the application is switched from a completely interrupted state to a started state, and a large amount of video data content needs to be created and loaded. Therefore, in order to avoid the video page displaying a black screen page due to the failure to load the video data when the application is obtaining video data from the server, a screen opening animation is displayed during the cold start of the application, and at the same time, the video data is obtained and rendered. When the screen opening animation is finished, the video data of the first video page associated with the screen opening animation can be displayed. Other video pages use the data display method provided in the present disclosure to reduce the time of displaying the black screen page. The specific data display method will be described in detail in the following embodiments and will not be repeated here.
[0076] Optionally, the application's hot start mode refers to a startup mode in which the application remains running in the background and the front-end display of the application is restored. In this application hot start mode, the application remains running in the background, so the client does not interrupt the request for video data from the server. Therefore, when the application's hot start is triggered, the application can quickly render and display the video data based on the requested video data, and there is no situation where a black screen page is displayed.
[0077] In step S120, during the display of the first video page, the second video data is obtained from the server in advance.
[0078] The second video data corresponds to a second video page, and the first video page is different from the second video page.
[0079] In implementation, during the display of the first video page, the client can obtain the second video data from the server in advance based on the background processing logic of the application. The second video data is the video data of other video pages (i.e., the second video page) other than the first video page. For example, the application contains multiple types of video pages: recommended video page, friend video page, fan video page, etc. If the application displays the recommended video page (i.e., the first video page) first during each cold start, then during the display of the recommended video page, for other video pages other than the recommended video page, it is called the second video page, and the client will obtain the video data of the corresponding type of each second video page, i.e., the second video data, from the server in advance.
[0080] In step S130 , in response to the video page switching request, the second video page is displayed.
[0081] In implementation, when the user wants to switch video pages during the display of the first video page, the user can trigger a video page switching request, which carries the page identifier of the video page to be displayed.
[0082] In response to the video page switching request, the client determines the page instance of the second video page to be displayed based on the page identifier and obtains the second video data corresponding to the second video page, thereby displaying the second video page containing the second video data based on the page instance.
[0083] In the above data display method, during the display of the first video page, a request is made to the server in advance for video data corresponding to other video pages other than the first video page. This allows the client to quickly respond to a video page switch request after the user triggers it, displaying the second video page containing the second video data, thus reducing the black screen duration during the display of the second video page.
[0084] In an exemplary embodiment, in step S130, in response to the video page switching request, displaying the second video page containing the second video data can be specifically implemented by the following steps:
[0085] In response to the video page switching request, the second video data in the local cache is read, the second video data is rendered, and the rendered second video data is displayed in a page instance corresponding to the pre-created second video page.
[0086] In implementation, when a user wants to switch video pages, the user can trigger a video page switching request. In response to the video page switching request, the client reads the second video data pre-stored in the local cache, renders the second video data, and displays the rendered second video data in the page instance corresponding to the pre-created second video page, that is, displays the second video page containing the second video data. The second video data is the video data corresponding to the second video page to be displayed. Figure 2 As shown, Figure 2 Schematic diagram of the time comparison between the original video data request method and the video data pre-request method (ie, the data display method provided by the embodiment of the present disclosure), Figure 2 It can be seen that obtaining (loading) the video data of the second video page in advance and creating a page instance of the second video page in advance will greatly shorten the black screen page display time of the second video page.
[0087] In this embodiment, before the video page switching request is triggered, the video data of other video pages is requested from the server in advance and the video data is stored in the local cache. Therefore, after the video page switching request is triggered, the client can directly render and display based on the video data in the local cache, thereby reducing the video data acquisition time before the second video page is displayed, and thereby reducing the black screen page display time before the second video page is displayed.
[0088] In an exemplary embodiment, Figure 3 As shown, before step S130, the method further includes:
[0089] In step S310, during the display of the first video page, an interface for the second video page is requested from the server.
[0090] In practice, an interface is a protocol used to define a program. Different video pages correspond to different interfaces for data pre-requests. When requesting data, the interface is first requested. After receiving a response from the interface, the second video data is requested. Specifically, while the first video page is being displayed, the client requests the interface of the second video page from the server. For example, if the second video page is a friend video page, the interface of the second video page is the interface of the friend video page.
[0091] Optionally, in order to avoid the client from occupying the performance resources of the first video page display process when requesting the interface of the second video page from the server, the client presets a delay mechanism, that is, after the first video page is displayed for a preset time period, it requests the interface of the second video page from the server.
[0092] In step S320, the second video data corresponding to the second video page is requested from the server through the interface, and a page instance corresponding to the second video page is created, and the requested second video data and page instance are stored in the local cache.
[0093] During implementation, the client establishes a connection with the server through the interface of the second video page and requests the second video data corresponding to the second video page from the server. For example, if the second video page is a friend video page, the client requests the video data of the friend video page from the server. This video data is a video work published by an account with a friend-type association relationship with the local account. This video data is used as the second video data. Furthermore, the client creates a page instance corresponding to the second video page, which is used to carry the video data to display the second video data. The client then stores the requested second video data and the created page instance in the local cache.
[0094] In this embodiment, during the display of the first video page, a request is made to the server in advance for video data corresponding to other video pages other than the first video page. This allows the client to quickly respond to a video page switch request after the user triggers it, displaying the second video page containing the second video data, thereby reducing the black screen duration during the display of the second video page.
[0095] In an exemplary embodiment, when displaying the second video data, the displayed second video data needs to meet the validity conditions, wherein the validity conditions of the second video data are: 1. The second video data is the latest video data of the second video page; 2. The second video data meets the video type conditions corresponding to the second video data; 3. The current second video data is the second video data obtained based on the operation of pre-acquiring the video data this time. Failure to meet any one or more of the validity conditions of the second video data indicates that the current second video data is invalid, and the second video data can only be displayed as placeholder video data. Specifically, since the client has pre-requested the second video data of the second video page, the validity of the second video data cannot be guaranteed. It is necessary to verify the validity of the second video data when displaying the second video data. Taking condition 1 in the validity conditions as an example, the video data of the second video page may have been updated during the video page switching process, that is, the second video data of the pre-requested second video page is no longer the latest video data of the second video page. Therefore, it is necessary to verify condition 1 in the validity conditions of the second video data, such as Figure 4 As shown, after step S130, the method further includes:
[0096] In step S410, the current number of notification messages on the second video page is obtained.
[0097] In practice, for each video page, the client records notification messages for that video page. Each notification message represents an updated piece of video data corresponding to that video page, and the client counts the number of notification messages received within a preset time period before the current moment. Then, while displaying the second video data on the second video page, the client obtains the current number of notification messages for the second video page, thereby verifying the timeliness of the second video data based on the current number of notification messages.
[0098] In step S420, if the current number of notification messages is greater than the number of notification messages of the second video page during the display of the first video page, it is determined that the second video data is invalid.
[0099] Determine the updated video data corresponding to the latest notification message among the current number of notification messages.
[0100] In practice, if the current number of notification messages is greater than the number of notification messages for the second video page recorded during the display of the first video page, the video data representing the second video page has been updated. At this point, the pre-loaded (obtained) video data is no longer the latest video data. Therefore, the client determines that the currently playing second video data is invalid.
[0101] In step S430, based on the latest notification message in the current number of notification messages, the updated video data corresponding to the latest notification message is determined, and the updated video data is displayed on the second video page.
[0102] In practice, since the second video data acquired in advance is no longer the latest video data, that is, the second video data has expired. Therefore, the client determines the second video data as placeholder video data, determines the updated video data corresponding to the latest notification message based on the latest notification message in the current number of notification messages, and re-requests the updated video data from the server. The updated video data is video data that meets both the timeliness requirements (the latest video data) and other validity conditions. Then, the client interrupts the currently playing second video data and displays the updated video data on the second video page. Among them, the placeholder video data is video data that immediately interrupts playback when there is updated video data.
[0103] In this embodiment, since the second video data is pre-acquired video data, the validity of the second video data will be checked during the display of the second video data. If the second video data is invalid video data, the currently playing second video data will be immediately interrupted and the latest updated video data will be displayed to ensure the validity of the displayed video data.
[0104] In an exemplary embodiment, during the video page switching process, the second video data can no longer meet the video type condition of the second video page, that is, the verification of condition 2 in the validity condition of the second video data, such as Figure 5 As shown, after step S130, the method further includes:
[0105] In step S510 , the association relationship between the video account corresponding to the second video data and the local account is checked.
[0106] During implementation, the client checks the association between the video account corresponding to the second video data and the local account. This association is used to verify whether the second video data meets the video type condition of the second video page. For example, the page type of the second video page is a friend video page, that is, the video data contained in the friend video page meets the video type condition that the video data is all video data published by a video account that has a friend relationship with the local account. Among them, the friend relationship is a two-way association between the local account and the video account. Therefore, the client verifies the association between the video account corresponding to the second video data currently being displayed and the local account.
[0107] In step S520, if the association relationship between the video account and the local account does not meet the preset association relationship condition, the second video data is determined to be invalid;
[0108] In implementation, if the association between the video account and the local account is a non-bidirectional association, it indicates that the second video data does not meet the video type condition of the second video page. Therefore, the client determines that the second video data is invalid and can only serve as placeholder video data.
[0109] In step S530, updated video data that meets a preset validity condition is obtained, and the updated video data is displayed on the second video page.
[0110] During implementation, the client re-acquires updated video data from the server, interrupts the currently playing second video data, and displays the updated video data on the second video page. Specifically, the process of pre-acquisition, rendering, and displaying the updated video data is similar to that of the second video data. The pre-acquisition, rendering, and display process for the second video data has been described in detail in the above embodiment and will not be repeated here.
[0111] In this embodiment, since the second video data is pre-acquired video data, the validity of the second video data will be checked during the display of the second video data. If the second video data is invalid video data, the currently playing second video data will be immediately interrupted and the latest updated video data will be displayed to ensure the validity of the displayed video data.
[0112] In an exemplary embodiment, after requesting the second video data corresponding to the second video page from the server through the interface, the method further includes:
[0113] The detection interface determines the data pre-acquisition result of requesting the second video data from the server, and records the data pre-acquisition result locally.
[0114] In practice, the client detects the interface when pre-fetching data and determines the data pre-fetch result when requesting the second video data from the server. The client then records the data pre-fetch result locally for query verification of the data pre-fetch result.
[0115] In this embodiment, the pre-acquisition process of the video data is checked to obtain the data pre-acquisition result of the data pre-acquisition process, and then the data pre-acquisition result is recorded locally to facilitate query and processing of the data pre-acquisition result.
[0116] In an exemplary embodiment, Figure 6 As shown, after step S130, the method further includes:
[0117] In step S610 , when the current data pre-acquisition result is failure, it is determined that the second video data is invalid.
[0118] In implementation, when the current data pre-acquisition result is a failure, it indicates that the latest data pre-acquisition process has failed. Thus, the timeliness and video type of the second video data being displayed at this time cannot be guaranteed. Therefore, the client determines that the current second video data is invalid.
[0119] In step S620, updated video data that meets a preset validity condition is obtained, and the updated video data is displayed on the second video page.
[0120] During implementation, the client re-acquires the updated video data, interrupts the currently playing second video data, and displays the updated video data on the second video page.
[0121] In this embodiment, since the second video data is pre-acquired video data, the validity of the second video data will be checked during the display of the second video data. If the second video data is invalid video data, the currently playing second video data will be immediately interrupted and the latest updated video data will be displayed to ensure the validity of the displayed video data.
[0122] In an exemplary embodiment, Figure 7As shown, the data display method is specifically described by taking the second video page as the friend video page as an example. The client executes the preset data display logic, records the number of notification messages of the friend video page to be switched, and pre-requests the interface of the friend video page during the display of the first video page, obtains the second video data and creates a page instance of the friend video page. In response to the switch request for the friend video page, the second video data of the pre-requested friend video page is rendered and displayed on the friend video page. Then, the client checks whether the second video data is invalid. If the second video data is invalid, then during the display of the second video data, the video data of the friend video page is requested again as the updated video data, and then the display of the second video data is interrupted, and the updated video data that has been re-requested is displayed. If the second video data is not invalid, the second video data continues to be displayed until the end.
[0123] It should be understood that although Figure 1 、 Figure 3-Figure 7 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 、 Figure 3-Figure 7 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The order of execution of these steps or stages is not necessarily one by one, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0124] It can be understood that the same / similar parts between the various embodiments of the above method in this specification can be referred to each other, and each embodiment focuses on the differences from other embodiments. For related parts, please refer to the description of other method embodiments.
[0125] Figure 8 FIG. 1 is a block diagram of a data display device according to an exemplary embodiment. Figure 8 The device 800 includes a first display unit 802 , a pre-acquisition unit 804 and a second display unit 806 .
[0126] The first display unit 802 is configured to display the first video page when the application is cold started;
[0127] The pre-acquisition unit 804 is configured to acquire second video data from the server in advance during the display of the first video page, where the second video data corresponds to the second video page, and the first video page is different from the second video page;
[0128] The second display unit 806 is configured to display the second video page in response to the video page switching request.
[0129] In an exemplary embodiment, the second display unit 806 is specifically used to respond to a video page switching request, read the second video data in the local cache, render the second video data, and display the rendered second video data in a page instance corresponding to a pre-created second video page.
[0130] In an exemplary embodiment, the apparatus 800 further includes:
[0131] The request unit is configured to execute an interface for requesting a second video page from the server during the display of the first video page;
[0132] The storage unit is configured to execute a request to the server through the interface for the second video data corresponding to the second video page, create a page instance corresponding to the second video page, and store the requested second video data and page instance in the local cache.
[0133] In an exemplary embodiment, the apparatus 800 further includes:
[0134] An acquiring unit, configured to acquire the current number of notification messages on the second video page;
[0135] A first determining unit is configured to determine that the second video data is invalid if the current number of notification messages is greater than the number of notification messages of the second video page recorded during the display of the first video page;
[0136] The third display unit is configured to determine the updated video data that meets the preset validity condition based on the latest notification message in the current number of notification messages, and display the updated video data in the second video page.
[0137] In an exemplary embodiment, the apparatus 800 further includes:
[0138] A checking unit configured to check an association relationship between a video account corresponding to the second video data and a local account;
[0139] a second determining unit configured to determine that the second video data is invalid if the association relationship between the video account and the local account does not satisfy a preset association relationship condition;
[0140] The fourth display unit is configured to obtain updated video data that meets a preset validity condition and display the updated video data on the second video page.
[0141] In an exemplary embodiment, the apparatus 800 further includes:
[0142] The recording unit is configured to execute the detection interface, determine the data pre-acquisition result of requesting the second video data from the server, and record the data pre-acquisition result locally.
[0143] In an exemplary embodiment, the apparatus 800 further includes:
[0144] a third determining unit configured to determine that the second video data is invalid if the current data pre-acquisition result is a failure;
[0145] The fifth display unit is configured to obtain updated video data that meets a preset validity condition and display the updated video data on the second video page.
[0146] Optional, such as Figure 9 As shown, the data display device also includes: a page instance creation module, a page creation management module and a video stream data model module; wherein:
[0147] This page creates a management module to handle the rendering and display logic of the video page.
[0148] The page instance creation module is used to create a video page instance.
[0149] The video stream data model module is used to store and manage video data for display.
[0150] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0151] Figure 10 FIG1 is a block diagram of an electronic device 1000 for data presentation according to an exemplary embodiment. For example, the electronic device 1000 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0152] Reference Figure 10 , the electronic device 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output (I / O) interface 1012 , a sensor component 1014 , and a communication component 1016 .
[0153] The processing component 1002 generally controls the overall operation of the electronic device 1000, such as operations associated with display, phone calls, data communications, camera operation, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 1002 may include one or more modules to facilitate interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate interaction between the multimedia component 1008 and the processing component 1002.
[0154] The memory 1004 is configured to store various types of data to support operations on the electronic device 1000. Examples of such data include instructions for any application or method operating on the electronic device 1000, contact data, phone book data, messages, pictures, videos, etc. The memory 1004 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.
[0155] The power supply assembly 1006 provides power to the various components of the electronic device 1000. The power supply assembly 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1000.
[0156] The multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the electronic device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0157] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 1000 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 1004 or transmitted via the communication component 1016. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.
[0158] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0159] The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the electronic device 1000. For example, the sensor assembly 1014 can detect the open / closed state of the electronic device 1000, the relative positioning of components, such as the display and keypad of the electronic device 1000. The sensor assembly 1014 can also detect changes in the position of the electronic device 1000 or components of the electronic device 1000, the presence or absence of user contact with the electronic device 1000, the orientation or acceleration / deceleration of the device 1000, and temperature changes of the electronic device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1014 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an accelerometer, a gyroscope, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0160] The communication component 1016 is configured to facilitate wired or wireless communication between the electronic device 1000 and other devices. The electronic device 1000 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0161] In an exemplary embodiment, the electronic device 1000 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.
[0162] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the instructions can be executed by the processor 1020 of the electronic device 1000 to perform the above method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0163] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions, and the instructions can be executed by the processor 1020 of the electronic device 1000 to implement the above method.
[0164] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 1022 including instructions, and the instructions can be executed by a processor of the electronic device 1000 to perform the above method. The storage medium can be a computer-readable storage medium, for example, a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0165] In an exemplary embodiment, a computer program product is further provided. The computer program product includes instructions, and the instructions can be executed by a processor of the electronic device 1000 to implement the above method.
[0166] It should be noted that the above-mentioned devices, electronic devices, computer-readable storage media, computer program products, etc. can also include other implementation methods according to the description of the method embodiments. The specific implementation methods can refer to the description of the relevant method embodiments and will not be described one by one here.
[0167] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.
[0168] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A data display method, characterized in that: include: In the case of a cold start of the application, the first video page is displayed; During the display of the first video page, second video data is obtained from the server in advance, wherein the second video data corresponds to a second video page, and the first video page is different from the second video page; In response to the video page switching request, displaying the second video page; The method of displaying the first video page when the application is cold started includes: Display the opening animation during the application cold start process and obtain and render video data; When the opening screen animation display ends, the first video page associated with the opening screen animation is used to display video data; The method further comprises: Obtain the current number of notification messages on the second video page; If the current number of notification messages is greater than the number of notification messages of the second video page recorded during the display of the first video page, it is determined that the second video data is invalid; Based on the latest notification message among the current number of notification messages, updated video data that meets a preset validity condition is determined, and the updated video data is displayed on the second video page.
2. The data display method according to claim 1, characterized in that: The displaying of the second video page in response to the video page switching request includes: In response to the video page switching request, the second video data in the local cache is read, the second video data is rendered, and the rendered second video data is displayed in the page instance corresponding to the pre-created second video page.
3. The data display method according to claim 2, characterized in that: Before displaying the second video page in response to the video page switching request, the method further includes: During the display of the first video page, request an interface for the second video page from the server; The second video data corresponding to the second video page is requested from the server through the interface, and a page instance corresponding to the second video page is created, and the requested second video data and the page instance are stored in the local cache.
4. The data display method according to claim 1, characterized in that: After displaying the second video page in response to the video page switching request, the method further includes: Checking the association relationship between the video account corresponding to the second video data and the local account; If the association relationship between the video account and the local account does not meet the preset association relationship condition, determining that the second video data is invalid; Updated video data that meets preset validity conditions is obtained, and the updated video data is displayed on the second video page.
5. The data display method according to claim 3, characterized in that: After requesting the second video data corresponding to the second video page from the server through the interface, the method further includes: The interface is detected to determine a data pre-acquisition result of requesting the second video data from the server, and the data pre-acquisition result is recorded locally.
6. The data display method according to claim 5, characterized in that: After displaying the second video page in response to the video page switching request, the method further includes: If the current data pre-acquisition result is failure, determining that the second video data is invalid; Updated video data that meets preset validity conditions is obtained, and the updated video data is displayed on the second video page.
7. A data display device, characterized in that: The device comprises: A first display unit is configured to display a first video page when the application is cold started; a pre-acquisition unit configured to acquire second video data from a server in advance during the display of the first video page, wherein the second video data corresponds to a second video page, and the first video page is different from the second video page; The first display unit is specifically configured to display a splash screen animation during a cold start of the application, and to obtain and render video data; when the splash screen animation display ends, the first video page associated with the splash screen animation is used to display video data; A second display unit is configured to display the second video page in response to the video page switching request; The device further comprises: An acquiring unit, configured to acquire the current number of notification messages on the second video page; A first determining unit is configured to determine that the second video data is invalid if the current number of notification messages is greater than the number of notification messages of the second video page recorded during the display of the first video page; The third display unit is configured to determine updated video data that meets a preset validity condition based on the latest notification message in the current number of notification messages, and display the updated video data in the second video page.
8. The device according to claim 7, characterized in that The second display unit is specifically used to respond to a video page switching request, read the second video data in the local cache, render the second video data, and display the rendered second video data in a page instance corresponding to the pre-created second video page.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the data presentation method according to any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data presentation method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multimedia data processing method and device, electronic equipment and storage medium
CN114339364A