CN117812361A - Display device and browser cache data management method - Google Patents

Display device and browser cache data management method Download PDF

Info

Publication number
CN117812361A
CN117812361A CN202310155251.6A CN202310155251A CN117812361A CN 117812361 A CN117812361 A CN 117812361A CN 202310155251 A CN202310155251 A CN 202310155251A CN 117812361 A CN117812361 A CN 117812361A
Authority
CN
China
Prior art keywords
picture
data
cache data
page
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310155251.6A
Other languages
Chinese (zh)
Inventor
曾路明
王小伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vidaa Netherlands International Holdings BV
Original Assignee
Vidaa Netherlands International Holdings BV
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vidaa Netherlands International Holdings BV filed Critical Vidaa Netherlands International Holdings BV
Priority to CN202310155251.6A priority Critical patent/CN117812361A/en
Publication of CN117812361A publication Critical patent/CN117812361A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application provides a display device and a management method for browser cache data, wherein the display device displays a first area of a first page of a first application in a display area, switches the first application to a background mode after receiving a first control instruction of a user, hides the first page, and displays a second page. At this time, the first type of picture cache data corresponding to the pictures which are not in the first area in the cache data of the first application are deleted, and on the basis that the secondary display of the first application is not affected, the occupation of the memory space of the display device by the browser cache data is reduced, and the use performance of the display device is optimized. And reserving address information of the pictures so that corresponding pictures can be quickly acquired when the first application is displayed again, and avoiding affecting the user to browse the first page.

Description

