Display resource loading method and loading device and electronic equipment
Through the operating system, the screen resolution is dynamically adjusted according to the load of the electronic device and the network status, which solves the problem of interface lag when the electronic device loads display resources, and improves the interface fluency and user experience of the application.
Patent Information
- Application Number
- CN202311101823.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2024-08-23
AI Technical Summary
When existing electronic devices load display resources, due to the limitation of screen resolution, the application interface is prone to slow loading and freezing, which affects the user experience.
The operating system dynamically adjusts the screen resolution fed back to the application. According to the load status and network status of the electronic device, it adjusts the resolution higher or lower, allowing the application to load matching display resources, thereby improving interface fluency and user experience.
By dynamically adjusting the screen resolution, we can alleviate or avoid slow loading and lag, improve the loading speed of display resources and interface display content, and improve user experience.
Smart Images

Figure CN118535235A
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronics, and more specifically to a method and device for loading display resources, and an electronic device. Background Art
[0002] At present, in electronic devices such as vehicle-mounted terminals and mobile terminals, during the display process of the application interface of the application, the display resources loaded by the application are loaded according to the screen resolution of the current electronic device. The application will load display resources that match the screen resolution based on the screen resolution. The higher the screen resolution, the larger the amount of data of the matching display resources; and the lower the screen resolution, the smaller the amount of data of the matching display resources. In the existing display method, the application interface of the application is prone to slow loading and freezing, which reduces the user experience. Summary of the invention
[0003] The present application is proposed to solve at least one of the above problems. According to the first aspect of the present application, a method for loading display resources is provided, the loading method is applied to an electronic device with a screen, the electronic device is provided with an operating system, and an application is run on the operating system, the loading method comprises: before loading display resources, the application obtains the screen resolution from the operating system; the operating system dynamically adjusts the screen resolution fed back to the application; the application loads display resources matching the screen resolution according to the screen resolution fed back by the operating system.
[0004] In one embodiment of the present application, the operating system dynamically adjusts the screen resolution fed back to the application, including: the operating system dynamically adjusts the screen resolution fed back to the application according to the current load state of the electronic device.
[0005] In one embodiment of the present application, the operating system dynamically adjusts the screen resolution fed back to the application according to the load state of the electronic device, including: when the current load state of the electronic device is greater, the screen resolution fed back to the application by the operating system is lower; when the current load state of the electronic device is smaller, the screen resolution fed back to the application by the operating system is higher.
[0006] In one embodiment of the present application, the display resources to be loaded by the application at least partially include network resources; the operating system dynamically adjusts the screen resolution fed back to the application, including: the operating system dynamically adjusts the screen resolution fed back to the application according to the current network status of the electronic device.
[0007] In one embodiment of the present application, the operating system dynamically adjusts the screen resolution fed back to the application according to the current network status of the electronic device, including: when the current network status of the electronic device is better, the screen resolution fed back to the application by the operating system is higher; when the current load status of the electronic device is worse, the screen resolution fed back to the application by the operating system is lower.
[0008] In one embodiment of the present application, the display resources to be loaded by the application at least partially include network resources; the operating system dynamically adjusts the screen resolution fed back to the application, including: the operating system dynamically adjusts the screen resolution fed back to the application according to the current load status and network status of the electronic device.
[0009] In one embodiment of the present application, the operating system dynamically adjusts the screen resolution fed back to the application according to the current load state and network state of the electronic device, including: when the current load state of the electronic device is smaller and the network state is better, the screen resolution fed back to the application by the operating system is higher; when the current load state of the electronic device is larger and the network state is worse, the screen resolution fed back to the application by the operating system is lower.
[0010] In one embodiment of the present application, the display resource is a list display resource or a thumbnail display resource.
[0011] In one embodiment of the present application, the operating system is an Android operating system.
[0012] According to the second aspect of the present application, a device for loading display resources is also provided, and the loading device is applied to an electronic device with a screen, and an operating system is provided on the electronic device, and an application program is running on the operating system. The loading device includes: a storage medium and a processor, wherein a computer program run by the processor is stored on the storage medium, and when the computer program is run by the processor, the processor executes any one of the above-mentioned methods for loading display resources.
[0013] According to a third aspect of the present application, an electronic device is also provided, comprising: a screen, an operating system, an application running on the operating system, and a device for loading any one of the above display resources.
[0014] In one embodiment of the present application, the electronic device is a mobile terminal or a vehicle-mounted terminal.
[0015] According to the display resource loading method, loading device, and electronic device provided by the embodiment of the present application, before loading the display resource, the application obtains the screen resolution from the operating system, and the operating system can dynamically adjust the screen resolution fed back to the application, so that the application loads the display resource matching the screen resolution according to the screen resolution fed back by the operating system. When applying, the operating system can dynamically increase or decrease the screen resolution fed back to the application according to the information related to the working status of the current electronic device. When the application interface of the application is prone to slow loading and jamming, the screen resolution fed back to the application can be lowered, so that the application obtains smaller display resources, so that the display resource loading speed is faster, and the application interface is relieved or avoided from slow loading and jamming; when the application interface of the application is not prone to slow loading and jamming, the screen resolution fed back to the application is increased, so that the application obtains larger display resources, so that the application interface can display more display resources on the screen, and the screen resources are fully utilized. By dynamically adjusting the screen resolution parameters fed back to the application on the operating system side, it is possible to enable the application to load display resources of different screen resolutions on a screen with a fixed resolution, thereby improving the fluency of the application interface of the application and the interface display content, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 A flowchart of a method for loading display resources according to an embodiment of the present invention;
[0018] Figure 2 A flowchart of a method for loading display resources according to another embodiment of the present invention;
[0019] Figure 3 A flowchart of a method for loading display resources according to another embodiment of the present invention;
[0020] Figure 4 A flowchart of a method for loading display resources according to another embodiment of the present invention;
[0021] Figure 5 A flowchart of a method for loading display resources according to another embodiment of the present invention;
[0022] Figure 6A comparison diagram of application interface display at low resolution and high resolution for list display resources according to another embodiment of the present invention;
[0023] Figure 7 The present invention is a schematic block diagram of the structure of a device for loading display resources according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical scheme and advantages of the present invention more obvious, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described in the present invention, all other embodiments obtained by those skilled in the art without creative work should fall within the protection scope of the present invention.
[0025] In the following description, a large number of specific details are provided to provide a more thorough understanding of the present invention. However, it is apparent to those skilled in the art that the present invention can be implemented without one or more of these details. In other examples, in order to avoid confusion with the present invention, some technical features well known in the art are not described.
[0026] It should be understood that the present invention can be implemented in different forms and should not be interpreted as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to make the disclosure thorough and complete and to fully convey the scope of the present invention to those skilled in the art.
[0027] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present invention. When used herein, the singular forms "one", "an" and "said / the" are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "consisting of" and / or "comprising", when used in this specification, confirm the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.
[0028] In order to fully understand the present invention, a detailed structure will be proposed in the following description to illustrate the technical solution proposed by the present invention. The optional embodiments of the present invention are described in detail as follows, but in addition to these detailed descriptions, the present invention may also have other implementations.
[0029] Some embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0030] First, it is necessary to introduce the application scenario of the display resource loading method in the present application. The display resource loading method is applied to an electronic device with a screen, an operating system is provided on the electronic device, and an application is running on the operating system. The display resource loading method is applied to the process of the application loading display resources that need to be displayed on the screen.
[0031] refer to Figure 1 , an embodiment of the present application provides a method for loading a display resource, the loading method comprising:
[0032] Step 1: Before loading display resources, the application obtains the screen resolution from the operating system;
[0033] Step 2: The operating system dynamically adjusts the screen resolution fed back to the application;
[0034] Step 3: The application loads display resources that match the screen resolution based on the screen resolution fed back by the operating system.
[0035] In the above scheme, before loading display resources, the application obtains the screen resolution from the operating system, and the operating system can dynamically adjust the screen resolution fed back to the application, so that the application can load display resources matching the screen resolution according to the screen resolution fed back by the operating system. When applied, the operating system can dynamically increase or decrease the screen resolution fed back to the application according to the information related to the working status of the current electronic device. When the application interface of the application is prone to slow loading and jamming, the screen resolution fed back to the application can be lowered, so that the application obtains smaller display resources, so that the display resource loading speed is faster, and the application interface is relieved or avoided from slow loading and jamming; when the application interface of the application is not prone to slow loading and jamming, the screen resolution fed back to the application is increased, so that the application obtains larger display resources, so that the application interface can display more display resources on the screen, and fully utilize the screen resources. By dynamically adjusting the screen resolution parameters fed back to the application on the operating system side, it is possible to enable the application to load display resources of different screen resolutions on a screen with a fixed resolution, thereby improving the fluency of the application interface of the application and the interface display content, and improving the user experience. The above steps are described in detail below in conjunction with the accompanying drawings.
[0036] refer to Figure 1Before loading display resources, the application obtains the screen resolution from the operating system. The scenario of loading display resources can be the first loading of display resources, or it can be refreshing, i.e. reloading, the loaded display resources. Before each application loads display resources, it is necessary to obtain the screen resolution from the operating system. The screen resolution is not the maximum screen resolution that the screen of the electronic device can actually support, but the screen resolution fed back by the operating system to the application. The application can be any type of application (APP) on the electronic device. For example, the application can be, for example, but not limited to, shopping applications, picture applications, etc.
[0037] refer to Figure 1 , the operating system dynamically adjusts the screen resolution fed back to the application. That is, each time the operating system feeds back the screen resolution to the application, it can feed back the same screen resolution as the previous one, or it can be different from the previous one. The operating system can dynamically adjust the screen resolution fed back to the application each time. Specifically, sometimes the operating system can feed back a higher screen resolution to the application, and sometimes the operating system can feed back a lower screen resolution to the application.
[0038] The operating system can use a variety of methods to dynamically adjust the screen resolution fed back to the application program. Several implementation methods are described below as examples.
[0039] Example 1
[0040] For example, when the operating system dynamically adjusts the screen resolution fed back to the application, refer to Figure 2 , the operating system can dynamically adjust the screen resolution fed back to the application according to the current load state of the electronic device. The higher the current load state of the electronic device, the higher the occupancy rate of the processor and memory of the current electronic device, and the slower the rate at which the electronic device processes new tasks. The lower the current load state of the electronic device, the lower the occupancy rate of the processor and memory of the current electronic device, and the faster the rate at which the electronic device processes new tasks. That is, the current load state of the electronic device is associated with the loading rate of the application interface of the application. Therefore, the operating system can dynamically adjust the screen resolution fed back to the application according to the current load state of the electronic device, so as to feed back a more reasonable screen resolution to the application each time. Prevent the display interface from loading slowly and freezing due to the high load state of the electronic device, and also prevent the situation where the processing resources and display resources of the electronic device cannot be fully utilized, and make full use of the processing resources and display resources of the electronic device.
[0041] It should be noted that no matter the display resources to be loaded by the application come from local resources of the electronic device or from network resources, since the display resources need to be loaded onto the electronic device in the process of displaying the display resources on the screen of the electronic device, the above-mentioned dynamic adjustment method can be applied to the case where the display resources come from local resources of the electronic device, the case where the display resources come from network resources, and the case where the display resources come partly from local resources and partly from network resources.
[0042] Exemplarily, when the operating system dynamically adjusts the screen resolution fed back to the application according to the load state of the electronic device, the following preset rules can be adopted: the greater the current load state of the electronic device, the lower the screen resolution fed back to the application by the operating system; the smaller the current load state of the electronic device, the higher the screen resolution fed back to the application by the operating system.
[0043] The greater the current load state of the electronic device, the lower the screen resolution that the operating system feeds back to the application. As a result, when the application loads display resources that match the screen resolution based on the screen resolution fed back by the operating system, the loaded display resources match the resources with the lower screen resolution. Therefore, the data volume of the display resources is smaller and the loading rate can be faster, thereby minimizing the phenomenon of slow loading and jamming of the display interface caused by the current large load state of the electronic device, making the display interface display more smoothly and improving the user experience.
[0044] The smaller the current load state of the electronic device, the higher the screen resolution that the operating system feeds back to the application. As a result, when the application loads display resources that match the screen resolution based on the screen resolution fed back by the operating system, the loaded display resources match resources with a higher screen resolution. Therefore, the display resource has a larger data volume, allowing the application to obtain larger display resources, so that the application interface can display more display resources on the screen and make full use of the screen resources.
[0045] Example 2
[0046] For example, when the display resources to be loaded by the application program at least partially include network resources, that is, the display resources to be loaded by the application program are all or partially from the network server, the current network status of the electronic device will also affect the loading rate of the display resources. Therefore, when the operating system dynamically adjusts the screen resolution fed back to the application program, it refers to Figure 3, the operating system can dynamically adjust the screen resolution fed back to the application according to the current network status of the electronic device. The worse the current network status of the electronic device, the lower the current data transmission rate between the electronic device and the network server, the slower the rate at which the electronic device receives data from the network server, and correspondingly, the slower the loading rate of the application interface of the application loading the display resources from the network server. The better the current network status of the electronic device, the higher the current data transmission rate between the electronic device and the network server, the faster the rate at which the electronic device receives data from the network server, and correspondingly, the faster the loading rate of the application interface of the application loading the display resources from the network server. That is, the current network status of the electronic device is associated with the loading rate of the application interface of the application. Therefore, the operating system can dynamically adjust the screen resolution fed back to the application according to the current network status of the electronic device, so as to feed back a more reasonable screen resolution to the application each time. Prevent the phenomenon of slow loading and jamming of the display interface due to the poor network status of the electronic device, and also prevent the situation where the processing resources and display resources of the electronic device cannot be fully utilized, and fully utilize the processing resources and display resources of the electronic device.
[0047] Exemplarily, when the operating system dynamically adjusts the screen resolution fed back to the application based on the current network status of the electronic device, the following preset rules can be adopted: when the current network status of the electronic device is better, the screen resolution fed back to the application by the operating system is higher; when the current load status of the electronic device is worse, the screen resolution fed back to the application by the operating system is lower.
[0048] The worse the current network status of the electronic device is, the lower the screen resolution fed back by the operating system to the application program is. Therefore, when the application program loads display resources that match the screen resolution according to the screen resolution fed back by the operating system, the loaded display resources match the resources with a lower screen resolution. Therefore, the data volume of the display resource is smaller, and the display resource can be obtained from the network server faster, so that the loading rate can be faster, thereby minimizing the slow loading and jamming of the display interface caused by the poor current network status of the electronic device, making the display interface display more smoothly and improving the user experience.
[0049] The better the current network status of the electronic device, the higher the screen resolution fed back by the operating system to the application program. Therefore, when the application program loads display resources that match the screen resolution according to the screen resolution fed back by the operating system, the loaded display resources match the resources with a higher screen resolution. Therefore, the data volume of the display resource is relatively large. Since the current network status of the electronic device is relatively good, when the data volume of the display resource is relatively large, the delay in obtaining the display resource from the network server will not be significantly increased, and the display interface will not load slowly or freeze due to the poor current network status of the electronic device. At the same time, the application program can obtain larger display resources, so that the application interface can display more display resources on the screen, making full use of the screen resources.
[0050] Example 3
[0051] For example, when the display resources to be loaded by the application program at least partially include network resources, that is, the display resources to be loaded by the application program are all or partially from the network server, the current network status of the electronic device will also affect the loading rate of the display resources. Therefore, when the operating system dynamically adjusts the screen resolution fed back to the application program, it refers to Figure 4 , the operating system can dynamically adjust the screen resolution fed back to the application according to the current load status and network status of the electronic device.
[0052] The higher the current load status of the electronic device, the higher the occupancy rate of the processor and memory of the current electronic device, and the slower the rate at which the electronic device processes new tasks; the worse the current network status of the electronic device, the lower the data transmission rate between the current electronic device and the network server, and the slower the rate at which the electronic device receives data from the network server. Correspondingly, the application interface of the application loads the display resources from the network server more slowly.
[0053] The lower the current load state of the electronic device, the lower the occupancy rate of the processor and memory of the current electronic device, and the faster the rate at which the electronic device processes new tasks; the better the current network state of the electronic device, the higher the data transmission rate between the current electronic device and the network server, and the faster the rate at which the electronic device receives data from the network server. Correspondingly, the application interface of the application program loads the display resources from the network server at a faster rate. That is, the current network state and load state of the electronic device are associated with the loading rate of the application interface of the application program. Therefore, the operating system can dynamically adjust the screen resolution fed back to the application program according to the current network state and load state of the electronic device, so as to feed back a more reasonable screen resolution to the application program each time. Prevent the display interface from loading slowly or freezing due to the poor network state or high load state of the electronic device, and also prevent the situation where the processing resources and display resources of the electronic device cannot be fully utilized, and fully utilize the processing resources and display resources of the electronic device.
[0054] Exemplarily, when the operating system dynamically adjusts the screen resolution fed back to the application based on the current load state and network state of the electronic device, the following preset rules can be adopted: when the current load state of the electronic device is smaller and the network state is better, the screen resolution fed back to the application by the operating system is higher; when the current load state of the electronic device is larger and the network state is worse, the screen resolution fed back to the application by the operating system is lower.
[0055] The worse the current network status of the electronic device is and the higher the load status is, the lower the screen resolution fed back by the operating system to the application program is. As a result, when the application program loads display resources that match the screen resolution according to the screen resolution fed back by the operating system, the loaded display resources match the resources with a lower screen resolution. Therefore, the data volume of the display resource is smaller, and the display resource can be obtained from the network server more quickly, so that the loading rate can be faster, thereby minimizing the slow loading and jamming of the display interface caused by the poor current network status of the electronic device, making the display interface display more smoothly and improving the user experience.
[0056] The better the current network status of the electronic device and the lower the load status, the higher the screen resolution fed back by the operating system to the application program. Therefore, when the application program loads display resources that match the screen resolution according to the screen resolution fed back by the operating system, the loaded display resources match the resources with higher screen resolution. Therefore, the data volume of the display resource is relatively large. Since the current network status of the electronic device is relatively good and the load status is relatively low, when the data volume of the display resource is relatively large, the delay in obtaining the display resource from the network server will not be significantly increased. The display interface will not load slowly or freeze due to the poor current network status of the electronic device, nor will the display interface load slowly or freeze due to the high current load status of the electronic device. At the same time, the application program can obtain larger display resources, so that the application interface can display more display resources on the screen and make full use of the screen resources.
[0057] It should be noted that when the operating system dynamically adjusts the screen resolution fed back to the application, in addition to the several methods shown above, other methods can also be used to dynamically adjust the screen resolution fed back to the application each time. That is, the solution of feeding back a different screen resolution to the application each time is within the protection scope of the embodiments of the present application.
[0058] Exemplarily, the operating system may be an Android operating system, and of course, may be other types of operating systems. The operating system may be an embedded operating system.
[0059] Exemplarily, the electronic device may be a mobile terminal, specifically, the mobile terminal may be, for example, but not limited to, a smart phone, a tablet computer, a smart wearable device, a laptop computer, etc. Of course, the electronic device may also be other terminal devices such as, but not limited to, a vehicle-mounted terminal, etc.
[0060] Exemplarily, the display resource may be a list display resource, and specifically, the list display resource may be a long list display resource. Figure 6 Resources displayed in the list format shown. At low resolution, the screen of the electronic device can display fewer rows of data. When the current working state of the electronic device is not good, a low-resolution display method can be used, which can increase the loading speed of the list display resources and alleviate or avoid the slow loading and jamming of the application interface. At high resolution, the screen of the electronic device can display more rows of data. When the current working state of the electronic device is good, a high-resolution display method can be used, which can increase the number of rows of data loaded each time, so that the application interface can display more display resources on the screen, reduce the number of times the user turns pages, and make full use of screen resources. Through the above method, the effect of display adjustment is improved.
[0061] For list display resources, user scenarios can be identified based on the network status and / or load status of the electronic device. When the network status is poor and / or the load status is high, a lower screen resolution is fed back to the application from the operating system side, so that the application matches the display resources corresponding to the low screen resolution, thereby improving the loading speed of the display page of the list display resources.
[0062] For resources displayed in a list, users need to keep sliding or turning pages in other ways to select and see the content they like. Generally, a screen with a larger screen resolution can display more content. The operating system of this solution can dynamically modify the screen resolution for different application interfaces and return a higher resolution to the application, so that more content can be displayed in the same state. This will reduce the user's frequent page turning, allowing the user to find the required content faster and improve the user experience.
[0063] Of course, the display resource can also be other types of display resources. For example, the display resource can also be a thumbnail display resource. When the application loads and displays the thumbnail display resource on the application interface, it needs to display a large number of thumbnails. When the current working state of the electronic device is not good, a low-resolution display method can be used to increase the loading speed of the list display resource, alleviate or avoid the slow loading and jamming of the application interface. If there are too many picture resources loaded in the current application interface, loading thumbnails with low screen resolution will greatly improve the interface loading speed and the smoothness of the interface display. At high resolution, the screen of the electronic device can display a large number of thumbnails. When the current working state of the electronic device is good, a high-resolution display method can be used to increase the number of thumbnails loaded each time, so that the application interface can display more display resources on the screen, reduce the number of times the user turns pages, and make full use of the screen resources. Through the above method, the effect of display adjustment is improved.
[0064] When an application loads display resources that match the screen resolution based on the screen resolution fed back by the operating system, the application will configure relevant resource files in the corresponding local resource files based on the screen resolution fed back by the operating system, such as mipmap-hdpi, mipmap-mdpi, and mipmap-xhdpi; or the application will load display resources such as but not limited to pictures or texts through a network server based on the screen resolution.
[0065] In the Android operating system, before the application interface is loaded, the screen resolution will be obtained from the operating system. According to the DisplayMetrics (Android attribute object encapsulating various attribute values of the display area) instance, widthPixel and heightPixels are recorded here. After the application obtains the screen resolution from the operating system, it creates Resources (the resource object corresponding to the application, including all resources under res) according to the obtained screen resolution. Resources will record the display resource files that need to be loaded. When the application interface is displayed, according to the obtained screen resolution, the corresponding resource folder is selected to load the display resources that match the screen resolution.
[0066] When an application loads display resources with high screen resolution, it will take up more memory time. In scenarios with poor network conditions or when the electronic device is under high load, the application interface may not load, load slowly, or even freeze. In addition, the application side cannot adjust the content displayed in the application interface window by adjusting the screen resolution. Figure 5 , an application method of an embodiment of the present application is introduced by way of example.
[0067] First, when the application is started, or the application interface is loaded or refreshed (reloaded), the operating system monitors the current network status and load status of the electronic device in real time. If the network status is poor, network access is blocked; or the load status is high, the application interface may not load for a long time, or the interface may freeze. At this time, when the application loads a list to display resources, it is necessary to adjust the screen resolution returned to the application on the operating system side. The general process is as follows: Figure 5 When the application obtains the screen resolution fed back by the operating system, the operating system will feed back a low screen resolution to the application. In this way, when the application loads resources through Resources, it will give priority to searching for display resource paths with low screen resolutions. In this way, when there are too many items displayed on a single page, such as loading batch thumbnails, the smaller the display resource size, the faster it will load. Of course, the above-mentioned display resources can be different types of display resources, such as drawable, layout, animation, etc. Whether it is a local resource or a network resource, a certain type of display resource can be adjusted by judging the display resource type. The network monitoring module will monitor the network status in real time. Every time the application interface of the application is refreshed, it will be adjusted again to improve the fluency of the application interface of the application.
[0068] When the current network status of the electronic device is good, or the current load of the electronic device is not high, the screen resolution of the display can be increased for the application interface of a specific application, and the corresponding aspect ratio can be changed, so that more display items can be loaded on a single page, or layout, drawable and other display resources of the desired size can be loaded, so that users can find the content they are interested in faster and more accurately, and the display effect of a specific page can be optimized. On the other hand, when there is a lot of content to load, the frequent loading times caused by paging display can be reduced, improving the user experience.
[0069] In the various embodiments shown above, before loading display resources, the application obtains the screen resolution from the operating system, and the operating system can dynamically adjust the screen resolution fed back to the application, so that the application loads display resources matching the screen resolution according to the screen resolution fed back by the operating system. When applied, the operating system can dynamically increase or decrease the screen resolution fed back to the application according to the information related to the working status of the current electronic device. When the application interface of the application is prone to slow loading and jamming, the screen resolution fed back to the application can be lowered so that the application obtains smaller display resources, so that the display resources are loaded faster, and the application interface is relieved or avoided from slow loading and jamming; when the application interface of the application is not prone to slow loading and jamming, the screen resolution fed back to the application is increased so that the application obtains larger display resources, so that the application interface can display more display resources on the screen, and the screen resources are fully utilized. By dynamically adjusting the screen resolution parameters fed back to the application on the operating system side, it is possible to enable the application to load display resources of different screen resolutions on a screen with a fixed resolution, thereby improving the fluency of the application interface of the application and the interface display content, and improving the user experience. Moreover, the solution shown in the embodiment of the present application is to make differentiated adaptation and adjustment of the screen resolution from the operating system, which is based on the native resource loading mechanism of the Android system, independent of the application terminal and the server, and can select the loaded resources and adjust the display layout, and can process different pages and different resources. Therefore, different application interfaces of the same application can be customized to load the interface content expected by the user. And it is also possible to specify the loading method of a certain type of display resource separately, so as to optimize the loading speed and fluency of the application interface, and also adjust the content displayed on the application interface.
[0070] In addition, an embodiment of the present application also provides a display resource loading device, which includes: a storage medium and a processor, the storage medium stores a computer program run by the processor, and when the computer program is run by the processor, the processor executes any one of the above-mentioned display resource loading methods.
[0071] Figure 7 FIG. 1 is a schematic block diagram of a display resource loading device 100 according to an embodiment of the present application. Figure 7 As shown, the display resource loading device 100 according to the embodiment of the present application may include a storage medium 110 and a processor 120. The storage medium 110 stores a computer program executed by the processor 120. When the computer program is executed by the processor 120, the processor 120 executes the display resource loading method according to the embodiment of the present application described above. Those skilled in the art can understand the specific operation of the display resource loading device 100 deployment device according to the embodiment of the present application in combination with the above content, and for the sake of brevity, it will not be repeated here.
[0072] The storage medium may include, for example, a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. The computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0073] Furthermore, an embodiment of the present application further provides an electronic device, the electronic device comprising: a screen, an operating system, an application program running on the operating system, and a device for loading any of the above display resources. The electronic device may be a mobile terminal, specifically, the mobile terminal may be, for example, but not limited to, a smart phone, a tablet computer, a smart wearable device, a laptop computer, etc. Of course, the electronic device may also be other terminal devices, for example, but not limited to, a vehicle-mounted terminal, etc.
[0074] The present invention has been described by the above embodiments, but it should be understood that the above embodiments are only for the purpose of example and description, and are not intended to limit the present invention to the scope of the described embodiments. In addition, it can be understood by those skilled in the art that the present invention is not limited to the above embodiments, and more variations and modifications can be made according to the teachings of the present invention, and these variations and modifications all fall within the scope of the protection claimed by the present invention. The protection scope of the present invention is defined by the attached claims and their equivalents.
Claims
1. A method for loading display resources, applied to an electronic device with a screen, wherein the electronic device is provided with an operating system, and an application program is run on the operating system, characterized in that: The loading method comprises: The application obtains the screen resolution from the operating system before loading the display resource; The operating system dynamically adjusts the screen resolution fed back to the application program; The application program loads display resources matching the screen resolution according to the screen resolution fed back by the operating system.
2. The loading method according to claim 1, characterized in that: The operating system dynamically adjusts the screen resolution fed back to the application program, including: The operating system dynamically adjusts the screen resolution fed back to the application according to the current load status of the electronic device.
3. The loading method according to claim 2, characterized in that: The operating system dynamically adjusts the screen resolution fed back to the application according to the load state of the electronic device, including: The greater the current load state of the electronic device, the lower the screen resolution fed back by the operating system to the application program; The smaller the current load state of the electronic device is, the higher the screen resolution fed back by the operating system to the application program is.
4. The loading method according to claim 1, characterized in that: The display resources to be loaded by the application program at least partially include network resources; The operating system dynamically adjusts the screen resolution fed back to the application, including: the operating system dynamically adjusts the screen resolution fed back to the application according to the current network status of the electronic device.
5. The loading method according to claim 4, characterized in that: The operating system dynamically adjusts the screen resolution fed back to the application according to the current network status of the electronic device, including: When the current network status of the electronic device is better, the screen resolution fed back by the operating system to the application program is higher; The worse the current load state of the electronic device is, the lower the screen resolution fed back by the operating system to the application program is.
6. The loading method according to claim 1, characterized in that: The display resources to be loaded by the application program at least partially include network resources; The operating system dynamically adjusts the screen resolution fed back to the application, including: the operating system dynamically adjusts the screen resolution fed back to the application according to the current load status and network status of the electronic device.
7. The loading method according to claim 6, characterized in that: The operating system dynamically adjusts the screen resolution fed back to the application according to the current load state and network state of the electronic device, including: When the current load state of the electronic device is smaller and the network state is better, the screen resolution fed back by the operating system to the application program is higher; The greater the current load state of the electronic device and the worse the network state, the lower the screen resolution fed back by the operating system to the application.
8. The loading method according to claim 1, characterized in that: The display resource is a list display resource or a thumbnail display resource.
9. The loading method according to claim 1, characterized in that: The operating system is the Android operating system.
10. A display resource loading device, applied to an electronic device with a screen, wherein the electronic device is provided with an operating system, and an application program is run on the operating system, characterized in that: The loading device comprises: A storage medium and a processor, wherein the storage medium stores a computer program to be executed by the processor, and when the computer program is executed by the processor, the processor executes the method for loading display resources according to any one of claims 1 to 9.
11. An electronic device, characterized in that: include: Screen; operating system; an application program running on the operating system; The display resource loading device as claimed in claim 10.
12. The loading method according to claim 11, characterized in that: The electronic device is a mobile terminal or a vehicle-mounted terminal.
