Application page starting method and device, equipment and medium

By loading only the layout and configuration resources of visible controls when the application page starts, and delaying the loading of configuration resources of non-visible controls, the problems of slow page startup and high development difficulty are solved, achieving faster page startup and a more efficient development process.

CN120670049APending Publication Date: 2025-09-19ECARX (HUBEI) TECHCO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510765586.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-10
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In the existing technology, the startup speed of application pages is slow, mainly because the page needs to load a large amount of control information and configuration resources when it starts, resulting in high CPU consumption and high memory usage, affecting system performance. At the same time, the "lazy loading" solution increases the development workload and difficulty.

Method used

When the page starts, only the layout information and configuration resources of controls with visible properties are loaded. For controls with non-visible properties, only the layout information is loaded, and the loading of their configuration resources is delayed. Resource loading and rendering are controlled through control objects.

Benefits of technology

It improves page startup speed, reduces CPU and memory usage, reduces development workload and the risk of logical errors, and improves development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670049A_ABST
    Figure CN120670049A_ABST
Patent Text Reader

Abstract

The invention provides an application page starting method and device, equipment and a medium, and the method comprises the steps: obtaining a layout file of a target page in response to a starting instruction of the target page; according to the layout file, loading layout information of all controls in the target page into a memory; determining a first type of controls with visible attributes in all the controls; controlling configuration resources of the first type of controls to be loaded to a memory; and rendering the first type of controls of the target page according to the layout information of the first type of controls in the memory and the configuration resources. By means of the technical scheme, the page starting speed can be increased, and CPU consumption and memory occupation are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of application page startup, and in particular to an application page startup method, apparatus, device, and medium. Background Art

[0002] In application development, page startup speed directly affects the user experience. Among other reasons, the page startup speed is slowed down by the need to load the information of each control on the page and the configuration resources associated with the controls (such as background images and animations) into memory when the page starts. This loading process is time-consuming and consumes a lot of CPU (Central Processing Unit). It also takes up a large amount of memory space, affecting the overall performance of the system, thereby slowing down the page startup speed.