Display device and browser cache data management method
Technical Field
The present disclosure relates to the field of display devices, and in particular, to a display device and a method for managing cached data in a browser.
Background
The display device refers to a terminal device capable of outputting a specific display screen, and may be a terminal device such as a smart television, a mobile terminal, a smart advertisement screen, and a projector. Taking intelligent electricity as an example, the intelligent television is based on the Internet application technology, has an open operating system and a chip, has an open application platform, can realize a bidirectional man-machine interaction function, and is a television product integrating multiple functions of video, entertainment, data and the like, and the intelligent television is used for meeting the diversified and personalized requirements of users.
When a browser based on the display device runs the webpage application, cache data can be generated, and the cache data of the browser can occupy the memory space of the display device. When the web application is in the background mode, the page of the web application will not be visible to the user, and at this time, the cache data of the web application is relatively unimportant, but the cache data of the web application still occupies the memory space of the display device. If the cache data of the browser occupies too much memory space of the display device, the cache data can be read and written when the display device executes other functions, so that the usability of the display device is deteriorated.
Disclosure of Invention
The application provides display equipment and a management method of browser cache data, when a webpage application is in a background mode, the image cache data which cannot influence the secondary display of the webpage application is cleaned, so that occupation of the memory space of the display equipment by the cache data of the browser is reduced, and the service performance of the display equipment is optimized.
In a first aspect, the present application provides a display device, comprising:
a display configured to display a first area of a first page of a first application within a display area, the first application being a browser-based running application;
A memory configured to store cached data for the browser, the cached data comprising cached data for the first application;
a controller configured to:
responding to a first control instruction input by a user, switching the first application to a background mode, controlling the display to hide the first page, and displaying a second page;
deleting first type picture cache data in cache data of the first application, and storing address information of a first picture to the memory, wherein the first type picture cache data is cache data corresponding to the first picture, the first picture is a picture which is not in the display area in the first page, and the address information is used for downloading picture data of the first picture.
In some embodiments of the present application, the controller deletes a first type of picture cache data in the cache data of the first application, and is configured to:
traversing the cache data of the first application according to a preset sequence to identify the picture cache data in the cache data of the first application;
if the picture cache data is not deleted, identifying the first type of picture cache data in the picture cache data;
And deleting the first type of picture cache data.
In some embodiments of the present application, the controller is further configured to:
identifying an identifier carried by the picture cache data;
if the identification is a deleted identification, determining that the picture cache data is deleted;
and if the identification is an undeleted identification, determining that the picture cache data is undeleted.
In some embodiments of the present application, if the picture cache data is not deleted, the controller identifies the first type of picture cache data in the picture cache data, configured to:
acquiring picture position parameters in the picture cache data and region parameters of the first region;
judging whether the picture corresponding to the picture cache data is the first picture or not according to the picture position parameter and the regional parameter of the first region;
and if the picture is the first picture, determining the picture cache data corresponding to the first picture as the first type picture cache data.
In some embodiments of the present application, the controller, after deleting the first type of picture cache data, is further configured to:
Marking the deleted identification for the first type of picture cache data;
and stopping the operation of the first application after all the first type of picture cache data carry the deleted identifications.
In some embodiments of the present application, the controller, after controlling the display to hide the first page and display the second page, is further configured to:
responding to a second control instruction input by a user, switching the first application to a foreground mode, and controlling the display to display the first area of the first page in the display area, wherein the first page does not comprise the first picture;
downloading the picture data of the first picture according to the address information, and caching the picture data of the first picture to the memory;
and if a first instruction of browsing the first page by a user is received, controlling the display to update the display content of the first page in the display area according to the picture data of the first picture stored in the memory in response to the first instruction.
In some embodiments of the present application, the controller downloads the picture data of the first picture according to the address information, and is configured to:
Traversing the cache data of the first application according to a preset sequence to identify the picture cache data in the cache data of the first application;
if the picture cache data is deleted, acquiring address information of the first picture corresponding to the picture cache data;
and downloading the picture data of the first picture according to the address information.
In some embodiments of the present application, if the controller receives a first instruction from a user to browse the first page, the controller is configured to, in response to the first instruction, control the display to update, in the display area, display content of the first page according to the picture data of the first picture stored in the memory, where the display is configured to:
responding to the first instruction, and acquiring a second area of the first page in the display area;
acquiring target picture data corresponding to the second region in the picture data of the first picture;
controlling the display to display the second area of the first page in the display area, wherein the second area comprises the first picture generated according to the target picture data.
In some embodiments of the present application, the controller is further configured to:
When the picture data of the first picture is downloaded according to the address information, if a second instruction of browsing other pages of the first application by a user is received, responding to the second instruction, controlling the display to display the other pages in the display area, and terminating downloading of the picture data of the first picture; and if the first control instruction of the user is received, responding to the first control instruction, and ending downloading the picture data of the first picture.
In a second aspect, the present application further provides a method for managing cached data of a browser, where the method is applied to the display device according to any one of the first aspects, where the display device displays a first area of a first page of a first application in a display area, where the first application is an application running based on the browser, and stores the cached data of the browser, where the cached data includes cached data of the first application;
the method comprises the following steps:
responding to a first control instruction input by a user, switching the first application to a background mode, hiding the first page, and displaying a second page;
deleting first type picture cache data in cache data of the first application, and storing address information of a first picture, wherein the first type picture cache data are cache data corresponding to the first picture, the first picture is a picture which is not in the display area in the first page, and the address information is used for downloading picture data of the first picture.
The display device displays a first area of a first page of a first application in the display area, switches the first application to a background mode after receiving a first control instruction of a user, hides the first page, and displays a second page. At this time, the first type of picture cache data corresponding to the pictures which are not in the first area in the cache data of the first application are deleted, and on the basis that the secondary display of the first application is not affected, the occupation of the memory space of the display device by the browser cache data is reduced, and the use performance of the display device is optimized. And reserving address information of the pictures so that corresponding pictures can be quickly acquired when the first application is displayed again, and avoiding affecting the user to browse the first page.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings that are needed in the embodiments will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a usage scenario of a display device according to an embodiment of the present application;
fig. 2 is a block diagram of a configuration of a control device in an embodiment of the present application;
Fig. 3 is a configuration diagram of a display device in an embodiment of the present application;
fig. 4 is an operating system configuration diagram of a display device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a system frame of a display device according to an embodiment of the present application;
FIG. 6 is a flowchart of managing cached data of a browser when a display device is first opened and a web application is used in an embodiment of the present application;
FIG. 7 is a flowchart of a display device managing cached data of a browser when a web application is in a background mode in an embodiment of the present application;
fig. 8 is a schematic diagram of a display device displaying a first page in an embodiment of the present application;
fig. 9 is a schematic flow chart of displaying a second page by the display device in the embodiment of the application;
fig. 10 is a flowchart of deleting first-type picture cache data by the display device in the embodiment of the present application;
FIG. 11 is a flowchart of a display device identifying a data state of picture buffer data in an embodiment of the present application;
fig. 12 is a flowchart of a display device identifying first type of picture buffer data in an embodiment of the present application;
FIG. 13 is a flowchart of a display device managing a first application in an embodiment of the present application;
fig. 14 is a flowchart of a display device cleaning up cached data of a browser in an embodiment of the present application;
FIG. 15 is a flowchart of a display device resuming displaying a first application in an embodiment of the present application;
fig. 16 is a flowchart of downloading picture data of a first picture by a display device according to an embodiment of the present application;
FIG. 17 is a flowchart of a display device updating display content of a first page in an embodiment of the present application;
FIG. 18 is a flowchart of a display device resuming displaying a first application in an embodiment of the present application;
fig. 19 is a flowchart of the display device resuming displaying the first application in the embodiment of the present application.
Detailed Description
Reference will now be made in detail to the embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The embodiments described in the examples below do not represent all embodiments consistent with the present application. Merely as examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
It should be noted that the brief description of the terms in the present application is only for convenience in understanding the embodiments described below, and is not intended to limit the embodiments of the present application. Unless otherwise indicated, these terms should be construed in their ordinary and customary meaning.
The terms "first," second, "" third and the like in the description and in the claims and in the above-described figures are used for distinguishing between similar or similar objects or entities and not necessarily for limiting a particular order or sequence, unless otherwise indicated. It is to be understood that the terms so used are interchangeable under appropriate circumstances.
The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or apparatus that comprises a list of elements is not necessarily limited to all elements explicitly listed, but may include other elements not expressly listed or inherent to such product or apparatus.
The display device provided by the embodiment of the application can have various implementation forms, for example, can be a smart television, a laser projection device, a display (monitor), an electronic whiteboard (electronic bulletin board), an electronic desktop (electronic table) and the like, and can also be a device with a display screen, such as a mobile phone, a tablet computer, a smart watch and the like. Fig. 1 and 2 are specific embodiments of a display device of the present application.
Fig. 1 is a schematic view of a usage scenario of a display device according to an embodiment. As shown in fig. 1, a user may operate the display apparatus 200 through the control apparatus 100, and the display apparatus 200 may acquire network data through the server 300 or acquire a live signal through a satellite.
Fig. 2 is a block diagram of the configuration of the control apparatus 100. In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the display device 200 may include at least one of infrared protocol communication or bluetooth protocol communication, and other short-range communication modes, and the display device 200 may be controlled by a wireless or wired mode. The user may control the display device 200 by inputting user instructions through keys on a remote control, voice input, control panel input, etc.
Fig. 3 shows a block diagram of a configuration of the display device 200 in accordance with an exemplary embodiment.
The display apparatus 200 includes at least one of a modem 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280.
In some embodiments, the display apparatus 200 may establish transmission and reception of control signals and data signals with the control apparatus 100 or the server 400 through the communicator 220. In some embodiments, the controller 250 and the modem 210 may be located in separate devices, i.e., the modem 210 may also be located in an external device to the main device in which the controller 250 is located, such as an external set-top box or the like. In some embodiments, the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored on the memory. The controller 250 controls the overall operation of the display apparatus 200. In some embodiments, the controller 250 includes at least one of a central processing unit (Central Processing Unit, CPU), a video processor, an audio processor, a graphics processor (Graphics Processing Unit, GPU), RAM (Random Access Memory), a ROM (Read-Only Memory), a first to nth interface for input/output, a communication Bus (Bus), and the like. In some embodiments, the display 260 includes a display screen component for presenting a picture, and a driving component for driving an image display, a component for receiving an image signal output from the controller 250, displaying video content, image content, and a menu manipulation interface, and a user manipulation UI interface. In some embodiments, the display 260 may be a liquid crystal display, an OLED display, a projection device, and a projection screen. In some embodiments, a user may input a user command through a graphical user interface (Graphic User Interface, GUI) displayed on the display 260, and the user input interface receives the user input command through the Graphical User Interface (GUI). Alternatively, the user may input the user command by inputting a specific sound or gesture, and the user input interface recognizes the sound or gesture through the sensor to receive the user input command. In some embodiments, a "user interface" is a media interface for interaction and exchange of information between an application or operating system and a user that enables conversion between an internal form of information and a form acceptable to the user. A commonly used presentation form of a user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It may be an interface element such as an icon, a window, a control, etc. displayed in a display screen of the electronic device, where the control may include at least one of a visual interface element such as an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc.
In some embodiments, the display device 200 is based on a VIDAA software platform, and as shown in fig. 4, the Linux platform-based operating system is divided into three layers, namely, an application layer, a middleware layer and a hardware layer from top to bottom. The application layer comprises various applications and application frameworks. The middleware layer includes various protocols and components. The hardware layer includes various interfaces, hardware and drivers.
In some embodiments, the application layer may include a Native application (Native App), and the application layer may further include a Web application (Web App), where the Web application is an application developed and run by a browser of the display device 200, and cache data generated by the Web application during running belongs to cache data of the browser, where the cache data of the browser is stored in a memory space of the display device 200. The cached data of the web application is used to generate the page of the web application, and is relatively unimportant when the web application is in the background mode, i.e., when the page of the web application is not currently visible to the user. However, the cache data of the web application still occupies the memory space of the display device 200. For the display device 200 with limited memory space, if the cache data of the browser occupies a larger memory space, the usability of the display device 200 will be affected, and the display device 200 will have problems such as blocking.
In order to solve the above problems, the embodiments of the present application provide a display device and a method for managing cached data of a browser, so as to clean cached data of a web application when the web application is in a background mode, so as to reduce occupation of memory space of the display device by cached data of the browser on the basis of avoiding affecting redisplay of the web application, thereby optimizing use performance of the display device.
The display device may be the display device 200 shown in fig. 1, 3 or 4 or other display devices, and embodiments of the present application are described by taking the display device 200 shown in fig. 1, 3 or 4 as an example.
The display device 200 may run a web application based on the system framework shown in fig. 5. The system framework comprises a webpage, a UI module, a webpage application control module, a browser interface layer, a browser kernel layer, a middleware layer and a platform layer. The browser interface layer comprises a loading control module, a window management module, a background control module and the like. The browser kernel layer comprises a capacity (Content) module, a blank module, a V8 engine module, a Memory Cache module and a Memory Control module. The middleware layer comprises a television middleware, a system input module, a graphic module, a multimedia module, a system application manager module and the like. The platform layer includes Linux.
As shown in FIG. 5, the web application provides a browser control interface based on a browser kernel. The web application control module loads and runs the web application on the browser through the browser interface. The cache data of the browser, such as picture data, is managed by a memory cache module of the browser.
When a user opens and uses a web application for the first time, the display device 200 may manage the cached data of the browser according to the flow shown in fig. 6, and the specific steps are as follows:
s601, responding to an opening instruction input by a user, acquiring resources of a first application, and caching the resources of the first application to obtain cached data of the first application.
The first application indicates an incoming web application for the user. For example, when the display device 200 displays a home page including an icon of the first application, the user may control the focus to move to the icon of the first application through the control device 100, such as a remote controller, and select the icon to input an opening instruction to the display device 200. In response to the opening instruction, the display device 200 obtains the resources of the first application, and caches the resources, for example, the picture data is cached to the memory cache module of the browser.
S602, displaying a page of the first application in a display area by using the cache data of the first application.
The display area is an area of the display for displaying page content of the web application. In some embodiments, the size of the currently displayed page may be greater than the size of the display area, at which time the page content of the area of the page that is within the display area is visible to the user and the page content of the other areas of the page is not visible to the user.
The application layer of the display device 200 notifies the system application management module of the middleware, which creates a window for displaying the first application by calling the window management interface through the web application control module, in response to the open instruction. The window loads the page by calling the loading control interface and using the buffer data of the first application, and operates the webpage application.
And S603, updating the content displayed in the display area by the first application in response to the browsing instruction input by the user.
The browse instruction may be an area for instructing to adjust the display of the first page in the display area, or may be another page for instructing to display the first application. The display device 200 loads a corresponding resource in response to the browsing instruction, and updates the content displayed in the display area by the first application based on the loaded resource.
The browser may support a background mode of the web application. The background mode refers to a mode of not exiting the web application to hide the page of the web application from the user. At this time, the user may use other applications and functions of the display device 200. If the user opens the web application again, the page displaying the web application will resume to make it visible to the user. When the web application is in the background mode, the cache data of the web application is relatively unimportant because the user cannot see the web application, which provides a scene basis for cleaning up the cache data of the browser to reduce the memory space of the display device 200.
Example 1
When the web application is in the background mode, the display device 200 may manage the cached data of the browser according to the flow shown in fig. 7, and the specific steps are as follows:
s701, responding to a first control instruction input by a user, switching the first application to a background mode, hiding the first page, and displaying the second page.
The first control instruction is used for indicating a background mode for starting the first application. Taking the control device 100 as a remote controller for example, a user may send a first control instruction to the display device 200 through an exit key of the remote controller, the user may also send the first control instruction to the display device 200 through a home key of the remote controller, the user may also send the first control instruction to the display device 200 through other shortcut keys of the remote controller (such as shortcut keys of other applications), and so on.
The display device 200 switches the first application to the background mode in response to the first control instruction. The first page is a page that the display device 200 displays upon receiving the first control instruction, wherein an area of the first page that is currently within the display area is referred to as a first area, and an area of the first page that is not currently within the display area is referred to as a non-display area. Taking the first page shown in fig. 8 as an example, the display area 201 is an area where the display device 200 is used to display a web application, a hatched area in the first page 800 is a non-display area 802, and the remaining areas are first areas 801. The first area 801 includes a picture a and a picture B, and the non-display area 802 includes a picture C and a picture D.
Based on the system framework shown in fig. 5, after receiving the first control instruction, the system application management module notifies the web page control application module to call the interface corresponding to the browser so as to hide the window of the first application. And creating, by the system application management module through the web application control module, a window for displaying the second page by calling the window management interface, and displaying the second page within the window.
The second page is a page corresponding to the first control instruction. For example, if the user sends the first control instruction to the display device 200 through the exit key of the remote controller, the second page is a page displayed after exiting the first application, such as a desktop of the display device 200. If the user sends the first control instruction to the display device 200 through the home key of the remote controller, the second page is the desktop of the display device 200. If the user sends the first control instruction to the display device 200 through other shortcut keys of the remote controller (such as shortcut keys of other applications), the second page is a page corresponding to the other applications. The displaying process of the second page may refer to steps S601-S603, which are not described herein.
Taking the first page 800 shown in fig. 8 as an example, taking the second page as a desktop, after the first application is switched to the background mode, the second page may be displayed in the flow shown in fig. 9, where the second page includes the picture P. The first page is displayed in the window 901, and the display device 200 responds to the first control instruction to create a window 902 to display the second page in the window 902, wherein the window 902 is positioned at the upper layer of the window 901, so as to realize the effect of hiding the first page and displaying the second page.
S702, deleting first-type picture cache data in cache data of a first application, and storing address information of a first picture to a memory.
The cache data of the first application includes picture cache data and non-picture cache data, and the picture cache data occupies more memory space than the non-picture cache data. Therefore, the picture cache data is deleted, more memory space can be free, and the service performance of the display device 200 is further effectively optimized.
The picture cache data in the cache data can be identified according to the specified attribute, the specified attribute has a corresponding relation with url of the picture, and if the specified attribute is identified in the cache data, the cache data pointed by the url corresponding to the specified attribute can be determined to be the picture cache data. In some embodiments, the specified attribute may be a source (source) attribute of the img tag, such as < img src= "url" >, if img src is identified in the cached data, the cached data pointed to by url may be determined to be picture cached data. The specified attribute may also be a background picture attribute of a cascading style sheet (Cascading Style Sheets, CSS) for setting one or more background images, such as background-image: url, for an element, and if the background-image is identified in the cached data, it may be determined that the cached data pointed to by the url is picture cached data.
According to the position of the picture on the page, the picture cache data can be divided into first-type picture cache data and second-type picture cache data. The picture in the non-display area is called a first picture, the picture in the first area is called a second picture, when the first page is displayed, the picture visible to the user is the second picture, and the picture invisible to the user is the first picture. Taking the first page 800 shown in fig. 8 as an example, the picture a and the picture B are second pictures, and the picture C and the picture D are first pictures. If the first application is switched from the background mode to the foreground mode, i.e. the first page 800 of the first application is redisplayed, the page content of the first area of the first page 800 is still displayed. Thus, upon satisfying the first page 800 of the first application being redisplayed, the display of the second picture needs to be satisfied, the display of the first picture being relatively unimportant. Correspondingly, compared with the second-type picture cache data, the first-type picture cache data is unimportant, and deletion processing is selected for the first-type picture cache data.
The display device 200 may delete the first type of picture buffer data according to the flow shown in fig. 10, and the specific steps are as follows:
S1001, traversing the cache data of the first application according to a preset sequence to identify the picture cache data in the cache data of the first application.
The preset sequence may be a buffering sequence of each buffered data, or may be another designated browsing sequence. As each cached data is browsed, the data type of the cached data is identified. For example, the type of the cache data may be identified according to the name suffix of the folder in which the cache data is located, the type field in the cache data, and the like.
And if the cache data is identified as non-picture cache data, reserving the non-picture cache data. And if the cached data is identified as the picture cached data, further processing the picture cached data.
S1002, if the picture buffer data is not deleted, identifying first-type picture buffer data in the picture buffer data.
A data state of the picture cache data is identified, the data state including deleted and not deleted. And only when the picture cache data is not deleted, further processing the picture cache data.
The display device 200 may recognize the data state of the picture buffer data according to the flow shown in fig. 11, and the specific steps are as follows:
S1101, identifying an identifier carried by the picture buffer data.
The corresponding identifier can be carried on a Flag bit (Flag) of the picture cache data to mark the data state of the picture cache data. The identifiers comprise deleted identifiers and undeleted identifiers, wherein the deleted identifiers are used for marking the data state of the picture cache data as deleted, and the undeleted identifiers are used for marking the data state of the picture cache data as undeleted. In some embodiments, the deleted flag may be 0 and the undeleted flag may be 1.
S1102, if the identifier is a deleted identifier, determining that the picture cache data has been deleted.
Taking the example that the deleted identifier may be 0, if the flag bit is identified as 0, it is determined that the picture cache data has been deleted.
S1103, if the flag is the undeleted flag, it is determined that the picture cache data is not deleted.
Taking the deleted identifier as an example, the deleted identifier may be 1, if the flag bit is identified as 1, it is determined that the picture cache data is not deleted.
If the picture cache data is not deleted, further identifying whether the picture cache data is the first type of picture cache data. In some embodiments, the first type of picture cache data may be determined based on a location of the picture in the first page and the first region. The display device 200 may identify the first type of picture buffer data according to the flow shown in fig. 12, and specifically includes the following steps:
S1201, acquiring a picture position parameter in the picture buffer data and a region parameter of the first region.
The picture position parameter is used for indicating the position of the corresponding picture in the first page, and the region parameter of the first region is used for indicating the region range of the first region in the first page. In some embodiments, the region parameter of the first region may be determined according to a region parameter of the display region, scroll axis information of the first page, and the like.
S1202, judging whether the picture corresponding to the picture cache data is the first picture or not according to the picture position parameter and the regional parameter of the first region.
If the position indicated by the picture position parameter is located in the region indicated by the region parameter of the first region, the picture corresponding to the picture cache data is located in the first region, and the picture corresponding to the picture cache data is the second picture.
If the position indicated by the picture position parameter is not in the region indicated by the region parameter of the first region, the picture corresponding to the picture cache data is positioned in the non-display region, and the picture corresponding to the picture cache data is the first picture.
In some embodiments, if the picture portion is located within the first region, the picture is also determined to be a second picture.
In some embodiments, a picture is determined to be a first picture if the portion of the picture that is located within the first region is less than a preset region threshold, i.e., the size of the picture that is displayed within the first region is undersized.
S1203, if the picture is the first picture, determining the picture buffer data corresponding to the first picture as the first type picture buffer data.
And if the picture is identified as the first picture, determining picture cache data corresponding to the first picture as first type picture cache data. And if the picture is identified as the second picture, determining picture cache data corresponding to the second picture as second-type picture cache data.
S1003, deleting the first type of picture cache data.
Deleting the first type of picture buffer data to empty the memory space of the display device 200 occupied by the first type of picture buffer data, so as to optimize the use performance of the display device 200.
The display device 200 still stores the cache data except the first type of picture cache data in the cache data of the first application, such as all the cache data corresponding to the first area of the first page, and the cache data corresponding to other content except the first picture in the non-display area of the first page. When the first application is switched to the foreground mode, the display device 200 can quickly generate and display the corresponding page content based on the cache data, so that the user can see the page content of the first area of the first page as soon as possible.
The display device 200 retains address information of the first picture, which is used to download picture data of the first picture, and the address information may be a uniform resource locator (Uniform Resource Locator, URL), or the like. The address information may be obtained from the first type of picture cache data. Thus, when the first application is switched to the foreground mode, the display device 200 can accurately acquire the picture data of the first picture according to the address information of the first picture, so as to be used for displaying the first picture subsequently.
In some embodiments, after deleting the first type of picture buffer data, the display device 200 may further manage the first application according to the flow shown in fig. 13, and the specific steps are as follows:
s1301, a deleted identifier is marked for the first type of picture cache data.
Taking the deleted mark as 0 as an example, marking 0 on the flag bit of the first type picture cache data.
And S1302, stopping the operation of the first application after all the first type picture cache data carry the deleted identifications.
Identifying the identifier carried by the flag bit of each first type of picture cache data, after all first type of picture cache data carry the deleted identifier, indicating that all first type of picture cache data have been deleted, stopping the operation of the first application, so as to avoid the operation of the first application from generating new cache data and avoiding affecting other functions of the display device 200.
Example one
A first page 800 shown in fig. 8 will be described by taking a second page shown in fig. 9 as an example. The cache data of the browser stored by the display device 200 includes cache data of the first application including cache data of the first area 801 of the first page 800 and cache data of the non-display area 802 of the first page. The buffer data of the first area 801 includes buffer data a of the picture a, buffer data B of the picture B, and non-picture buffer data e, and the buffer data of the non-display area 802 includes buffer data C of the picture C, buffer data D of the picture D, and non-picture buffer data f. The display device 200 displays the first page based on the buffer data a, the buffer data b, the non-picture buffer data e, the buffer data c, the buffer data d, and the non-picture buffer data f.
The display apparatus 200 hides the first page and displays the second page after switching the first application to the background mode in response to the first control instruction. After the second page is displayed, the display device 200 starts to perform a process of cleaning up the cache data of the browser, so as to avoid that the cleaning process is performed when the first page is displayed, which affects the display of the first page and the normal use of the user. The display apparatus 200 traverses the buffered data of the first application in a preset order, such as in the buffered order of the data, and identifies the type of each buffered data to identify whether the buffered data is picture buffered data. If the display device 200 recognizes the picture buffering data, the display device 200 further recognizes whether the picture buffering data has been deleted. The display device 200 may identify the identifier carried by the flag bit of the picture cache data, if the identifier is carried, the picture cache data is deleted, and if the identifier is not deleted, the picture cache data is not deleted. The display device 200 may recognize that the buffered data a, the buffered data b, the buffered data c, and the buffered data d are picture buffered data, and the non-picture buffered data e and the non-picture buffered data f are non-picture buffered data. If the flag bits of the cache data a, the cache data b, the cache data c and the cache data d are undeleted identifications 1, the cache data a, the cache data b, the cache data c and the cache data d are undeleted. The display device 200 further recognizes the first-type picture buffer data among the buffer data a, the buffer data b, the buffer data c, and the buffer data d. The display apparatus 200 acquires the region parameter of the first region 801 and determines the position parameter of the image from the buffered data, and the display apparatus 200 determines whether the corresponding picture is the first picture based on the region parameter and the position parameter. Taking the picture C as an example, the display device 200 determines the location parameter of the picture C from the cache data C, and compares the location parameter of the picture C with the area parameter of the first area 801, so that it may be determined that the picture C is not in the first area 801, the picture C is a first picture, and the cache data C is first-class picture cache data. According to the above procedure, the display device 200 can determine that the buffer data d is also the first-type picture buffer data. The display device 200 deletes the buffered data c and the buffered data d to release the memory space occupied by the buffered data c and the buffered data d, thereby optimizing the use performance of the display device 200. The display apparatus 200 also retains address information of the picture C and the picture D, such as url_c and url_d, so that after the first application is switched to the foreground mode again, image data of the picture C (co-cached data C) can be acquired from url_c, and image data of the picture D (co-cached data D) can be acquired from url_d.
When the first page is displayed, the display device 200 performs page typesetting on the page content displayed on the first page, so as to adapt to the current display requirement. The pictures on the first page comprise pictures participating in page typesetting and pictures not participating in page typesetting, such as pictures referenced by the first page. When each time the above-mentioned picture participating in page typesetting is displayed, it is necessary to perform a rearrangement process, and this rearrangement process may take a certain time, and may affect the display of other page contents. When the pictures which do not participate in page typesetting are displayed each time, because the pictures do not need to participate in the typesetting, the time consumption of the typesetting is avoided, and the display of other page contents is not influenced.
In the above embodiment, the first type of picture cache data is deleted, even if the first picture corresponding to the first type of picture cache data is a picture that needs to participate in page typesetting. Because, although the first picture needs to participate in page typesetting, there is a case that the user does not continue browsing the first page to the first picture, that is, the area where the first picture is not actually displayed, that is, page typesetting is not actually performed. If the cache data of the first picture is reserved, the memory space is occupied continuously. In addition, even if the user continues to browse the first page to the first picture, the first picture is required to participate in the page typesetting, and the process of displaying the page content of the area after the page typesetting is waited, the efficiency of opening a new page by the user is similar to, even higher than that of opening a new page by the user, and the experience of the user is not greatly influenced. Instead, deleting the portion of the cached data may have a more positive impact on the usability of the display device 200, as well as the user's experience.
Example 2
Based on embodiment 1, after the display apparatus 200 switches the first application to the background mode, the cache data of the pictures in the first area that do not participate in the page layout is also deleted, so as to further release the memory space of the display apparatus 200.
The display device 200 further deletes the third type of picture buffer data, and stores address information of the third picture, where the third type of picture buffer data is buffer data corresponding to the third picture that does not participate in page typesetting in the first page. Based on the description of the pictures which do not participate in page typesetting, page typesetting is not needed in the process of displaying the third picture, and display of other page contents is not affected. After deleting the third type of picture cache data, if the first application is switched to the foreground mode again, compared with the display process of the third picture which retains the third type of picture cache data, only the process of re-downloading the image data of the third picture is additionally added, and the display of other page contents is not influenced by the process, and the experience of the user is not influenced. Instead, deleting the third type of picture cache data further releases the memory space of the display device 200, so as to bring more positive influence to the usability of the display device 200 and the experience of the user.
Example two
On the basis of example one, the flow display device 200 shown in fig. 14 also identifies the third type of picture cache data from among the picture cache data in the process of cleaning up the cache data of the browser. Wherein the display apparatus 200 identifies parameters related to the page layout from the picture buffer data, and the display apparatus 200 determines whether the corresponding picture is a third picture which does not participate in the page layout according to the parameters related to the page layout. And if the third picture is identified, determining the picture cache data corresponding to the third picture as third-type picture cache data. Deleting the third type of picture cache data, and retaining the address information of the third picture. Taking the example that the first page also comprises a picture E, wherein the picture E is a picture cited by the first page, and the picture E does not participate in page typesetting. When the first application is in the background mode, the display device 200 deletes the buffer data E corresponding to the picture E, and retains the address information url_e of the picture E.
In other embodiments, unlike embodiments 1 and 2, the display device 200 may delete only the cached data of the picture that does not participate in the page layout in the first page, so as to ensure the efficiency of displaying the first page and subsequently browsing the first page when the first application is switched to the foreground mode.
Example 3
Based on embodiment 1, when the user wants to use the first application again, the display device 200 may display the first page according to the flow shown in fig. 15, with the following specific steps:
s1501, responding to a second control instruction input by a user, switching the first application to a foreground mode, and displaying a first area of a first page in a display area.
The second control instruction is used for indicating a foreground mode of starting the first application. Taking the control device 100 as a remote controller, the user may send the second control instruction to the display device 200 through a shortcut key of the remote controller (such as a shortcut key of the first application), a background switching key, and the like.
The display device 200 switches the first application to the foreground mode in response to the second control instruction, resumes the operation of the related flow of the first application, and generates the first page of the first application based on the currently stored cache data of the first application. The first area of the first page is displayed in the display area, namely, the area displayed when the first page is displayed in the background mode.
Since the currently stored cache data of the first application does not include the first-type picture cache data of the first picture, the first picture is not included in the generated first page.
In some embodiments, if the second page is also a page corresponding to the web application, the display device 200 may switch the web application to the background mode in response to the second control instruction, and manage the cache data generated by the web application according to steps S701-S702, which is not described herein.
S1502, downloading the picture data of the first picture according to the address information, and caching the picture data of the first picture to a memory.
After the first page is displayed, a first process and a second process are triggered, wherein the first process is a process that a user browses the first page, and the second process is a process that the first picture is restored.
And downloading the picture data of the first picture according to the address information of the first picture, and caching the picture data of the first picture for subsequent display of the first picture.
The display device 200 may download the picture data of the first picture according to the flow shown in fig. 16, which includes the following specific steps:
s1601, traversing the cache data of the first application according to a preset sequence to identify the picture cache data in the cache data of the first application.
The preset sequence may be a buffering sequence of each buffered data, or may be another designated browsing sequence. As each cached data is browsed, the data type of the cached data is identified. For example, the type of the cache data may be identified according to the name suffix of the folder in which the cache data is located, the type field in the cache data, and the like.
And if the cache data is identified as non-picture cache data, reserving the non-picture cache data. And if the cached data is identified as the picture cached data, further processing the picture cached data.
S1602, if the picture cache data is deleted, obtaining address information of a first picture corresponding to the picture cache data.
A data state of the picture cache data is identified, the data state including deleted and not deleted. The procedure may refer to steps S1101-S1103, which are not described here in detail. And only when the picture cache data is deleted, acquiring the address information corresponding to the picture.
S1603, the picture data of the first picture is downloaded according to the address information.
Taking the first picture as a picture C as an example, obtaining picture data of the picture C according to url_c.
After buffering the picture data of the first picture, the display device 200 marks an undeleted flag for the picture buffering data to indicate that the picture buffering data exists.
After the display device 200 recognizes that all the picture buffer data are carried as the deletion identifier, the process of downloading the picture data is stopped.
In some embodiments, when the display device 200 downloads the picture data of the first picture according to the address information of the first picture, if a second instruction of the user to browse other pages of the first application is received, the other pages are displayed in the display area in response to the second instruction, and the process of displaying the other pages in the display area may refer to steps S601-S602, which are not repeated herein. At this time, the display device 200 does not need to continue displaying the page content of the first page, that is, does not continue displaying the first picture, so that the display device 200 terminates downloading the picture data of the first picture, to avoid that the useless picture data of the first picture occupy the memory space, and the process of downloading the picture data of the first picture occupies the bandwidth resource of the display device 200.
In some embodiments, if the display apparatus 200 receives a first control instruction of the user, the first application is switched to the background mode again in response to the first control instruction, and the downloading of the picture data of the first picture is terminated. The step S701-S702 and the related embodiments 1 and 2 may be referred to for the display device 200 to switch the first application to the background mode, which are not described herein.
S1503, if a first instruction of the user to browse the first page is received, in response to the first instruction, the display content of the first page is updated in the display area according to the picture data of the first picture stored in the memory.
The display device 200 monitors a first instruction of the user to browse the first page, such as refreshing the page, sliding down the page, sliding up the page, sliding left the page, sliding right the page, and so on, in the first process. The display device 200 updates the display content of the first page in response to the first instruction if the first instruction is monitored. Wherein, the corresponding first picture is displayed using the picture data of the first picture cached in S1502.
After the display device 200 switches the first application back to the foreground mode, the page content of the first area of the first complete page can be quickly restored based on the currently stored cache data, so that the user can watch the complete page content, and the experience of the user is ensured. In the above process, the display device 200 downloads the picture data of the deleted first picture in preparation for subsequent display of the first picture, so that the subsequent display of the first picture using the downloaded picture data is facilitated. The display device 200 does not render the first picture directly after buffering the picture data of the first picture, so as to avoid that the process of rendering the first picture encroaches on the image processing resource of the display device 200. After receiving the first instruction of the user to browse the first picture, the display device 200 renders and displays the first picture so as to accurately control the time for rendering the first picture, thereby being convenient for accurately controlling the image processing resource.
The display device 200 may update the display content of the first page according to the flow shown in fig. 17, which includes the following specific steps:
s1701, responding to the first instruction, and acquiring a second area of the first page in the display area.
The display apparatus 200 determines an area corresponding to the display area, i.e., a second area, after the first page adjustment in response to the first instruction.
S1702, obtaining target picture data corresponding to a second area in the picture data of a first picture.
And determining the position parameter of the picture in the first page according to the picture data of the first picture, and determining whether the picture is a target picture positioned in the second region or not based on the region parameter of the second region. After the picture is identified as the target picture, the picture data corresponding to the target picture is determined as target picture data.
S1703, displaying a second area of the first page in the display area.
The second area includes a first picture generated from the target picture data, whereby displaying the first page based on the user's browsing of the first page is completed.
Example three
Based on example one, in connection with the flow shown in fig. 18, as shown in fig. 19, after the display apparatus 200 switches the first application back to the foreground mode, the first page 800 is displayed using the currently stored cached data, at which time the first page 800 does not display picture C and picture D (shown in dashed boxes). The display device 200 downloads the picture data of the picture C as url_c and the picture data of the picture D as url_d. In the process that the display device 200 now views the picture data of the picture C and the picture D, if the display device 200 receives a second instruction of the user to browse other pages of the first application, the other pages are displayed, and the downloading of the picture data of the picture C and the picture D is terminated. If the display apparatus 200 receives the first control instruction of the user, the first application is switched to the background mode again, and the downloading of the picture data of the picture C and the picture D is terminated. After downloading the picture data of the picture C and the picture data of the picture D, the display device 200 marks an undeleted flag for each cached picture data, for example, carrying 0 in the flag bit. If the display apparatus 200 receives a first instruction of the user to browse the first page 800, such as sliding the first page 800, the first page 800 is moved upward to display the second region 803 of the first page 800 within the display region 201. Taking the second area 803 as an area where the picture C is located, for example, the picture C is displayed as shown in fig. 19, and at this time, the picture D still does not need to be rendered.
Example 4
Based on embodiment 1-embodiment 3, the display apparatus 200 also restores the third picture after switching the first application back to the foreground mode.
The process of restoring the third picture by the display apparatus 200 may refer to steps S1401-S1403, in which the display apparatus 200 downloads and buffers picture data of the third picture according to address information of the third picture in response to the second control instruction, and renders and displays the third picture using the picture data of the third picture when the third picture needs to be displayed. Wherein, if the display device 200 receives the second instruction or the first control instruction, the downloading process of the picture data of the third picture is terminated.
In other embodiments, if the display device 200 only deletes the cached data of the picture that does not participate in the page layout in the first page when the first application is switched to the background mode, the display device 200 may display the complete page content when the first application is switched back to the foreground mode, and only needs to download the cached data of the picture that does not participate in the page layout in the first page, so as to render and display the corresponding picture that does not participate in the page layout when the user browses the first page.
If the display device 200 receives an instruction from the user to exit the first application, in response to the instruction, the browser will delete the window of the first application, and other resources including cached data and the like will be released except for some resources written to the disk including small text files (cookies), disk caches (disk caches), and the like.
The foregoing description, for purposes of explanation, has been presented in conjunction with specific embodiments. However, the above discussion in some examples is not intended to be exhaustive or to limit the embodiments to the precise forms disclosed above. Many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the disclosure and to enable others skilled in the art to best utilize the embodiments.

