Page drawing method and device, equipment and storage medium
By obtaining index area storage data and determining resource reading feature data to generate target compressed image files, the problem of low page drawing efficiency and large external memory access overhead is solved, and more efficient page drawing and alleviating page switching delays are achieved.
Patent Information
- Application Number
- CN202310730945.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-19
- Publication Date
- 2024-12-20
AI Technical Summary
Smart devices such as AR devices are inefficient in page drawing and have high overhead for accessing external memory. This is mainly due to the disordered storage resources of external memory devices, which requires frequent interactions when reading resources, increasing the number of IO requests, and reducing the efficiency of page drawing.
By obtaining the index area storage data when receiving the resource read request, determining the resource reading feature data, generating the target compressed image file, and drawing the page to be displayed based on the file, using the cache mechanism to reduce interaction with the external memory device, and improving Page drawing efficiency.
It effectively improves the efficiency of page drawing, saves the overhead of accessing external memory, and alleviates the lag and delay caused by the inability to load resource data in time during page switching.
Smart Images

Figure CN119166246A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart device technology, and in particular to a page drawing method, device, equipment and storage medium. Background Art
[0002] Smart devices occupy an increasing share in the market, especially AR devices. In order to adapt to complex and changing application scenarios, most AR devices use dual systems to work together to complete various functions, namely Android system and RTOS system. The circuit boards of AR devices tend to be lightweight, low-power, and miniaturized, making their storage resources far less powerful than those of computers and other devices. In addition, the resources of AR devices are generally stored in external storage devices, and the resources stored in external storage devices are disordered and messy. When the upper-level application needs to read, it takes a lot of time to locate the required resources. In addition, it is necessary to frequently interact with the external storage device during reading, which greatly increases the number of IO requests, ultimately resulting in low efficiency in drawing pages and high overhead in accessing external storage.
[0003] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of the present invention is to provide a page drawing method, device, equipment and storage medium, aiming to solve the technical problems of low efficiency in drawing pages and high overhead in accessing external memory.
[0005] To achieve the above object, the present invention provides a page drawing method, which comprises the following steps:
[0006] When receiving a resource read request, obtain the index area storage data;
[0007] Determining resource reading characteristic data according to the resource reading request;
[0008] Determine the target compressed image file according to the resource reading characteristic data and index area storage data;
[0009] The page to be displayed is drawn according to the target compressed image file.
[0010] Optionally, the determining the target compressed image file according to the resource reading characteristic data and index area storage data includes:
[0011] Determine the resource reading type according to the resource reading characteristic data;
[0012] When the resource read type is not a preset resource type, storing the initial resource data corresponding to the resource read type in the index area storage data to the target cache;
[0013] Matching the resource read characteristic data with the characteristic data of the resource data in the target cache;
[0014] The target compressed image file is read from the target cache according to the matching result.
[0015] Optionally, the target cache includes an icon storage cache and a control storage cache, and the initial resource data includes initial icon resource data and initial control resource data;
[0016] The storing of the initial resource data corresponding to the resource read type in the index area storage data to the target cache includes:
[0017] When the resource read type is an icon resource type, storing the initial icon resource data corresponding to the icon resource type in the index area storage data into an icon storage cache;
[0018] When the resource read type is a control resource type, the initial control resource data corresponding to the control resource type in the index area storage data is stored in the control storage cache.
[0019] Optionally, drawing the page to be displayed according to the target compressed image file includes:
[0020] Decoding the target compressed image file through an image drawing control;
[0021] The target page drawing strategy is used to draw the page to be displayed according to the decoded image file.
[0022] Optionally, when receiving a resource read request, before obtaining the index area storage data, the method further includes:
[0023] Get the area where the external memory device stores resource data;
[0024] Formatting the area according to preset storage requirements to obtain various external storage areas;
[0025] Acquire page resource data involved when the user uses the smart device, and determine commonly used resource data based on the page resource data;
[0026] Managing the resource data stored in the external storage device according to the commonly used resource data;
[0027] An index area is generated based on the managed resource data and each external storage area to store data.
[0028] Optionally, after drawing the page to be displayed according to the target compressed image file, the method further includes:
[0029] Displaying the page to be displayed;
[0030] When receiving a page switching instruction, determining the resource data type of the page to be displayed according to the page switching instruction;
[0031] Determine the changed resource data according to the target compressed image file and the resource data type of the switched page to be displayed;
[0032] Drawing a target switching page according to the changed resource data through a target page drawing strategy;
[0033] The page to be displayed is switched according to the target switching page.
[0034] Optionally, determining the changed resource data according to the target compressed image file and the resource data of the page to be displayed includes:
[0035] Determine target resource data corresponding to the resource data type of the page to be displayed;
[0036] Comparing the target resource data with the target compressed image file, and determining the changed resource data according to the comparison result;
[0037] When the type of the changed resource data is a preset resource type, batch reading the changed resource data from the target cache;
[0038] When the type of the changed resource data is not a preset resource type, the changed resource data is read from the background image storage area.
[0039] In addition, to achieve the above-mentioned purpose, the present invention also provides a page drawing device, the page drawing device comprising:
[0040] The acquisition module is used to acquire the index area storage data when receiving a resource read request;
[0041] A determination module, configured to determine resource reading characteristic data according to the resource reading request;
[0042] The determination module is further used to determine the target compressed image file according to the resource reading feature data and the index area storage data;
[0043] The drawing module is used to draw the page to be displayed according to the target compressed image file.
[0044] In addition, to achieve the above objectives, the present invention also proposes a page drawing device, which includes: a memory, a processor, and a page drawing program stored in the memory and executable on the processor, wherein the page drawing program is configured to implement the page drawing method described above.
[0045] In addition, to achieve the above-mentioned purpose, the present invention further proposes a storage medium, on which a page drawing program is stored, and when the page drawing program is executed by a processor, the page drawing method as described above is implemented.
[0046] The page drawing method proposed in the present invention obtains index area storage data when receiving a resource read request; determines resource read feature data according to the resource read request; determines a target compressed image file according to the resource read feature data and the index area storage data; and draws the page to be displayed according to the target compressed image file. In the above manner, when receiving a resource read request, the resource read feature data is determined, and then the target compressed image file is read from the corresponding storage area according to the resource read feature data and the index area storage data, and then the page to be displayed is drawn according to the target compressed image file, thereby effectively improving the efficiency of drawing pages, thereby saving the overhead of accessing external memory, and alleviating the jamming and delay caused by the failure to load resource data in time when switching pages. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a structural schematic diagram of a page drawing device in a hardware operating environment involved in an embodiment of the present invention;
[0048] Figure 2 It is a flow chart of the first embodiment of the page drawing method of the present invention;
[0049] Figure 3 A schematic diagram of regional distribution of an embodiment of a page drawing method of the present invention;
[0050] Figure 4 A data storage distribution diagram of an index area of a page drawing method according to an embodiment of the present invention;
[0051] Figure 5 A data storage distribution diagram of an icon storage area in an embodiment of a page drawing method of the present invention;
[0052] Figure 6 A data storage distribution diagram of a background image storage area in an embodiment of a page drawing method of the present invention;
[0053] Figure 7 A data storage distribution diagram of a control diagram storage area in an embodiment of a page drawing method of the present invention;
[0054] Figure 8 It is a flow chart of the second embodiment of the page drawing method of the present invention;
[0055] Fig. 9 It is a schematic diagram of functional modules of the first embodiment of the page drawing device of the present invention.
[0056] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0058] Reference Figure 1 , Figure 1 A schematic diagram of a device structure is drawn for a page of a hardware operating environment involved in an embodiment of the present invention.
[0059] like Figure 1 As shown, the page drawing device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0060] Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation on the page drawing device, and may include more or less components than those shown in the figure, or combine some components, or arrange the components differently.
[0061] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a page drawing program.
[0062] exist Figure 1In the page drawing device shown, the network interface 1004 is mainly used for data communication with the network integration platform workstation; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the page drawing device of the present invention can be set in the page drawing device, and the page drawing device calls the page drawing program stored in the memory 1005 through the processor 1001, and executes the page drawing method provided by the embodiment of the present invention.
[0063] Based on the above hardware structure, an embodiment of a page drawing method of the present invention is proposed.
[0064] Reference Figure 2 , Figure 2 It is a flowchart diagram of the first embodiment of the page drawing method of the present invention.
[0065] In a first embodiment, the page drawing method comprises the following steps:
[0066] Step S10: upon receiving a resource read request, obtaining index area storage data.
[0067] It should be noted that the execution subject of this embodiment is a page drawing device, and it can also be other devices that can achieve the same or similar functions, such as smart devices, etc. This embodiment does not limit this. In this embodiment, a smart device is used as an example for explanation.
[0068] It should be understood that the resource read request is a request for resource read when the upper layer application needs to draw a page. The index area storage data refers to the storage data after managing the resource data stored in the external memory device. The index area storage data includes the index area and other data storage areas. Figure 3 , Figure 3 It is a schematic diagram of regional distribution, including an index area, an icon storage area, a control storage area and a background image storage area, and the control storage area is stored in units of pages, so that controls can be loaded in batches by page when reading, for example, home page controls, menu page controls, first function page and second function page, etc., wherein the index area is used to record the partitioning status of the entire storage area of the external memory device, and does not involve the details of resource data, the icon storage area is used to store icon resources, and the background image storage area is used to store background image resources.
[0069] Understandably, reference Figure 4 , Figure 4It is a data storage distribution map of the index area, including index area size, icon storage area address, icon storage area offset, icon storage area size, background image storage area address, background image storage area offset, background image storage area size, control storage area address, control storage area offset and control storage area size, wherein the index area size is used to record the size of the entire index area to prevent reading resource data out of bounds and causing reading errors, the icon storage area address refers to the first address of the icon storage area in the external memory device, the icon storage area offset is used to record the offset of the first address of the image source data in the icon storage area relative to the icon storage area address, and the icon storage area si ze refers to the resource size of all icon source data in the icon storage area. Similarly, the background image storage area address refers to the starting address of the background image storage area in the external storage device. The background image storage area offset is used to record the offset of the starting address of the image source data in the background image storage area relative to the background image storage area address. The background image storage area size refers to the resource size of all background image source data in the background image storage area. The control storage area address refers to the starting address of the control storage area in the external storage device. The control storage area offset is used to record the offset of the starting address of the image source data in the control storage area relative to the control storage area address. The control storage area size refers to the resource size of all control source data in the control storage area.
[0070] It should be understood that reference Figure 5 , Figure 5 It is a data storage distribution diagram of the icon storage area, including the icon area header data and icon resources. The icon area header data includes total_num_T, IDx_T, offsetx_T and sizex_T, where total_num_T is used to record the total number of all icons in the icon storage area, IDx_T is used to record the ID number of the x-th icon, offsetx_T is used to record the offset of the first address of the image source data in the icon storage area relative to the icon storage area address, and sizex_T is used to record the compressed size of the x-th icon resource. Figure 6 , Figure 6It is a data storage distribution diagram of the background image storage area, including the background image area header data and background image resources. The background image area header data includes total_num_B, IDx_B, offsetx_B and sizex_B, where total_num_B is used to record the total number of all icons in the background image storage area, IDx_T is used to record the ID number of the x-th background image, offsetx_T is used to record the offset of the first address of the background image source data in the background image storage area relative to the background image storage area address, and sizex_T is used to record the compressed size of the x-th background image resource. Figure 7 , Figure 7 It is a data storage distribution diagram of the control diagram storage area, including page control area header data and control resources. The control area header data includes page control ID, page control size and page control num. The control resources are not limited to main page controls, menu page controls and second function page controls.
[0071] Furthermore, before step S10, it also includes: obtaining an area for storing resource data of an external storage device; formatting the area according to preset storage requirements to obtain each external storage area; obtaining page resource data involved when a user uses a smart device, and determining commonly used resource data based on the page resource data; managing the resource data stored in the external storage device based on the commonly used resource data; and generating an index area storage data based on the managed resource data and each external storage area.
[0072] It can be understood that the preset storage requirement refers to the requirement for storing resource data. After obtaining the area for storing resource data in the external memory device, the area is formatted and segmented according to the preset storage requirement, and then the commonly used resource data is filtered out from the page resource data. Then, the resource data stored in the external memory device is managed according to the commonly used resource data. For example, the commonly used resource data in the resource data stored in the external memory device is placed at the front of the corresponding storage area, and then an index area storage data is generated based on the managed resource data and each external memory area. At this time, the resource data is stored according to specific ordered rules. When the page switch is triggered, the resource data is read in batches in units of pages, which greatly reduces the number of IO requests and saves the overhead of accessing the external memory.
[0073] Step S20: determining resource reading characteristic data according to the resource reading request.
[0074] It can be understood that the resource reading characteristic data refers to the characteristic data of the resource data to be read. Specifically, after obtaining the resource reading request, the resource reading request is parsed, and the resource reading characteristic data is obtained according to the parsing result. The resource reading characteristic data can be the ID number of the resource data, for example, the ID number of the background image, the ID number of the icon, and the ID number of the control.
[0075] Step S30, determining a target compressed image file according to the resource reading feature data and index area storage data.
[0076] It should be understood that in order to ensure the transmission efficiency of image files, after locating the image file, the image file will be compressed, and then the compressed target compressed image file will be transmitted to the image drawing control. The target compressed image file refers to the compressed image file used to draw the display page. The target compressed image file includes at least one of the icon resources, control resources and background image resources. The target compressed image file is located based on the resource reading feature data and the index area storage data.
[0077] Step S40: drawing a page to be displayed according to the target compressed image file.
[0078] It can be understood that the page to be displayed refers to a page used for display by the smart device. The page to be displayed may be a menu page or a control center page, which is not limited in this embodiment.
[0079] Furthermore, step S40 includes: decoding the target compressed image file through an image drawing control; and drawing a page to be displayed according to the decoded image file through a target page drawing strategy.
[0080] It should be understood that the target page drawing strategy refers to a strategy for drawing based on resources. The image drawing control can be a UI control. After obtaining the target compressed image file, the UI control decodes the target compressed image file before drawing, and then uses the target page drawing strategy to draw the page to be displayed according to the decoded image file.
[0081] Furthermore, after step S40, it also includes: displaying the page to be displayed; when receiving a page switching instruction, determining the resource data type of the page to be displayed according to the page switching instruction; determining the changed resource data according to the target compressed image file and the resource data type of the page to be displayed; drawing the target switching page according to the changed resource data through the target page drawing strategy; switching the page to be displayed according to the target switching page.
[0082] It can be understood that after drawing the page to be displayed, the smart device will display the page to be displayed, and then determine whether a page switching instruction is received. If so, it indicates that the smart device needs to display other pages. At this time, the changing resource data is determined according to the target compressed image file and the resource data type of the switching page to be displayed. Usually, the changing resource data is a control resource, wherein the fixed resource data does not need to be re-read. Then, the target switching page is drawn according to the changing resource data through the target page drawing strategy, and the page to be displayed is switched through the target switching page.
[0083] Furthermore, the method of determining the changed resource data based on the target compressed image file and the resource data of the switched page to be displayed includes: determining the target resource data corresponding to the resource data type of the switched page to be displayed; comparing the target resource data with the target compressed image file, and determining the changed resource data based on the comparison result; when the type of the changed resource data is a preset resource type, batch reading the changed resource data from the target cache; when the type of the changed resource data is not a preset resource type, reading the changed resource data from the background image storage area.
[0084] It should be understood that after determining the target resource data, the target resource data is compared with the target compressed image file to determine the changed resource data. The preset resource types include icon resource types and control resource types. Different resource types read different storage areas for the changed resource data. When the type of the changed resource data is the preset resource type, the changed resource data is read in batches from the target cache. When the type of the changed resource data is not the preset resource type, the changed resource data is read from the background image storage area. That is to say, when switching pages, the control resources and icon resources required for the next page are loaded into the corresponding target cache, and then the control resources and icon resources are read from the target cache to draw and display the target switching page, thereby realizing page switching of the smart device.
[0085] This embodiment obtains index area storage data when receiving a resource read request; determines resource read feature data according to the resource read request; determines a target compressed image file according to the resource read feature data and the index area storage data; and draws the page to be displayed according to the target compressed image file. In the above manner, when receiving a resource read request, the resource read feature data is determined, and then the target compressed image file is read from the corresponding storage area according to the resource read feature data and the index area storage data, and then the page to be displayed is drawn according to the target compressed image file, thereby effectively improving the efficiency of drawing pages, thereby saving the overhead of accessing external memory, and alleviating the jamming and delay caused by the failure to load resource data in time when switching pages.
[0086] In one embodiment, if Figure 8 Based on the first embodiment, a second embodiment of the page drawing method of the present invention is proposed, wherein step S30 includes:
[0087] Step S301: determining a resource reading type according to the resource reading characteristic data.
[0088] It should be understood that the resource reading type refers to the resource type that needs to be read, and the resource reading type includes an icon resource type, a control resource type, and a background image resource type.
[0089] Step S302: When the resource read type is not a preset resource type, the initial resource data corresponding to the resource read type in the index area storage data is stored in the target cache.
[0090] It is understandable that when the resource reading type is not the preset resource type, it indicates that the resource needs to be read from the target cache determined by the cache mechanism cache. At this time, it is necessary to store the initial resource data corresponding to the resource reading type from the index area storage data, and then store the initial resource data to the target cache.
[0091] Further, step S302 includes: when the resource reading type is an icon resource type, storing the initial icon resource data corresponding to the icon resource type in the index area storage data to the icon storage cache; when the resource reading type is a control resource type, storing the initial control resource data corresponding to the control resource type in the index area storage data to the control storage cache.
[0092] It should be understood that when the resource reading type is an icon resource type, the initial icon resource data corresponding to the icon resource type in the index area storage data is stored in the icon storage cache; when the resource reading type is a control resource type, the initial control resource data corresponding to the control resource type in the index area storage data is stored in the control storage cache, that is, after determining that the resource reading type is a preset resource type, the corresponding initial resource data is stored in the corresponding storage cache in advance, thereby avoiding frequent interactions with external storage devices and reducing the access overhead of external storage devices.
[0093] Step S303: matching the characteristic data read from the resource with the characteristic data of the resource data in the target cache.
[0094] It should be understood that after obtaining the resource data in the target cache, the resource reading feature data is matched with the feature data of the resource data in the target cache.
[0095] Step S304: read the target compressed image file from the target cache according to the matching result.
[0096] It can be understood that after obtaining the matching results, the successfully matched feature data is extracted from the matching results, and then multiple resource data corresponding to the successfully matched feature data are determined, and then the multiple resource data are packaged and compressed, and then the target compressed image file is read from the target cache, thereby reducing the coupling between the upper-level application and the resource data stored in the external memory device.
[0097] This embodiment determines the resource read type according to the resource read characteristic data; when the resource read type is not a preset resource type, the initial resource data corresponding to the resource read type in the index area storage data is stored in the target cache; the resource read characteristic data is matched with the characteristic data of the resource data in the target cache; the target compressed image file is read from the target cache according to the matching result; through the above method, after determining the resource read type, it is judged whether the resource read type is a preset resource type, if not, the initial resource data is stored in the target cache before reading, and then the resource read characteristic data is matched with the characteristic data of the resource data in the target cache, and the target compressed image file is read from the target cache according to the matching result, thereby effectively improving the efficiency of reading the target compressed image file.
[0098] In addition, an embodiment of the present invention further provides a storage medium, on which a page drawing program is stored. When the page drawing program is executed by a processor, the steps of the page drawing method described above are implemented.
[0099] Since the storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought by the technical solutions of the above embodiments, which will not be described one by one here.
[0100] In addition, refer to Fig. 9 The embodiment of the present invention further provides a page drawing device, the page drawing device comprising:
[0101] The acquisition module 10 is used to acquire the index area storage data when receiving a resource read request.
[0102] The determination module 20 is configured to determine resource reading characteristic data according to the resource reading request.
[0103] The determination module 20 is further configured to determine a target compressed image file according to the resource reading feature data and the index area storage data.
[0104] The drawing module 30 is used to draw the page to be displayed according to the target compressed image file.
[0105] This embodiment obtains index area storage data when receiving a resource read request; determines resource read feature data according to the resource read request; determines a target compressed image file according to the resource read feature data and the index area storage data; and draws the page to be displayed according to the target compressed image file. In the above manner, when receiving a resource read request, the resource read feature data is determined, and then the target compressed image file is read from the corresponding storage area according to the resource read feature data and the index area storage data, and then the page to be displayed is drawn according to the target compressed image file, thereby effectively improving the efficiency of drawing pages, thereby saving the overhead of accessing external memory, and alleviating the jamming and delay caused by the failure to load resource data in time when switching pages.
[0106] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.
[0107] In addition, for technical details that are not described in detail in this embodiment, reference can be made to the page drawing method provided in any embodiment of the present invention, and will not be repeated here.
[0108] In one embodiment, the acquisition module 10 is also used to obtain an area where an external storage device stores resource data; format the area according to preset storage requirements to obtain each external storage area; obtain page resource data involved when a user uses a smart device, and determine commonly used resource data based on the page resource data; manage the resource data stored in the external storage device based on the commonly used resource data; and generate an index area storage data based on the managed resource data and each external storage area.
[0109] In one embodiment, the determination module 20 is also used to determine the resource reading type based on the resource reading characteristic data; when the resource reading type is not a preset resource type, the initial resource data corresponding to the resource reading type in the index area storage data is stored in the target cache; the resource reading characteristic data is matched with the characteristic data of the resource data in the target cache; and the target compressed image file is read from the target cache based on the matching result.
[0110] In one embodiment, the determination module 20 is also used to store the initial icon resource data corresponding to the icon resource type in the index area storage data to the icon storage cache when the resource reading type is the icon resource type; and to store the initial control resource data corresponding to the control resource type in the index area storage data to the control storage cache when the resource reading type is the control resource type.
[0111] In one embodiment, the drawing module 30 is further configured to decode the target compressed image file through an image drawing control; and draw the page to be displayed according to the decoded image file through a target page drawing strategy.
[0112] In one embodiment, the drawing module 30 is also used to display the page to be displayed; when receiving a page switching instruction, determine the resource data type of the page to be displayed according to the page switching instruction; determine the changed resource data according to the target compressed image file and the resource data type of the page to be displayed; draw the target switching page according to the changed resource data through the target page drawing strategy; and switch the page to be displayed according to the target switching page.
[0113] In one embodiment, the drawing module 30 is also used to determine the target resource data corresponding to the resource data type of the switched page to be displayed; compare the target resource data with the target compressed image file, and determine the changed resource data according to the comparison result; when the type of the changed resource data is a preset resource type, batch read the changed resource data from the target cache; when the type of the changed resource data is not a preset resource type, read the changed resource data from the background image storage area.
[0114] Other embodiments or implementation methods of the page drawing device of the present invention may refer to the above-mentioned method embodiments, which will not be repeated here.
[0115] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0116] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0117] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, an integrated platform workstation, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0118] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A page drawing method, characterized in that: The page drawing method comprises the following steps: When receiving a resource read request, obtain the index area storage data; Determining resource reading characteristic data according to the resource reading request; Determine the target compressed image file according to the resource reading characteristic data and index area storage data; The page to be displayed is drawn according to the target compressed image file.
2. The page drawing method according to claim 1, characterized in that: The step of determining the target compressed image file according to the resource reading feature data and index area storage data includes: Determine the resource reading type according to the resource reading characteristic data; When the resource read type is not a preset resource type, storing the initial resource data corresponding to the resource read type in the index area storage data to the target cache; Matching the resource read characteristic data with the characteristic data of the resource data in the target cache; The target compressed image file is read from the target cache according to the matching result.
3. The page drawing method according to claim 2, characterized in that: The target cache includes an icon storage cache and a control storage cache, and the initial resource data includes initial icon resource data and initial control resource data; The storing of the initial resource data corresponding to the resource read type in the index area storage data to the target cache includes: When the resource read type is an icon resource type, storing the initial icon resource data corresponding to the icon resource type in the index area storage data into an icon storage cache; When the resource read type is a control resource type, the initial control resource data corresponding to the control resource type in the index area storage data is stored in the control storage cache.
4. The page drawing method according to claim 1, characterized in that: The step of drawing the page to be displayed according to the target compressed image file comprises: Decoding the target compressed image file through an image drawing control; The target page drawing strategy is used to draw the page to be displayed according to the decoded image file.
5. The page drawing method according to claim 1, characterized in that: The method further includes: before obtaining the index area storage data upon receiving the resource read request: Get the area where the external memory device stores resource data; Formatting the area according to preset storage requirements to obtain various external storage areas; Acquire page resource data involved when the user uses the smart device, and determine commonly used resource data based on the page resource data; Managing the resource data stored in the external storage device according to the commonly used resource data; An index area is generated based on the managed resource data and each external storage area to store data.
6. The page drawing method according to any one of claims 1 to 5, characterized in that: After drawing the page to be displayed according to the target compressed image file, the method further includes: Displaying the page to be displayed; When receiving a page switching instruction, determining the resource data type of the page to be displayed according to the page switching instruction; Determine the changed resource data according to the target compressed image file and the resource data type of the switched page to be displayed; Drawing a target switching page according to the changed resource data through a target page drawing strategy; The page to be displayed is switched according to the target switching page.
7. The page drawing method according to claim 6, characterized in that: The step of determining the changed resource data according to the target compressed image file and the resource data of the page to be displayed includes: Determine target resource data corresponding to the resource data type of the page to be displayed; Comparing the target resource data with the target compressed image file, and determining the changed resource data according to the comparison result; When the type of the changed resource data is a preset resource type, batch reading the changed resource data from the target cache; When the type of the changed resource data is not a preset resource type, the changed resource data is read from the background image storage area.
8. A page drawing device, characterized in that: The page drawing device comprises: The acquisition module is used to acquire the index area storage data when receiving a resource read request; A determination module, configured to determine resource reading characteristic data according to the resource reading request; The determination module is further used to determine the target compressed image file according to the resource reading feature data and the index area storage data; The drawing module is used to draw the page to be displayed according to the target compressed image file.
9. A page drawing device, characterized in that: The page drawing device comprises: a memory, a processor, and a page drawing program stored in the memory and executable on the processor, wherein the page drawing program is configured to implement the page drawing method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a page drawing program, and when the page drawing program is executed by the processor, the page drawing method according to any one of claims 1 to 7 is implemented.