[0003] To speed up page startup, some applications use a "lazy loading" solution for certain specific controls on the page (for example, controls that don't need to be displayed immediately when the page starts). This reduces the amount of data that needs to be loaded into memory, thereby speeding up page startup. Specifically, the "lazy loading" solution involves designing separate layout files for specific controls. When the control needs to be displayed, the layout files and associated configuration resources are loaded into memory, rather than loading them into memory at page startup. This reduces the amount of data loaded when the page starts, speeding up page startup.

[0004] However, the "lazy loading" solution has certain limitations. On the one hand, when there are many controls that need to adopt the "lazy loading" solution, it is necessary to design a separate layout file for each control, which increases the development workload. On the other hand, it is necessary to additionally write monitoring logic for the control display time, which is prone to logical errors, increases development difficulty, and reduces development efficiency.

[0005] In view of this, this application is hereby filed. Summary of the Invention

[0006] The present application aims to provide an application page startup method, apparatus, device and medium, which can improve the page startup speed and reduce CPU consumption and memory usage.

[0007] In a first aspect, an embodiment of the present application provides a method for starting an application page, comprising: in response to a start instruction of a target page, obtaining a layout file of the target page;

[0008] Loading the layout information of all controls in the target page into memory according to the layout file;

[0009] Determine a first type of control having a visible attribute among all the controls;

[0010] Controlling the configuration resources of the first type of controls to be loaded into memory;

[0011] The first type of controls on the target page are rendered according to the layout information of the first type of controls in the memory and the configuration resources.

[0012] According to the technical solution provided in the embodiment of the present application, optionally, loading the layout information of all controls in the target page into the memory according to the layout file includes:

[0013] Parsing the layout file to determine the control tag, layout information of the control tag, attribute information of the control tag, and configuration resource identification information of the control tag in the layout file;

[0014] A control object is created according to the control tag, and layout information of the control tag is set to the corresponding control object.

[0015] According to the technical solution provided by the embodiment of the present application, optionally, after creating the control object according to the control tag, the method further includes:

[0016] Set the property information and configuration resource identification information of the control tag to the corresponding control object.

[0017] According to the technical solution provided in the embodiment of the present application, optionally, determining the first type of controls with visible attributes among all the controls includes:

[0018] Determine the first type of control with visible attributes according to the attribute information of the control tag;

[0019] Alternatively, the first type of control with the visible attribute is determined according to the return value of a preset function in the control object.

[0020] According to the technical solution provided in the embodiment of the present application, optionally, the step of loading the configuration resources for controlling the first type of controls into the memory includes:

[0021] Through the control object of the first type of control, the corresponding configuration resource is stored in the memory according to the configuration resource identification information.

[0022] According to the technical solution provided in the embodiment of the present application, optionally, after rendering the first type of controls of the target page according to the layout information of the first type of controls in the memory and the configuration resources, the method further includes:

[0023] In response to detecting a display instruction of the second-type control through the control object of the second-type control, controlling the configuration resource of the second-type control to be loaded into the memory through the control object of the second-type control;

[0024] The second-type controls are rendered according to the layout information of the second-type controls in the memory and the configuration resources; wherein the second-type controls are controls with non-visible properties.

[0025] According to the technical solution provided in the embodiment of the present application, optionally, obtaining the layout file of the target page includes:

[0026] Obtain the layout file of the target page from the specified storage path.

[0027] In a second aspect, an embodiment of the present application further provides an application page startup device, comprising:

[0028] an acquisition module, configured to acquire a layout file of a target page in response to a startup instruction of the target page;

[0029] A loading module, configured to load the layout information of all controls in the target page into memory according to the layout file;

[0030] A determination module, configured to determine a first type of control having a visible attribute among all the controls;

[0031] A control module, configured to control the configuration resources of the first type of controls to be loaded into a memory;

[0032] The display module is configured to render the first type of controls on the target page according to the layout information of the first type of controls in the memory and the configuration resources.

[0033] In a third aspect, an embodiment of the present application further provides an electronic device, comprising:

[0034] processor and memory;

[0035] The processor is configured to execute the steps of the application page startup method as described in any embodiment by calling the program or instruction stored in the memory.

[0036] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the application page startup method as described in any embodiment.

[0037] In summary, the present application proposes a method for starting an application page, specifically, for controls that need to be displayed immediately in the target page (i.e., first-class controls with visible attributes), layout information and configuration resources are loaded at the same time, and for controls that do not need to be displayed immediately in the target page (i.e., second-class controls with non-visible attributes), only layout information is loaded without loading their configuration resources, thereby saving loading time, improving the startup speed of the target page, reducing CPU and memory usage, and not affecting the display effect of the controls in the target page. In other words, for controls that do not need to be displayed immediately, the loading of their layout information and the loading of configuration resources are executed separately. During the page startup phase, only the layout information of the control is loaded, and the configuration resources are not loaded. When the control needs to be displayed immediately, its configuration resources are loaded. Different from "lazy loading", the present application solution does not require the design of separate layout files specifically for specific controls, thereby reducing development workload and improving development efficiency.

[0038] In summary, the present application proposes a method for starting an application page, comprising the following steps: in response to a start-up instruction of a target page, obtaining the layout file of the target page; loading the layout information of all controls in the target page into the memory according to the layout file; determining the first type of controls with visible attributes among all the controls; controlling the configuration resources of the first type of controls to be loaded into the memory; and rendering the first type of controls of the target page according to the layout information and configuration resources of the first type of controls in the memory. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is a process of an application page startup method provided by an embodiment of the present application Figure 1 ;

[0040] Figure 2 This is a process of an application page startup method provided by an embodiment of the present application Figure 2 ;

[0041] Figure 3 This is a structural diagram of an application page startup device provided in an embodiment of the present application;

[0042] Figure 4 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the invention are shown in the accompanying drawings.

[0044] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0045] As described in the background technology, in application development, the page startup speed directly affects the user experience. Among other reasons, the slow page startup speed is caused by the need to load the information of each control on the page and the configuration resources associated with the control (such as background images, animations, etc.) into the memory when the page starts. This loading process is time-consuming and consumes a lot of CPU (Central Processing Unit) and memory space, affecting the overall performance of the system, thereby reducing the page startup speed.