Claims (10)

1. A display device, characterized by comprising:
a display configured to display a first area of a first page of a first application within a display area, the first application being a browser-based running application;
a memory configured to store cached data for the browser, the cached data comprising cached data for the first application;
a controller configured to:
responding to a first control instruction input by a user, switching the first application to a background mode, controlling the display to hide the first page, and displaying a second page;
deleting first type picture cache data in cache data of the first application, and storing address information of a first picture to the memory, wherein the first type picture cache data is cache data corresponding to the first picture, the first picture is a picture which is not in the display area in the first page, and the address information is used for downloading picture data of the first picture.
2. The display device of claim 1, wherein the controller deletes a first type of picture cache data in the cache data of the first application is configured to:
traversing the cache data of the first application according to a preset sequence to identify the picture cache data in the cache data of the first application;
if the picture cache data is not deleted, identifying the first type of picture cache data in the picture cache data;
and deleting the first type of picture cache data.
3. The display device of claim 2, wherein the controller is further configured to:
identifying an identifier carried by the picture cache data;
if the identification is a deleted identification, determining that the picture cache data is deleted;
and if the identification is an undeleted identification, determining that the picture cache data is undeleted.
4. The display device of claim 2, wherein if the picture cache data is not deleted, the controller identifies the first type of picture cache data in the picture cache data and is configured to:
acquiring picture position parameters in the picture cache data and region parameters of the first region;
Judging whether the picture corresponding to the picture cache data is the first picture or not according to the picture position parameter and the regional parameter of the first region;
and if the picture is the first picture, determining the picture cache data corresponding to the first picture as the first type picture cache data.
5. The display device of claim 2, wherein the controller, after deleting the first type of picture cache data, is further configured to:
marking the deleted identification for the first type of picture cache data;
and stopping the operation of the first application after all the first type of picture cache data carry the deleted identifications.
6. The display device of claim 1, wherein the controller, after controlling the display to hide the first page and display a second page, is further configured to:
responding to a second control instruction input by a user, switching the first application to a foreground mode, and controlling the display to display the first area of the first page in the display area, wherein the first page does not comprise the first picture;
Downloading the picture data of the first picture according to the address information, and caching the picture data of the first picture to the memory;
and if a first instruction of browsing the first page by a user is received, controlling the display to update the display content of the first page in the display area according to the picture data of the first picture stored in the memory in response to the first instruction.
7. The display device according to claim 6, wherein the controller downloads the picture data of the first picture in accordance with the address information, and is configured to:
traversing the cache data of the first application according to a preset sequence to identify the picture cache data in the cache data of the first application;
if the picture cache data is deleted, acquiring address information of the first picture corresponding to the picture cache data;
and downloading the picture data of the first picture according to the address information.
8. The display device according to claim 6, wherein if the controller receives a first instruction from a user to browse the first page, in response to the first instruction, the controller controls the display to update display content of the first page in the display area according to picture data of the first picture stored in the memory, and is configured to:
Responding to the first instruction, and acquiring a second area of the first page in the display area;
acquiring target picture data corresponding to the second region in the picture data of the first picture;
controlling the display to display the second area of the first page in the display area, wherein the second area comprises the first picture generated according to the target picture data.
9. The display device of claim 6, wherein the controller is further configured to:
when the picture data of the first picture is downloaded according to the address information, if a second instruction of browsing other pages of the first application by a user is received, responding to the second instruction, controlling the display to display the other pages in the display area, and terminating downloading of the picture data of the first picture; and if the first control instruction of the user is received, responding to the first control instruction, and ending downloading the picture data of the first picture.
10. A method for managing cached data of a browser, which is applied to the display device according to any one of claims 1 to 9, wherein the display device displays a first area of a first page of a first application in a display area, the first application being an application running based on the browser, and stores cached data of the browser, the cached data including cached data of the first application;
The method comprises the following steps:
responding to a first control instruction input by a user, switching the first application to a background mode, hiding the first page, and displaying a second page;
deleting first type picture cache data in cache data of the first application, and storing address information of a first picture, wherein the first type picture cache data are cache data corresponding to the first picture, the first picture is a picture which is not in the display area in the first page, and the address information is used for downloading picture data of the first picture.
CN202310155251.6A 2023-02-22 2023-02-22 Display device and browser cache data management method Pending CN117812361A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310155251.6A CN117812361A (en) 2023-02-22 2023-02-22 Display device and browser cache data management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310155251.6A CN117812361A (en) 2023-02-22 2023-02-22 Display device and browser cache data management method

