Graph preloading display method, electronic equipment, readable medium and program product
By collecting user interaction data in the Linux system and using an adaptive prediction algorithm to generate a list of preloaded resources, and combining this with context information to asynchronously load graphics resources, the problem of resource loading delay and rendering performance bottleneck in graphics display technology is solved, realizing intelligent graphics preloading and improving system performance and user experience.
Patent Information
- Application Number
- CN202411625990.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-07
AI Technical Summary
Existing graphics display technologies in Linux systems suffer from resource loading delays and rendering performance bottlenecks, leading to interface stuttering or lag. Furthermore, they lack intelligent and dynamic adjustment capabilities, failing to meet the needs of graphics-intensive applications.
By collecting user interaction data, an adaptive prediction algorithm is used to generate prediction results, a list of preloaded resources is generated, and graphics resources are loaded asynchronously in combination with context information. This optimizes resource library management and caching strategies, thereby achieving intelligent graphics preloading.
It reduces resource loading latency, improves graphics display performance and user experience, ensures the system remains smooth and stable in complex scenarios, and improves resource utilization and management intelligence.
Smart Images

Figure CN119576543A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of computer graphics processing and display optimization, and in particular to a graphics preloading display method, an electronic device, a computer-readable medium, and a computer program product. Background Art
[0002] The Linux operating system is widely used in servers and embedded systems due to its open source, stability and flexibility. However, with the growing demand for graphics-intensive applications (such as video editing, 3D rendering, etc.), the requirements for graphics display performance are also increasing. Existing graphics display technologies often face problems such as resource loading delays and rendering performance bottlenecks, resulting in interface freezes or delays.
[0003] In order to solve these problems and improve the graphics display effect of Linux systems, graphics display is usually optimized. For example, existing graphics preloading technologies can reduce loading delays to a certain extent, but these methods lack intelligence and automation and cannot be dynamically adjusted according to actual application scenarios and user behaviors. Therefore, a more efficient and intelligent graphics display method is needed that can adapt to different application scenarios, improve resource loading speed and rendering performance, and thus meet the growing demand for graphics display. Summary of the invention
[0004] Embodiments of the present disclosure provide a graphics preloading display method, an electronic device, a computer-readable medium, and a computer program product.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for preloading and displaying graphics, including: collecting user interaction behaviors in a user interface and generating user behavior data; predicting graphics resources that a user may need through an adaptive prediction algorithm based on historical data and the user behavior data, and generating prediction results; generating a preloading resource list according to the prediction results; selecting corresponding graphics resources from a resource library according to the preloading resource list; determining whether to generate and send a preloading instruction in combination with context information related to a resource preloading decision and the prediction results; and asynchronously loading the graphics resources when a preloading instruction is received.
[0006] In some embodiments, collecting the user's interaction behavior in the user interface and generating user behavior data includes: tracking the user's interaction behavior; recording the user's interaction behavior in a user interaction log; analyzing the user interaction log to extract the interface elements and high-frequency functional modules that the user frequently interacts with; and generating user behavior data based on the analysis results.
[0007] In some embodiments, based on the historical data and the user behavior data, an adaptive prediction algorithm is used to predict the graphic resources that a user may need and generate a prediction result, including: selecting a model for time series prediction and classification; cleaning and feature extraction of the user behavior data to obtain features related to resource prediction; training, verifying and testing the model based on the features to generate an adaptive prediction algorithm that meets the prediction accuracy; based on the historical data and the user behavior data, the generated adaptive prediction algorithm is used to predict the graphic resources that a user may need and generate a prediction result.
[0008] In some embodiments, the model is trained, verified and tested based on the features to generate an adaptive prediction algorithm that meets the prediction accuracy, including: dividing the features into a training set, a verification set and a test set; using the training set to train the model to obtain an initial prediction model; using the verification set to evaluate the initial prediction model, and adjusting hyperparameters based on the evaluation results; using the test set to verify the actual prediction ability of the adjusted prediction model to generate the adaptive prediction algorithm that meets the prediction accuracy.
[0009] In some embodiments, the model is trained, verified and tested based on the features to generate an adaptive prediction algorithm that meets the prediction accuracy, further including: using the generated adaptive prediction algorithm to generate prediction results; comparing the prediction results with actual user behavior; collecting feedback data for future training and re-optimization to continuously optimize the adaptive prediction algorithm.
[0010] In some embodiments, generating a preloaded resource list according to the prediction result includes: generating a preloaded resource list according to the prediction result; marking graphic resources that need to be loaded immediately and graphic resources that are not used immediately in the preloaded resource list.
[0011] In some embodiments, selecting corresponding graphic resources from a resource library according to the preloaded resource list includes: establishing the resource library according to user needs; and selecting corresponding graphic resources from the resource library according to the preloaded resource list.
[0012] In some embodiments, establishing the resource library includes: scanning a resource directory to identify all available resources; extracting metadata for each resource; identifying resource types based on file extensions; determining usage patterns and frequencies of each resource by analyzing user behavior data and application logs; setting classification rules for the resources based on the usage patterns and frequencies of the resources; marking and classifying the resources according to the set classification rules and with reference to the resource types and the metadata; and storing the classified resources and their metadata and resource types in a database to establish the resource library.
[0013] In some embodiments, the context information related to the resource preloading decision and the prediction result are combined to determine whether to generate and send a preloading instruction, including: collecting context information related to the resource preloading decision through the user interaction log and system performance indicators; combining the context information and the prediction result to determine whether the preloading condition is met; when the preloading condition is met, generating and sending a preloading instruction to trigger the preloading operation.
[0014] In some embodiments, after selecting corresponding graphic resources from a resource library according to the preloaded resource list, the method further includes: optimizing the graphic resources.
[0015] In some embodiments, the optimization processing of the graphic resources includes: compressing, converting the format or adjusting the resolution of the graphic resources.
[0016] In some embodiments, when a preloading instruction is received, the graphic resources are loaded asynchronously, including: when the preloading instruction is received, creating an asynchronous loading task for each graphic resource; setting the maximum concurrency of the asynchronous loading task; executing the asynchronous loading tasks simultaneously according to the set concurrency to asynchronously load the graphic resources; for graphic resources marked as not immediately used in the preloading resource list, using a lazy initialization strategy to delay loading.
[0017] In some embodiments, after receiving the preloading instruction, asynchronously loading the graphic resource includes: after loading is completed, selecting a cache management strategy according to the access frequency and usage of the loaded resource; and implementing cache management according to the selected cache management strategy. In some embodiments, the graphic preloading display method also includes: feeding back the loaded graphic resource to the user interface.
[0018] In a second aspect, an embodiment of the present disclosure provides an electronic device, comprising: one or more processors; a memory on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the graphics preloading display method described in the first aspect of the embodiment of the present disclosure.
[0019] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the graphics preloading and display method described in the first aspect of the embodiment of the present disclosure is implemented.
[0020] In a fourth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the graphics preloading and display method described in the first aspect of the embodiment of the present disclosure.
[0021] The present disclosure relates to graphics resource loading, caching and display optimization in a Linux system environment. By reducing the loading and occupation of irrelevant resources, the system maintains efficient operation in complex scenarios and can dynamically adjust resource management strategies based on user behavior and real-time status. Through continuously optimized prediction algorithms and cache management, the intelligent level of resource management is further improved, ensuring that the system maintains smooth and stable performance in high-load or complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flow chart of a method for preloading and displaying graphics according to an embodiment of the present disclosure;
[0023] Figure 2 is an architecture diagram of a graphics display system based on graphics preloading according to an embodiment of the present disclosure;
[0024] Figure 3 is a flowchart of the operation steps of the intelligent prediction module according to an embodiment of the present disclosure;
[0025] Figure 4 is a schematic diagram of the composition of an electronic device according to an embodiment of the present disclosure;
[0026] Figure 5 is a block diagram of a graphics preloading display system according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the technical solution of the present disclosure is described in detail below with reference to the accompanying drawings.
[0028] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0029] In the absence of conflict, the various embodiments of the present disclosure and the various features therein may be combined with each other.
[0030] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0031] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.
[0032] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0033] In this disclosure, unless otherwise specified, the following technical terms should be understood as follows:
[0034] Graphic resources are used to display various data in graphical interfaces, such as pictures, textures, models, fonts, UI components, etc.
[0035] Graphic preloading: Before users access resources, the system loads the graphics resources that may be needed in advance to reduce loading delays during user operations and avoid freezes during interface switching and operations.
[0036] Context Information is dynamic information used to support system decision-making, describing the current system environment and user status, such as device performance, network conditions, time, geographic location, and user behavior patterns.
[0037] Asynchronous loading, loading resources in a non-blocking manner, allows the system to process other tasks in parallel while loading resources without affecting user operations.
[0038] Multi-threaded loading uses multiple threads in parallel to perform resource loading tasks, improving loading speed and system responsiveness.
[0039] Resource Caching stores loaded resources in a cache area so that they do not need to be reloaded for future use, thereby improving loading speed.
[0040] Cache management strategy is used to decide which resources to keep in the cache and which resources to clear, based on information such as access history and frequency of use. Common strategies include LRU (least recently used).
[0041] GPU (Graphics Processing Unit) is a processor dedicated to accelerating graphics rendering and computationally intensive tasks, and is commonly used for 2D and 3D graphics rendering.
[0042] Resource classification: divide resources into different categories according to their type, size, usage frequency or scenario to optimize loading order and system performance.
[0043] User behavior logs record operation information during the interaction between users and the system, such as clicks, scrolling, and input.
[0044] LRU (Least Recently Used) is a cache management strategy that clears the least recently used resources to make room for new resources when the cache space is insufficient.
[0045] Graphics rendering is the process of converting graphic resources (such as 2D images or 3D models) into images displayed on the screen, usually accelerated by the GPU to improve rendering efficiency.
[0046] The graphic preloading display method disclosed in the present invention aims to solve the following problems:
[0047] Reduce memory or bandwidth waste caused by unreasonable preloading strategies and improve resource utilization efficiency;
[0048] Optimize the graphics resource loading process to avoid blocking the main thread, thereby reducing rendering delays;
[0049] Provide a smoother user experience and avoid interface flickering or short blankness caused by inappropriate loading timing;
[0050] Improve the prediction accuracy of the preloading algorithm to make the loaded resources more in line with user needs;
[0051] Enables preloading policies to be dynamically adjusted based on system performance, user behavior, and network conditions to achieve intelligent resource management.
[0052] The present invention discloses a Linux system graphics display method based on graphics preloading, which preloads resources that users may need through intelligent prediction algorithms and optimization strategies, and reasonably manages system cache and rendering resources. This method reduces loading delays when switching between applications and interfaces, avoids system freezes, and improves display efficiency and performance.
[0053] Although this method is optimized for Linux systems, its technical solution is highly versatile and can be expanded according to different system characteristics. The core idea of this solution can be applied in other operating systems to provide support for improving the graphics display performance of multiple platforms.
[0054] Figure 1 It is a flowchart of a method for preloading and displaying graphics according to an embodiment of the present disclosure.
[0055] First, refer to Figure 1 , the present disclosure provides a method for preloading and displaying graphics, comprising:
[0056] S11. Collecting user interaction behaviors in the user interface and generating user behavior data;
[0057] S12, based on the historical data and the user behavior data, predicting the graphic resources that the user may need through an adaptive prediction algorithm, and generating a prediction result;
[0058] S13, generating a preloaded resource list according to the prediction result;
[0059] S14, selecting corresponding graphic resources from a resource library according to the preloaded resource list;
[0060] S15, combining the context information related to the resource preloading decision and the prediction result, determining whether to generate and send a preloading instruction;
[0061] S16: When a preloading instruction is received, asynchronously load the graphic resource.
[0062] In some embodiments, collecting user interaction behavior in a user interface and generating user behavior data includes:
[0063] Track user interactions;
[0064] Record the user's interaction behavior in the user interaction log;
[0065] Analyze the user interaction logs to extract the interface elements and functional modules that users frequently interact with;
[0066] User behavior data is generated based on the analysis results.
[0067] In the disclosed embodiments, front-end monitoring tools such as Mixpanel, Google Analytics, Heap Analytics, etc. can be used to track and collect user interaction behaviors and record them in user interaction logs. The user interaction log may include: time (recording the time when the interaction behavior occurs); interaction type (for example: click, such as the user clicks a button, link, etc.; scroll, such as page scrolling, sliding list, etc.; input, such as entering text in a search box or form); monitoring elements, that is, specific interface elements involved in the user's interaction process (such as buttons, links, input boxes, drop-down menus, etc.); context information, such as the current page, functional module or device type. By analyzing the user interaction log, the areas and functions that users operate most frequently on the interface can be extracted. These data are used to identify users' operating habits and behavior patterns, generate user behavior data, and serve as input to the adaptive prediction algorithm to predict users' future operating needs.
[0068] The data in the user interaction log is used to help the system understand the user's historical behavior and formulate resource preloading and optimization strategies accordingly. Through further analysis of the log data, information related to the user's frequently used areas and functions can be identified and optimized and preloaded in future interactions.
[0069] In some embodiments, based on the historical data and the user behavior data, the graphic resources that the user may need are predicted by an adaptive prediction algorithm to generate a prediction result, including:
[0070] Select models for time series forecasting and classification;
[0071] Cleaning and feature extracting the user behavior data to obtain features related to resource prediction;
[0072] Training, validating and testing the model based on the features to generate an adaptive prediction algorithm that meets the prediction accuracy;
[0073] Based on the historical data and the user behavior data, the graphic resources that may be required by the user are predicted through the generated adaptive prediction algorithm to generate a prediction result.
[0074] In some embodiments, the model is trained, verified, and tested based on the features to generate an adaptive prediction algorithm that satisfies the prediction accuracy, including:
[0075] Dividing the features into a training set, a validation set, and a test set;
[0076] Using the training set to train the model to obtain an initial prediction model;
[0077] Using the validation set to evaluate the initial prediction model, and adjusting hyperparameters according to the evaluation results;
[0078] The test set is used to verify the actual prediction ability of the adjusted prediction model to generate the adaptive prediction algorithm that meets the prediction accuracy.
[0079] In some embodiments, the model is trained, verified and tested based on the features to generate an adaptive prediction algorithm that satisfies the prediction accuracy, further comprising:
[0080] generating prediction results using the generated adaptive prediction algorithm;
[0081] comparing the predicted results with actual user behavior;
[0082] Feedback data is collected for future training and re-optimization to continuously optimize the adaptive prediction algorithm.
[0083] In the disclosed embodiment, the user behavior data is first cleaned to remove special values and erroneous values, and then feature extraction is performed to identify features related to prediction (e.g., file type, file size, user preference, etc.). Subsequently, the extracted features are divided into a training set, a validation set, and a test set using a random partitioning method: the training set is used to train the model and adjust the model parameters; the validation set is used to evaluate the model performance and adjust the hyperparameters to prevent overfitting; the test set is used to finally verify the predictive ability of the model. A model for time series prediction and classification (e.g., recurrent neural network RNN, logistic regression, random forest, etc.) is selected, the model is trained using the training set, the user behavior data in the training set is input into the model, and the model parameters are adjusted to capture the user behavior pattern. The performance of the model is evaluated using the validation set, and the hyperparameters are adjusted based on the validation results to improve the generalization ability of the model. The prediction ability of the adjusted model on new data is verified using the test set to ensure its accuracy. Finally, the prediction results of the model are compared with the actual user behavior, feedback data is collected, and these feedback data are used in subsequent training to continuously optimize the model, thereby achieving high-precision intelligent prediction.
[0084] In some embodiments, generating a preloaded resource list according to the prediction result includes:
[0085] Generate a preloaded resource list according to the prediction result;
[0086] Graphics resources that need to be loaded immediately and graphics resources that are not used immediately are marked in the preloaded resource list.
[0087] In some embodiments, selecting corresponding graphic resources from a resource library according to the preloaded resource list includes:
[0088] According to the needs of users, establish the resource library;
[0089] According to the preloaded resource list, a corresponding graphic resource is selected from the resource library.
[0090] In some embodiments, establishing the resource library includes:
[0091] Scan the resource directory to identify all available resources;
[0092] Extract metadata for each resource;
[0093] Identify resource types based on file extensions;
[0094] Determine usage patterns and frequency of each resource by analyzing user behavior data and application logs;
[0095] Setting classification rules for the resources based on usage patterns and frequencies of the resources;
[0096] Tagging and classifying the resources according to the set classification rules and with reference to the resource type and metadata;
[0097] The classified resources and their metadata and resource types are stored in a database to establish the resource library.
[0098] In some embodiments, establishing the resource library further comprises:
[0099] According to the changes in user behavior data, the classification and labeling of the resources are updated to keep the resource library dynamically updated.
[0100] In the disclosed embodiment, according to the needs of the user, the resource directory of the entire Linux system or the resource directory of a specific application is scanned to find all available resource files, including images, audio, video, etc. Basic attributes, i.e., metadata, are extracted from each resource file. Metadata provides detailed information about the file, such as file size, creation time, access frequency, file path, etc., to help users and systems identify and understand the file. The resource type (such as image, audio, video) is identified based on the file extension to determine how the file is processed and used. For example, an image file may need to generate a thumbnail, while an audio file may need to be loaded in the background.
[0101] In the embodiments of the present disclosure, the resource usage mode describes the usage of the resource in a specific scenario. Examples of resource usage modes include: scenario-specific resources, which are resources used only in a specific scenario (such as a specific theme image of an application interface); time-sensitive resources, which are resources used only at a specific time (such as a daily news cover image).
[0102] In the disclosed embodiments, the classification rules are standards or logics based on the usage patterns and usage frequencies of resources, and are used to classify resources into different categories to support resource management of the system. Examples of classification rules include: high-frequency usage resources, such as resources that are accessed more than 10 times; scenario-specific resources, resources that are only loaded at a specific time or in a functional module; low-frequency usage resources, such as resources that are accessed less than 5 times. Classification rules can be flexibly adjusted according to actual needs, and users can customize rules without being limited to a specific number of accesses.
[0103] In the disclosed embodiment, a script or algorithm is used to automatically classify resources according to classification rules, and each resource is labeled (such as high-frequency used resources, scene-specific resources, etc.). Subsequently, the classified resources, their metadata, and resource types are stored in a database for fast query and management, thereby optimizing the loading order.
[0104] The system will dynamically update resource classifications based on changes in user behavior data, and adjust data in the resource library in real time to ensure that resource management and loading meet user needs and usage patterns, and maintain dynamic maintenance of the resource library.
[0105] In some embodiments, combining the context information related to the resource preloading decision and the prediction result, determining whether to generate and send a preloading instruction includes:
[0106] Collecting context information related to resource preloading decisions through the user interaction logs and system performance indicators;
[0107] Determining whether a preloading condition is met by combining the context information and the prediction result;
[0108] When the preloading condition is met, a preloading instruction is generated and sent to trigger a preloading operation.
[0109] In the embodiments of the present disclosure, context information that has a significant impact on resource preloading decisions refers to real-time data related to resource preloading decisions, including the user's current operations and system status. Context information covers user behavior patterns (such as frequently visited pages or functions), time information, geographic location, device performance, etc. Context information is collected in real time through data sources such as user interaction logs and system performance indicators, and combined with the prediction results of the adaptive prediction algorithm to generate a list of preloaded resources and trigger the preloading operation.
[0110] In some embodiments, after selecting a corresponding graphic resource from a resource library according to the preloaded resource list, the method further includes:
[0111] The graphic resources are optimized.
[0112] In some embodiments, the graphics resources are optimized, including:
[0113] The graphic resource is compressed, format converted or resolution adjusted.
[0114] In the disclosed embodiment, the resource loader optimizes the preloaded resources before performing asynchronous loading. Specifically, it includes: compressing the preloaded resources to reduce the resource file size, memory and bandwidth usage; converting the resource format according to the device and application requirements (for example, converting the image format to an efficient format supported by the device) to improve loading and rendering efficiency; adjusting the resolution of the resources to ensure that the resources can be displayed with appropriate clarity on different devices while avoiding unnecessary memory consumption. Through the above resource optimization processing, the resource loader can effectively reduce the memory usage and loading pressure of the resources before preloading, and improve the loading efficiency and the overall performance of the system.
[0115] In some embodiments, when a preloading instruction is received, asynchronously loading the graphics resource includes:
[0116] Upon receiving a preload instruction, an asynchronous loading task is created for each graphics resource;
[0117] Set the maximum number of concurrent asynchronous loading tasks;
[0118] According to the set concurrency number, the asynchronous loading tasks are executed simultaneously to asynchronously load the graphic resources;
[0119] For graphic resources marked as not immediately used in the preloaded resource list, a lazy initialization strategy is used to delay loading.
[0120] In the disclosed embodiment, graphic preloading is set to asynchronous loading to avoid blocking the main thread, and an asynchronous loading mechanism that supports concurrent processing (such as multi-threading, asynchronous I / O operations, Ajax technology, or dynamic import) is used to perform resource loading; for asynchronous loading tasks, the loading queue is managed and the number of concurrent loads is controlled to ensure efficient use of system resources.
[0121] In the disclosed embodiment, for resources that are not used immediately, a lazy initialization strategy is adopted to delay their loading and initialization, and the final loading and initialization of the resources are completed only when they are actually used, so as to optimize system resource management and response speed.
[0122] In some embodiments, after asynchronously loading the graphics resource upon receiving the preloading instruction, the method further includes:
[0123] After loading is complete, a cache management strategy is selected based on the access frequency and usage of the loaded resources;
[0124] Implement cache management based on the selected cache management strategy.
[0125] In the disclosed embodiment, the resource loader optimizes the cache utilization of loaded resources through dynamic cache management strategies. Dynamic cache management may adopt the following strategies: cache replacement strategies, such as the Least Recently Used (LRU) strategy, which is used to preferentially remove the least recently used resources to free up cache space; cache size adjustment strategies, which dynamically adjust the cache allocation size according to the resource access frequency and timestamp, allocate larger cache space for frequently accessed resources, and reduce cache occupancy for low-frequency or recently unused resources. Among the above strategies, one or more strategies may be adopted according to actual needs to optimize the system's cache utilization and improve the performance of graphics resource loading. Cache management is performed after resource loading is completed to dynamically manage and adjust the occupancy of loaded resources in the cache.
[0126] In some embodiments, the graphic preloading and display method further includes: feeding back the loaded graphic resources to the user interface.
[0127] Figure 2 The system receives input from the user interface and coordinates the preloading manager through application logic to achieve more efficient graphics loading and display.
[0128] The graphic display system is mainly composed of a user interface, application logic, a preloading manager, a resource library, an intelligent prediction module and a resource loader.
[0129] like Figure 2 As shown, the user interface, the user performs interactive operations (such as clicking, scrolling, etc.);
[0130] Apply logic to analyze user interactions and determine the triggering of the preload manager based on the analysis results;
[0131] The preloading manager, including the resource library, the intelligent prediction module and the resource loader, is used to manage the preloading of graphic resources. It selects appropriate resources from the resource library based on the prediction results generated by the intelligent prediction module and issues loading instructions to the resource loader;
[0132] Resource library, which is built by identifying and classifying graphic resources, optimizes the stored graphic resources, and supports optimizing the order of resource loading based on attributes such as resource size and usage frequency, thereby reducing loading time and improving loading efficiency;
[0133] The intelligent prediction module predicts the graphic resources that users may need based on user historical data and user behavior analysis, and provides support for preloading decisions. For detailed process, please refer to Figure 3 ;
[0134] The resource loader is responsible for asynchronously loading the required graphics resources, while dynamically managing GPU / CPU rendering resources and system cache to ensure efficient response and rendering, thereby significantly improving the performance of graphics display and user experience. The responsibilities of the resource loader include asynchronous loading of resources and dynamic management of GPU / CPU rendering resources.
[0135] After loading, the resource loader uses cache management strategies (such as LRU) to dynamically adjust the cache size and prioritize the least recently used resources to ensure effective use of the system cache. This dynamic adjustment strategy is based on resource access frequency and timestamps to optimize cache space and improve resource preloading efficiency.
[0136] After the preloaded resources are loaded into the system, the rendering results are fed back to the user interface, thereby improving graphics display performance and user experience.
[0137] In summary, Figure 2 The complete process from user interface input to application logic triggering to the collaborative work of preloading manager and resource loader is demonstrated. Through resource optimization, intelligent prediction and dynamic cache management strategies, this system realizes efficient graphics preloading and display under Linux system.
[0138] Through these intelligent preloading and resource management strategies, the present disclosure significantly improves the graphics display performance of the Linux system, reduces loading delays, improves resource utilization, and enhances the user's operating experience.
[0139] Figure 3 It is a flowchart of the operation steps of the intelligent prediction module according to the embodiment of the present disclosure. It details the entire prediction process from the collection of user behavior data to the generation of the preload resource list, and is the specific operation steps for implementing the adaptive prediction algorithm in the preload management system.
[0140] like Figure 3 As shown, first, the user's interactive behaviors in the user interface are monitored and collected in real time, such as clicks, slides, page switching, etc., to collect user behavior data;
[0141] Next, the user behavior data is fed into an adaptive prediction algorithm for further analysis;
[0142] Adaptive prediction algorithms analyze user behavior patterns and identify frequently visited interface areas or commonly used functions, which can more accurately predict the user's next action;
[0143] By learning from the user's historical access records, the algorithm can identify the user's preferences and habits, analyze the user's frequently used resources and access frequency, thereby improving the accuracy of predictions;
[0144] Based on the analysis of user behavior patterns and historical access data, the algorithm generates predictions of the user's possible next actions, which include identification information of potentially needed resources;
[0145] Then, based on the prediction results, the system matches the user's resource requirements and generates a corresponding preloaded resource list;
[0146] The generated preload resource list contains the graphical resources that the user may need, which are used by the preload manager to quickly load and display them when the user needs them.
[0147] Figure 3 It clearly demonstrates how the adaptive prediction algorithm generates a preloaded resource list based on user behavior data and historical access data as the basis for subsequent resource loading.
[0148] The graphics display method disclosed in this disclosure is designed and optimized for Linux systems, but its core ideas and technical principles (such as adaptive prediction algorithms, graphics resource preloading, asynchronous loading, dynamic cache management, etc.) have broad versatility. In theory, the method disclosed in this disclosure can be extended and applied to other operating systems, such as Windows, macOS, Android, etc. By adapting to the system characteristics of different platforms, this method can optimize graphics display performance in a variety of environments and provide efficient solutions for different scenarios.
[0149] Figure 4 It is a schematic diagram of the composition of an electronic device according to an embodiment of the present disclosure.
[0150] Second, refer to Figure 4 , an embodiment of the present disclosure provides an electronic device, comprising:
[0151] One or more processors 401;
[0152] A memory 402, on which one or more programs are stored. When the one or more programs are executed by one or more processors, the one or more processors implement the graphics preloading display method described in the first aspect of the embodiment of the present disclosure;
[0153] One or more I / O interfaces 403 are connected between the processor and the memory and are configured to implement information exchange between the processor and the memory.
[0154] Among them, the processor 401 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 402 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 403 is connected between the processor 401 and the memory 402, and can realize information interaction between the processor 401 and the memory 402, including but not limited to a data bus (Bus), etc.
[0155] In some embodiments, the processor 401 , the memory 402 , and the I / O interface 403 are connected to each other via a bus 404 , and further connected to other components of the computing device.
[0156] In a third aspect, an embodiment of the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the graphics preloading and display method described in the first aspect of the embodiment of the present disclosure is implemented.
[0157] In a fourth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the graphics preloading and display method described in the first aspect of the embodiment of the present disclosure.
[0158] Figure 5 is a block diagram of a graphics preloading display system according to an embodiment of the present disclosure.
[0159] Fifth, refer to Figure 5 , the embodiment of the present disclosure provides a graphics preloading display system, including:
[0160] A data generation module 501 is configured to collect user interaction behaviors in the user interface and generate user behavior data;
[0161] Prediction module 502, configured to predict the graphic resources that the user may need through an adaptive prediction algorithm based on the historical data and the user behavior data and generate a prediction result;
[0162] A list generating module 503 is configured to generate a preloaded resource list according to the prediction result;
[0163] A resource selection module 504, configured to select corresponding graphic resources from a resource library according to the preloaded resource list;
[0164] A preloading triggering module 505 is configured to determine whether to generate and send a preloading instruction in combination with the context information related to the resource preloading decision and the prediction result;
[0165] The asynchronous loading module 506 is configured to asynchronously load the graphic resource upon receiving a preloading instruction.
[0166] In some embodiments, the data generation module 501 includes:
[0167] Tracking module, which tracks user interaction behavior;
[0168] The recording module records the user's interaction behavior in the user interaction log;
[0169] An analysis module is used to analyze the user interaction logs and extract the interface elements and function modules that users frequently interact with.
[0170] A behavior data generation module generates user behavior data based on the analysis results.
[0171] In some embodiments, the prediction module 502 includes:
[0172] Model selection module, which selects models for time series prediction and classification;
[0173] A data processing module cleans and extracts features from the user behavior data to obtain features related to resource prediction;
[0174] An algorithm generation module is used to train, verify and test the model based on the features to generate an adaptive prediction algorithm that meets the prediction accuracy;
[0175] The prediction result generation module predicts the graphic resources that the user may need based on the historical data and the user behavior data through the generated adaptive prediction algorithm, and generates a prediction result.
[0176] In some embodiments, the algorithm generation module includes:
[0177] A feature division module divides the features into a training set, a validation set and a test set;
[0178] A model training module, using the training set to train the model to obtain an initial prediction model;
[0179] A model validation module, which uses the validation set to evaluate the initial prediction model and adjusts hyperparameters according to the evaluation results;
[0180] The model testing module uses the test set to verify the actual prediction ability of the adjusted prediction model to generate the adaptive prediction algorithm that meets the prediction accuracy.
[0181] In some embodiments, the algorithm generation module further comprises:
[0182] A result generation module generates prediction results using the generated adaptive prediction algorithm;
[0183] A comparison module, comparing the prediction result with the actual user behavior;
[0184] The optimization module collects feedback data for future training and re-optimization to continuously optimize the adaptive prediction algorithm.
[0185] In some embodiments, the list generation module 503 further includes:
[0186] The marking module marks the graphic resources that need to be loaded immediately and the graphic resources that are not used immediately in the preloaded resource list.
[0187] In some embodiments, the resource selection module 504 includes:
[0188] A resource library establishment module, establishing the resource library according to user needs;
[0189] The selection module selects corresponding graphic resources from the resource library according to the preloaded resource list.
[0190] In some embodiments, the resource library establishment module includes:
[0191] Scan module, scans the resource directory and identifies all available resources;
[0192] Metadata extraction module, extracts metadata of each resource;
[0193] Identification module, identifies resource type based on file extension;
[0194] The determination module determines the usage pattern and frequency of each resource by analyzing user behavior data and application logs;
[0195] A classification rule setting module, which sets the classification rules of the resources based on the usage mode and frequency of the resources;
[0196] A classification module, which marks and classifies the resources according to the set classification rules and with reference to the resource type and metadata;
[0197] The storage module stores the classified resources and their metadata and resource types in a database to establish the resource library.
[0198] In some embodiments, the resource library establishment module further includes:
[0199] The updating module updates the classification and labeling of the resources according to the changes of the user behavior data to keep the resource library dynamically updated.
[0200] In some embodiments, the preload trigger module 505 includes:
[0201] A context information collection module, which collects context information related to resource preloading decisions through the user interaction logs and system performance indicators;
[0202] A condition judgment module, combining the context information and the prediction result to judge whether the preloading condition is met;
[0203] The instruction generation module generates and sends a preloading instruction to trigger a preloading operation when the preloading condition is met.
[0204] In some embodiments, the graphics preloading display system further comprises:
[0205] The resource optimization module optimizes the graphic resources after selecting the corresponding graphic resources.
[0206] In some embodiments, the asynchronous loading module 506 includes:
[0207] The task creation module, upon receiving the preloading instruction, creates an asynchronous loading task for each graphic resource;
[0208] A quantity setting module is used to set the maximum number of concurrent asynchronous loading tasks;
[0209] A task execution module executes the asynchronous loading tasks simultaneously according to the set concurrency number to asynchronously load the graphic resources;
[0210] The lazy loading module uses a lazy initialization strategy to delay loading for graphic resources marked as not immediately used in the preloaded resource list.
[0211] In some embodiments, the graphics preloading display system further comprises:
[0212] Graphics feedback module, which feeds back the loaded graphics resources to the user interface.
[0213] In order to enable those skilled in the art to more clearly understand the technical solution provided by the embodiment of the present disclosure, the remote control provided by the embodiment of the present disclosure is described in detail below through specific embodiments:
[0214] Embodiment 1
[0215] Specific scenarios are used to demonstrate the actual effects of graphics preloading technology in different applications, such as Linux desktop environment, game performance optimization, and graphics design software. These scenarios illustrate how preloading technology can reduce waiting time, improve performance and work efficiency in different fields.
[0216] 1) Desktop environment enhancement: In the Linux desktop environment, by preloading the graphics resources of the user's commonly used applications, the waiting time when starting and switching applications is reduced, and the smoothness of operation is improved.
[0217] 2) Game performance optimization: For games on the Linux platform, preloading technology can load textures, models and other resources in the game levels in advance, reduce the waiting time of the loading screen, and provide a smoother gaming experience.
[0218] 3) Graphic design software acceleration: In graphic design or video editing software, preload fonts, filters, images and other resources that users may use to shorten loading time, speed up the design process, and improve overall work efficiency.
[0219] The core of the present disclosure is to develop an adaptive prediction algorithm, which is based on user behavior, system status and historical data, and can accurately predict the graphic resources that may need to be loaded in the future, thereby improving the efficiency and accuracy of preloading; using context information and intelligent prediction results as trigger conditions for graphic preloading, the preloading process is dynamically started to ensure that resources are loaded in a timely and reasonable manner, thereby improving system performance and user experience.
[0220] The graphics preloading and display method disclosed in the present invention solves the performance problems caused by resource loading delays in Linux systems and other platforms. It significantly reduces the waiting time for starting and switching applications through intelligent prediction and preloading technology, improves system response speed and overall user experience, and optimizes resource utilization through dynamic cache management to avoid performance bottlenecks.
[0221] The graphic preloading display method disclosed in the present invention can bring the following beneficial effects:
[0222] 1) By preloading key graphics resources, the loading delay during application startup and runtime is significantly reduced, improving the system's responsiveness.
[0223] 2) When using the Linux system, users can enjoy smoother and more seamless graphical interface interaction, improving the overall user experience.
[0224] 3) The adaptive preloading algorithm can dynamically adjust the resource loading strategy according to user usage patterns and system status, improve resource utilization efficiency, and avoid unnecessary resource waste.
[0225] 4) Through asynchronous loading and caching strategies, the burden on CPU and memory is effectively reduced, ensuring that the system can continue to run smoothly under high load.
[0226] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0227] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly noted, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, those skilled in the art will appreciate that various changes in form and detail may be made without departing from the scope of the present disclosure as set forth in the appended claims.
Claims
1. A graphic preloading display method, comprising: Collect user interaction behaviors in the user interface and generate user behavior data; Based on the historical data and the user behavior data, predict the graphic resources that the user may need through an adaptive prediction algorithm, and generate a prediction result; Generate a preloaded resource list according to the prediction result; According to the preloaded resource list, select corresponding graphic resources from the resource library; Determine whether to generate and send a preloading instruction based on the context information related to the resource preloading decision and the prediction result; When the preloading instruction is received, the graphic resource is asynchronously loaded.
2. The method for preloading and displaying graphics according to claim 1, wherein: Collect user interaction behaviors in the user interface and generate user behavior data, including: Track user interactions; Record the user's interaction behavior in the user interaction log; Analyze the user interaction logs to extract the interface elements and function modules that users frequently interact with; User behavior data is generated based on the analysis results.
3. The method for preloading and displaying graphics according to claim 2, wherein: Based on the historical data and the user behavior data, the graphic resources that the user may need are predicted by an adaptive prediction algorithm, and a prediction result is generated, including: Select models for time series forecasting and classification; Cleaning and feature extracting the user behavior data to obtain features related to resource prediction; Training, validating and testing the model based on the features to generate an adaptive prediction algorithm that meets the prediction accuracy; Based on the historical data and the user behavior data, the graphic resources that may be required by the user are predicted through the generated adaptive prediction algorithm to generate a prediction result.
4. The method for preloading and displaying graphics according to claim 3, wherein: Generate a preloaded resource list according to the prediction result, including: Generate a preloaded resource list according to the prediction result; Graphics resources that need to be loaded immediately and graphics resources that are not used immediately are marked in the preloaded resource list.
5. The graphic preloading display method according to any one of claims 2 to 4, wherein: According to the preloaded resource list, selecting corresponding graphic resources from the resource library includes: According to the needs of users, establish the resource library; According to the preloaded resource list, a corresponding graphic resource is selected from the resource library.
6. The method for preloading and displaying graphics according to claim 5, wherein: Establishing the resource library includes: Scan the resource directory to identify all available resources; Extract metadata for each resource; Identify resource types based on file extensions; Determine usage patterns and frequency of each resource by analyzing user behavior data and application logs; Setting classification rules for the resources based on usage patterns and frequencies of the resources; Marking and classifying the resource according to the set classification rules and with reference to the resource type and the metadata; The classified resources and their metadata and resource types are stored in a database to establish the resource library.
7. The method for preloading and displaying graphics according to claim 6, wherein: Determining whether to generate and send a preloading instruction in combination with the context information related to the resource preloading decision and the prediction result includes: Collecting context information related to resource preloading decisions through the user interaction logs and system performance indicators; Determining whether a preloading condition is met by combining the context information and the prediction result; When the preloading condition is met, a preloading instruction is generated and sent to trigger a preloading operation.
8. The method for preloading and displaying graphics according to claim 7, wherein: After selecting corresponding graphic resources from the resource library according to the preloaded resource list, the method further includes: The graphic resources are optimized.
9. The graphic preloading display method according to any one of claims 6 to 8, wherein: When the preloading instruction is received, asynchronously loading the graphic resource further includes: Upon receiving a preload instruction, an asynchronous loading task is created for each graphics resource; Set the maximum number of concurrent asynchronous loading tasks; According to the set concurrency number, the asynchronous loading tasks are executed simultaneously to asynchronously load the graphic resources; For graphic resources marked as not immediately used in the preloaded resource list, a lazy initialization strategy is used to delay loading.
10. The graphic preloading display method according to claim 9, wherein: When the preloading instruction is received, after asynchronously loading the graphic resource, the method further includes: After loading is complete, a cache management strategy is selected based on the access frequency and usage of the loaded resources; Implement cache management based on the selected cache management strategy.
11. An electronic device, comprising: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the graphics preloading display method according to any one of claims 1 to 10.
12. A computer-readable medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the graphics preloading and display method according to any one of claims 1 to 10.
13. A computer program product, comprising a computer program or an instruction, wherein when the computer program or the instruction is executed by a processor, the method for preloading and displaying graphics according to any one of claims 1 to 10 is implemented.