[0046] To speed up page startup, some applications use a "lazy loading" solution for certain specific controls on the page (for example, controls that don't need to be displayed immediately when the page starts). This reduces the amount of data that needs to be loaded into memory, thereby speeding up page startup. Specifically, the "lazy loading" solution involves designing separate layout files for specific controls. When the control needs to be displayed, the layout files and associated configuration resources are loaded into memory, rather than loading them into memory at page startup. This reduces the amount of data loaded when the page starts, speeding up page startup.

[0047] However, the "lazy loading" solution has certain limitations. On the one hand, when there are many controls that need to adopt the "lazy loading" solution, it is necessary to design a separate layout file for each control, which increases the development workload. On the other hand, it is necessary to additionally write monitoring logic for the control display time, which is prone to logical errors, increases development difficulty, and reduces development efficiency.

[0048] In response to the above problems, this application proposes a method for starting an application page. On the one hand, there is no need to design a layout file separately for a specific control. In other words, the existing technical solution can be used in the step of designing the layout file. Therefore, the method for starting an application page proposed in this application will not increase the development workload. On the other hand, there is no need to write additional monitoring logic for the control display time. It can be executed according to the current monitoring logic for the control display time. Therefore, the method for starting an application page proposed in this application will not increase the development difficulty and is not prone to logical errors. At the same time, the method for starting an application page proposed in this application can improve the startup speed of the page.

[0049] Specifically, Figure 1This is a flow chart of a method for starting an application page provided by an embodiment of the present application. The method for starting an application page can be executed by an application page starting device, which can be implemented in the form of software and / or hardware.

[0050] See also Figure 1 As shown, the application page startup method specifically includes the following steps:

[0051] S110 : In response to a start instruction of a target page, obtain a layout file of the target page.

[0052] When a user opens a specific application (such as a navigation application or a shopping application), a launch instruction for a specific page of the application is triggered. Alternatively, when a user jumps to the next page based on a control on a page, a launch instruction for the next page is triggered. The target page can be any specific page.

[0053] Obtaining the target page's layout file includes: obtaining the target page's layout file from a specified storage path; or obtaining the target page's layout file from a server over the network. Layout files are typically read from a local storage directory. For example, on Android, layout files are stored in the app / src / main / res / layout directory. Layout files are packaged into the installation package during compilation, and are read from the local system through the system interface when the application starts.

[0054] A layout file is a configuration file that describes the arrangement, size, style, and interaction logic of various elements (such as controls, containers, and text) on a page. Specifically, in the Android system, layout files are typically in XML format, using control tags to record each control, along with its length, width, height, center point, interaction methods (such as click and long press), background image, and related animation information.

[0055] S120: Load layout information of all controls in the target page into memory according to the layout file.

[0056] Among them, all controls in the target page include first-category controls that need to be displayed immediately (i.e., first-category controls with visible attributes) and second-category controls that do not need to be displayed immediately (i.e., second-category controls with non-visible attributes). In other words, when loading layout information, all controls are loaded into memory. The number of second-category controls is one or more.

[0057] Optionally, when there are multiple second-category controls, the layout information for a portion of the second-category controls can be loaded into memory simultaneously with the layout information for the first-category controls. The remaining second-category controls wait for a display instruction. When the display instruction is triggered, the layout information for the remaining second-category controls is loaded into memory. Alternatively, only the layout information for the first-category controls can be loaded, while all second-category controls wait for a display instruction. When the display instruction is triggered, the layout information for all second-category controls is loaded into memory.

[0058] When there is only one second-category control, you can set the layout information of this second-category control to be loaded into memory simultaneously with the layout information of the first-category control. Alternatively, you can load only the layout information of the first-category control, and then load the layout information of this second-category control into memory when the display instruction is triggered.

[0059] The layout information of a control includes the size, position, and hierarchical relationship between the control and other controls.

[0060] Loading the layout information of all controls on the target page into memory based on the layout file essentially involves parsing the layout file, converting its contents into a control object tree in memory (e.g., the Android View tree), and setting the layout information into the corresponding control objects. This allows the control layout information to be manipulated by operating the control objects in subsequent processing. In particular, an object is also called an instance, so a control object is also referred to as a control object.

[0061] Exemplarily, loading the layout information of all controls in the target page into the memory according to the layout file includes:

[0062] The layout file is parsed to determine the control tag, layout information of the control tag, attribute information of the control tag, and configuration resource identification information of the control tag in the layout file; a control object is created according to the control tag, and the layout information of the control tag is set to the corresponding control object.

[0063] Control tags are used to define interface elements (such as buttons, text boxes, and images). They use specific syntax to describe the control's type, properties, and hierarchical relationships. Their purpose is to define a control and configure its appearance and behavior. For example, you can define whether the control is a text box, button, or image, and configure the control's appearance, such as setting visual features like color, font, margins, and size. Some tags can also directly declare events (such as click events) or bind to code logic via IDs.

[0064] The process of parsing the layout file includes syntax analysis, lexical analysis and semantic analysis, which can be implemented through the system's library functions.

[0065] The attribute information of the control tag includes the visible attribute, invisible attribute, color, etc. The configuration resource identification information of the control tag is used to mark the animation associated with the control.

[0066] In some embodiments, after creating a control object based on the control tag, the method further includes: setting the attribute information and configuration resource identification information of the control tag to the corresponding control object, so as to facilitate subsequent processing of the attribute information and configuration resource identification information of the control tag through the control object.

[0067] S130: Determine a first type of control with a visible attribute among all the controls.

[0068] Optionally, while determining the first-category controls with visible attributes among all the controls, the second-category controls with non-visible attributes among all the controls may also be determined.

[0069] Among them, the first type of controls with visible attributes refer to controls that need to be displayed immediately when the target page is started; the second type of controls with non-visible attributes refer to controls that do not need to be displayed immediately when the target page is started, but are controls that need to meet certain additional conditions after the target page is started to be displayed. For example, the speeding warning control on the guide page of the map application will only be displayed on the guide page when the speeding conditions are met.

[0070] As mentioned above, a layout file is a configuration file that describes the properties of the arrangement, size, style, and interaction logic of each element (such as controls, containers, text, etc.) on a page. This includes the visible and invisible properties of controls. Therefore, through the layout file, you can know which controls are first-class controls with visible properties and which controls are second-class controls with invisible properties.

[0071] Specifically, each control in the layout file corresponds to an attribute tag. When the attribute tag is configured as "gone" or "invisible", it means that the control is a second-type control with an invisible attribute.

[0072] Optionally, the visible and invisible properties of the control can also be obtained through the control object. For example, the library function getVisibility() can be used to obtain the visible property of the control. If the return value of the library function getVisibility is 0, it means that the control is a second-class control with an invisible property. If the return value of the library function getVisibility is 1, it means that the control is a first-class control with a visible property.

[0073] Optionally, you can also use the isShown() function of the control's parent class to determine the visibility of the control. If the return value of the isShown() function is true, it indicates that the control is a first-class control with a visible attribute. If the return value of the isShown() function is false, it indicates that the control is a second-class control with a non-visible attribute.

[0074] In summary, the step of determining the first-category controls having visible attributes and the second-category controls having non-visible attributes among all the controls includes:

[0075] The first category of controls with visible properties and the second category of controls with non-visible properties are determined according to the property information of the control tag; or, the first category of controls with visible properties and the second category of controls with non-visible properties are determined according to the return value of a preset function in the control object.

[0076] S140: Control the configuration resources of the first type of controls to be loaded into the memory.

[0077] Among them, configuration resources refer to background images, animation video frames, etc. associated with the first type of controls. The data volume of this type of configuration resources is large. Therefore, loading such configuration resources into the memory is time-consuming, which will reduce the overall startup speed of the target page. Therefore, in the implementation scheme of the present application, for the second type of controls that do not need to be displayed immediately, their configuration resources are not loaded into the memory first, and only the configuration resources of the first type of controls that need to be displayed immediately are controlled to be loaded into the memory, thereby achieving the purpose of reducing loading time and improving the startup speed of the target page.

[0078] The step of controlling the configuration resources of the first type of controls to be loaded into the memory includes:

[0079] Through the control object of the first type of control, the corresponding configuration resource is stored in the memory according to the configuration resource identification information. Specifically, the configuration resource file is downloaded from the server and cached in the memory according to the configuration resource identification information, and the configuration resource file is set to the control object of the first type of control.

[0080] S150: Render the first type of controls on the target page according to the layout information of the first type of controls in the memory and the configuration resources.

[0081] For the second type of controls, they are loaded on demand, that is, when a display instruction of the second type of controls is detected, the second type of controls are rendered to achieve the display purpose.

[0082] The present application proposes a method for starting an application page, specifically, for controls that need to be displayed immediately in the target page (i.e., first-class controls with visible attributes), layout information and configuration resources are loaded simultaneously, and for controls that do not need to be displayed immediately in the target page (i.e., second-class controls with non-visible attributes), only layout information is loaded without loading their configuration resources, thereby saving loading time, improving the startup speed of the target page, and reducing CPU and memory occupancy, without affecting the display effect of the controls in the target page. In other words, for controls that do not need to be displayed immediately, the loading of their layout information and the loading of configuration resources are performed separately. During the page startup phase, only the layout information of the control is loaded, without loading the configuration resources. When the control needs to be displayed immediately, its configuration resources are loaded. Different from "lazy loading", the present application solution does not require the design of separate layout files specifically for specific controls, thereby reducing development workload and improving development efficiency.

[0083] In some embodiments, as Figure 2 As shown in the figure, a process of a method for starting an application page includes the following steps:

[0084] S210 : In response to a start instruction of a target page, obtain a layout file of the target page.

[0085] S220: Load layout information of all controls in the target page into memory according to the layout file.

[0086] S230: Determine first-category controls with visible attributes and second-category controls with invisible attributes among all controls. S240: Control the configuration resources of the first-category controls to be loaded into memory.

[0087] S250: Render the first type of controls on the target page according to the layout information of the first type of controls in the memory and the configuration resources.

[0088] S260. In response to detecting a display instruction of the second type of control through the control object of the second type of control, the configuration resources of the second type of control are loaded into the memory through the control object of the second type of control, and the second type of control is rendered according to the layout information and configuration resources of the second type of control in the memory.

[0089] That is to say, when the target page starts, only the configuration resources of the first type of controls that need to be displayed immediately are loaded into the memory. When the second type of controls need to be displayed, the configuration resources of the second type of controls are loaded into the memory and the configuration resources are set to the corresponding control objects, thereby reducing the time consumed when the target page starts and improving the startup speed of the target page.

[0090] In one embodiment, the speeding warning control on the guide page of a map application is configured with a set of sequence frame animations, which will only be played when the speeding condition is met. In the traditional solution, the sequence frame animation resource file is loaded into the memory when the guide page is started to parse the layout file, which takes about more than 300ms and causes the page to start unsmoothly.

[0091] To address the above issues, this solution only loads the layout information of the speeding warning control into the memory when parsing the layout file of the boot page, and does not load the animation file configured for the speeding warning control, thereby achieving the purpose of quickly starting the boot page. When the speeding condition is met, the speeding warning control is set to a visible state, and then the configured animation file is loaded into the memory and set to the speeding warning control object, and the animation is played. For other invisible controls, when generating the control object, the background, animation and other resources configured for the control are not loaded. When the control needs to be displayed, the control will receive a display instruction, and then the background, animation and other resources will be loaded, and the resources will be set to the corresponding control object.

[0092] The traditional "lazy loading" and "preloading" solutions both load the configured resources into memory when loading the control's layout information. This solution decouples the loading of control layout information from the loading of resource configuration. The layout information of all controls is loaded normally, while the control's configuration resources (including but not limited to background images, animations, and other resources) are loaded conditionally, which is when the control needs to be displayed.

[0093] The main purpose of this solution is to prevent the loading of configuration images, animations and other resources of controls that do not need to be displayed immediately when the application page starts. When these controls need to be displayed, they are dynamically loaded to achieve the purpose of on-demand loading. This can significantly reduce CPU consumption and memory usage, shorten page loading time, and significantly improve page startup speed.

[0094] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides an application page startup device.

[0095] refer to Figure 3 The application page startup device includes: an acquisition module 310, which is used to obtain the layout file of the target page in response to the startup instruction of the target page; a loading module 320, which is used to load the layout information of all controls in the target page into the memory according to the layout file; a determination module 330, which is used to determine the first type of controls with visible attributes among all the controls; a control module 340, which is used to control the configuration resources of the first type of controls to be loaded into the memory; and a display module 350, which is used to render the first type of controls of the target page according to the layout information and configuration resources of the first type of controls in the memory.

[0096] Among them, the loading module 320 is specifically used to: parse the layout file to determine the control tag, layout information of the control tag, attribute information of the control tag and configuration resource identification information of the control tag in the layout file; create a control object according to the control tag, and set the layout information of the control tag to the corresponding control object; set the attribute information and configuration resource identification information of the control tag to the corresponding control object.

[0097] Furthermore, the determining module 330 is specifically configured to: determine the first type of controls with visible attributes according to the attribute information of the control tag; or determine the first type of controls with visible attributes according to the return value of a preset function in the control object.

[0098] Furthermore, the control module 340 is specifically configured to: store the corresponding configuration resource into the memory according to the configuration resource identification information through the control object of the first type of control.

[0099] Furthermore, it also includes a dynamic loading module for controlling the loading of configuration resources of the second type of controls into the memory through the control object of the second type of controls in response to the detection of display instructions of the second type of controls through the control object of the second type of controls; the display module 350 is also used to render the second type of controls according to the layout information and configuration resources of the second type of controls in the memory.

[0100] Furthermore, the acquisition module 310 is configured to acquire the layout file of the target page from a specified storage path.

[0101] For the convenience of description, the above devices are described as being divided into various modules according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0102] The apparatus of the above embodiment is used to implement the corresponding application page startup method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0103] For the convenience of description, the above devices are described as being divided into various modules according to their functions. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0104] The apparatus of the above embodiment is used to implement the corresponding application page startup method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.

[0105] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 4 As shown, the electronic device 500 includes one or more processors 501 and a memory 502 .

[0106] The processor 501 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 500 to perform desired functions.

[0107] The memory 502 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may, for example, include read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 501 may run the program instructions to implement the application page startup method and / or other desired functions of any embodiment of the present application described above. Various contents such as initial external parameters, thresholds, etc. may also be stored in the computer-readable storage medium.

[0108] In one example, the electronic device 500 may further include an input device 503 and an output device 504, which are interconnected via a bus system and / or other connection mechanisms (not shown). The input device 503 may include, for example, a keyboard, a mouse, etc. The output device 504 may output various information to the outside, including warning information, braking force, etc. The output device 504 may include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto.

[0109] Of course, to simplify, Figure 4 Only some of the components related to the present application in the electronic device 500 are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, the electronic device 500 may further include any other appropriate components according to specific application scenarios.

[0110] In addition to the above methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the application page startup method provided by any embodiment of the present application.

[0111] The computer program product may be written in any combination of one or more programming languages ​​to implement the program code for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0112] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the processor executes the steps of the application page startup method provided by any embodiment of the present application.

[0113] The computer-readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can, for example, include but is not limited to a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0114] It should be noted that the terms used in this application are only for describing specific embodiments and are not intended to limit the scope of this application. As shown in the specification and claims of this application, unless the context clearly indicates an exception, the words "one", "an", "a kind of" and / or "the" do not specifically refer to the singular and may also include the plural. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method or device comprising 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 or device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the presence of other identical elements in the process, method or device comprising the elements.

[0115] It should also be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on this application. Unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", etc. should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be a communication between the internal parts of two elements. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0116] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. The above is only the preferred implementation method of this application. It should be pointed out that due to the limitations of textual expression, there are objectively infinite specific structures. For ordinary technicians in this technical field, without departing from the principles of the present invention, they can also make several improvements, modifications or changes, and can also combine the above technical features in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the scope of protection of this application.

Claims

1. A method for starting an application page, characterized in that: include: In response to a start instruction of a target page, obtaining a layout file of the target page; Loading the layout information of all controls in the target page into memory according to the layout file; Determine a first type of control having a visible attribute among all the controls; Controlling the configuration resources of the first type of controls to be loaded into memory; The first type of controls on the target page are rendered according to the layout information of the first type of controls in the memory and the configuration resources.

2. The method according to claim 1, characterized in that The step of loading layout information of all controls in the target page into memory according to the layout file includes: Parsing the layout file to determine the control tag, layout information of the control tag, attribute information of the control tag, and configuration resource identification information of the control tag in the layout file; A control object is created according to the control tag, and layout information of the control tag is set to the corresponding control object.

3. The method according to claim 2, characterized in that After creating the control object according to the control tag, the method further includes: Set the property information and configuration resource identification information of the control tag to the corresponding control object.

4. The method according to claim 1, wherein The determining of the first type of controls having visible attributes among all the controls includes: Determine the first type of control with visible attributes according to the attribute information of the control tag; Alternatively, the first type of control with the visible attribute is determined according to the return value of a preset function in the control object.

5. The method according to claim 1, characterized in that The step of controlling the configuration resources of the first type of controls to be loaded into the memory includes: Through the control object of the first type of control, the corresponding configuration resource is stored in the memory according to the configuration resource identification information.

6. The method according to claim 1, characterized in that After rendering the first type of controls on the target page according to the layout information of the first type of controls in the memory and the configuration resources, the method further includes: In response to detecting a display instruction of the second-type control through the control object of the second-type control, controlling the configuration resource of the second-type control to be loaded into the memory through the control object of the second-type control; The second-type controls are rendered according to the layout information of the second-type controls in the memory and the configuration resources; wherein the second-type controls are controls with non-visible properties.

7. The method according to claim 1, characterized in that The obtaining of the layout file of the target page includes: Obtain the layout file of the target page from the specified storage path.

8. An application page startup device, characterized in that: include: an acquisition module, configured to acquire a layout file of a target page in response to a startup instruction of the target page; A loading module, configured to load the layout information of all controls in the target page into memory according to the layout file; A determination module, configured to determine a first type of control having a visible attribute among all the controls; A control module, configured to control the configuration resources of the first type of controls to be loaded into a memory; The display module is configured to render the first type of controls on the target page according to the layout information of the first type of controls in the memory and the configuration resources.

9. An electronic device, characterized in that: The electronic device comprises: processor and memory; The processor is configured to execute the steps of the application page startup method according to any one of claims 1 to 7 by calling the program or instruction stored in the memory.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the application page startup method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Page generation method and device

    CN110187878A

  • Skeleton screen generation method and device, terminal equipment and storage medium

    CN114237589A

  • Page display method and device, electronic equipment and storage medium

    CN115203615A

  • Postponed rendering of select web page elements

    US20130212465A1