Publications (1)

Publication Number Publication Date
CN117812361A true CN117812361A (en) 2024-04-02

Family

ID=90425509

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310155251.6A Pending CN117812361A (en) 2023-02-22 2023-02-22 Display device and browser cache data management method

Country Status (1)

Country Link
CN (1) CN117812361A (en)

Similar Documents

Publication Publication Date Title
WO2022156368A1 (en) Recommended information display method and apparatus
JP2006526229A (en) Wait screen resource control and operation apparatus and method for mobile communication terminal apparatus
CN111597000B (en) Small window management method and terminal
WO2022033104A1 (en) Page display method and display device
CN114003324A (en) Method for combining multiple applications and simultaneously starting multiple applications and electronic equipment
EP3319312A1 (en) Image display apparatus and operation method therefor
US11200294B2 (en) Page updating method and display device
CN114510170B (en) Component display method and display device
CN111246299A (en) Communication terminal and application management method
CN112601042B (en) Display device, server and method for video call to be compatible with different protocol signaling
CN112486921B (en) File synchronization method, display device and mobile terminal
CN112269668A (en) Application resource sharing and display equipment
CN117812361A (en) Display device and browser cache data management method
CN116347166A (en) Display device and window display method
CN112363683B (en) Method and display device for supporting multi-layer display by webpage application
JP2009244977A (en) Information processing apparatus
CN111935530B (en) Display equipment
CN112312058B (en) Interaction method and device and electronic equipment
JP2009140509A (en) Mobile communication terminal device, and method for controlling and operating resource of waiting image using mobile communication terminal device
CN111782606A (en) Display device, server, and file management method
CN113971049A (en) Background service management method and display device
CN111966646B (en) File caching method and display device
CN112199612B (en) Bookmark adding and combining method and display equipment
CN114785778B (en) Gateway device and content distribution method
CN114173176B (en) Server, display equipment and media asset filtering method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination