Page loading method and device, electronic equipment and computer readable storage medium
By obtaining business data and rendering framework, and using business controllers to load waterfall flow cards, the problems of card dependency and insufficient diversity in waterfall flow page loading are solved, the diversity and scalability of waterfall flow pages are achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202510757910.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-09-12
AI Technical Summary
The existing waterfall page loading technology has problems such as strong rendering dependencies between cards, no support for dynamic loading, and insufficient diversity.
By obtaining the business data and rendering framework of the target business module, using the business controller to load the business data into the waterfall flow card, and responding to the waterfall flow page refresh operation to load the card, the diversity and scalability of the waterfall flow card can be achieved.
It realizes the card diversity and scalability of the waterfall flow page, reduces the complexity of card access or offline, and improves the user experience.
Smart Images

Figure CN120632238A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to the technical fields of web page generation, web page layout, etc. Specifically, the present disclosure relates to a page loading method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the development of Internet technology, more and more businesses in various industries are transferred to the Internet, resulting in more and more business demands carried by the Internet. Therefore, a more efficient business display form is needed on the Internet so that pages can display business more efficiently. Summary of the Invention
[0003] The present disclosure provides a page loading method and device, an electronic device, and a computer-readable storage medium.
[0004] According to a first aspect of the present disclosure, a page loading method is provided, the method comprising:
[0005] Obtaining business data of a target business module and a rendering framework corresponding to the target business module; the rendering framework at least includes a business controller implemented based on a page basic framework and encapsulated by a protocol corresponding to the page basic framework;
[0006] Loading the business data into the waterfall card based on the business controller;
[0007] In response to the waterfall page refresh operation, the waterfall card is loaded into the waterfall page.
[0008] According to a second aspect of the present disclosure, a page loading device is provided, the device comprising:
[0009] A data acquisition module is used to acquire the business data of a target business module and a rendering framework corresponding to the target business module; the rendering framework at least includes a business controller implemented based on a page basic framework and encapsulated by a protocol corresponding to the page basic framework;
[0010] A data loading module, configured to load the business data into a waterfall card based on the business controller;
[0011] The page module is used to load the waterfall card into the waterfall page in response to a waterfall page refresh operation.
[0012] According to a third aspect of the present disclosure, an electronic device is provided, including:
[0013] at least one processor; and
[0014] A memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute the page loading method.
[0016] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute the above-mentioned page loading method.
[0017] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, which implements the above-mentioned page loading method when executed by a processor.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.
[0020] Figure 1 This is a flow chart of a page loading method provided by an embodiment of the present disclosure;
[0021] Figure 2 This is a schematic diagram of the preloading process of the page loading method provided by an embodiment of the present disclosure after a cold start of an application program;
[0022] Figure 3 This is a schematic diagram of the preloading process of the page loading method provided by the embodiment of the present disclosure after the waterfall flow page data is successfully pulled;
[0023] Figure 4 This is a schematic diagram of a thumbnail preloading process using a page loading method provided by an embodiment of the present disclosure;
[0024] Figure 5 This is a schematic diagram of the execution process of the page loading method provided by the embodiment of the present disclosure during the application execution cycle;
[0025] Figure 6 This is a structural diagram of a page loading device provided by an embodiment of the present disclosure;
[0026] Figure 7 It is a block diagram of an electronic device used to implement the page loading method of an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0028] In some related technologies, waterfall pages can be used to improve the efficiency of business presentation and user browsing. Waterfall pages (also known as waterfall layouts or Pinterest-style layouts) dynamically arrange business content in the form of cards of equal width and unequal height, creating a staggered visual effect similar to a waterfall.
[0029] Compared to traditional web pages, waterfall pages can automatically load new content, eliminating the interruptions to user browsing caused by paging, and increasing user browsing depth. Furthermore, waterfall pages create a sense of visual surprise through staggered layouts, breaking grid fatigue, extending the human eye's scanning path, and increasing user attention span.
[0030] In related technologies, there are two main waterfall flow implementation schemes: one based on custom list layout and the other based on synchronous scrolling of multiple vertical lists.
[0031] Multiple vertical list layouts require loading a large amount of data at once to determine the position of cards in the list, and the rendering of cards is highly dependent on each other. Custom list layouts only support a single type of card and do not support dynamic loading of card data.
[0032] The page loading method and device, electronic device, and computer-readable storage medium provided by the embodiments of the present disclosure are intended to solve at least one of the above technical problems in the prior art.
[0033] The page loading method provided in the embodiments of the present disclosure can be executed by an electronic device such as a terminal device or a server. The terminal device can be an in-vehicle device, a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, etc. The method can be implemented by a processor calling computer-readable program instructions stored in a memory. Alternatively, the method can be executed by a server.
[0034] Figure 1 FIG. 1 shows a flow chart of a page loading method provided by an embodiment of the present disclosure. Figure 1As shown in , the page loading method provided by the embodiment of the present disclosure includes steps S110, S120, and S130.
[0035] S110, obtaining business data of a target business module and a rendering framework corresponding to the target business module;
[0036] The rendering framework is pre-registered and implemented, which at least includes implementation based on the page basic framework and is encapsulated through a protocol corresponding to the page basic framework.
[0037] The business controller is the core execution unit of business logic. It plays a critical role in connecting the upper and lower layers of the layered architecture. Its primary value lies in separating complex and volatile business rules from the underlying technical implementation and top-level user interface, significantly improving code maintainability, testability, and scalability. Its core responsibility is to encapsulate and process logic specific to a business domain, acting as a coordinator between the presentation layer (such as the user interface and API endpoints) and the domain model / service layer.
[0038] Specifically, the business controller receives input data related to the business domain corresponding to the business module that has been preliminarily verified, that is, business data, and implements a complete business operation by orchestrating the interactions between objects and services of multiple basic frameworks.
[0039] In some possible implementations, the page infrastructure framework includes the basic objects, basic services, and basic UI (User Interface) for implementing waterfall pages. The protocol corresponding to the page infrastructure framework is the encapsulation protocol defined by the waterfall page infrastructure framework. This protocol encapsulates the business operations implemented by orchestrating the interactions between multiple infrastructure objects and services into directly callable framework objects, namely, the rendering framework's business controller.
[0040] Different business modules can pre-implement their business requirements through the basic objects and basic services of the basic framework through traditional controllers, and encapsulate the implementation based on the encapsulation protocol defined by the basic framework to generate the business controller corresponding to the business module, so as to realize the registration of the business module in the basic framework, so that after receiving the business data of the business module, the rendering framework corresponding to the business module registered in the basic framework can be directly called.
[0041] In some possible implementations, business data may include text data or image data. Therefore, the objects of the basic framework include character objects and image objects, and the services corresponding to the basic framework include processing services for characters and image objects.
[0042] In some possible implementations, obtaining the business data of the target business module may be receiving the business data of the target business module, and obtaining the rendering framework corresponding to the target business module may be based on the business identifier of the target business module, querying multiple rendering frameworks generated based on the basic framework, and obtaining the rendering framework corresponding to the target business module.
[0043] The business data of the target business module may be specific data pushed by the target business module based on user portraits and user interests.
[0044] S120. Load the business data into the waterfall card based on the business controller.
[0045] Run the business controller corresponding to the target business module to load the business data into a waterfall card by orchestrating the interactions between objects and services of multiple basic frameworks, and generate a waterfall card corresponding to the business data.
[0046] In some possible implementations, steps S110 and S120 may be repeatedly performed to receive business data from different business modules and generate multiple waterfall flow cards, or multiple business data from the same business module may be received and multiple waterfall flow cards may be generated.
[0047] Among them, waterfall flow cards are components of waterfall flow pages. The relationship between waterfall flow cards and waterfall flow pages is the relationship between the whole and the part, the container and the content. They work closely together in dynamic UI rendering to achieve efficient data display and user experience.
[0048] In some possible implementations, step S110 and step S120 may also be executed in parallel on multiple execution units to receive business data from different business modules and generate multiple waterfall flow cards, and / or receive multiple business data from the same business module and generate multiple waterfall flow cards.
[0049] S130. In response to the waterfall page refresh operation, the waterfall card is loaded into the waterfall page.
[0050] The waterfall page refresh operation may include generating a new waterfall page, or updating some waterfall cards on the waterfall page based on the existing waterfall page.
[0051] In some possible implementations, loading the waterfall card into the waterfall page may be determining the position of the waterfall card on the waterfall page, and loading the waterfall card into the corresponding position on the waterfall page.
[0052] In the page loading method provided in the embodiment of the present invention, the business data corresponding to the business module is loaded into the waterfall card through the rendering framework corresponding to the business module, so as to realize different waterfall cards for different business modules, thereby realizing the diversity and scalability of the waterfall cards of the waterfall page; at the same time, since the generated waterfall cards are based on the business data and the basic framework of the page, different waterfall cards are completely isolated and independent of each other, which reduces the complexity of accessing or offline of the waterfall cards and realizes zero-cost plug-in and unplugging.
[0053] The following is a detailed introduction to the page loading method provided by the embodiment of the present disclosure.
[0054] In some possible implementations, the rendering framework also includes a UI style implemented based on the page base framework and encapsulated through a protocol corresponding to the page base framework, that is, a user interface style.
[0055] In some possible implementations, the page basic framework includes basic objects, basic services, basic UI (User Interface), etc. for implementing the waterfall page. The protocol corresponding to the page basic framework is the encapsulation protocol defined by the waterfall page basic framework.
[0056] Different business modules send the user interface requirements of the business modules to the page basic framework, meet the user interface requirements by combining the basic UI of the page basic framework, generate a new UI style, and encapsulate the UI style using the encapsulation protocol defined by the waterfall page basic framework to generate the corresponding user interface style of the business module, so as to realize the registration of the business module in the basic framework, so that after receiving the business data of the business module, the rendering framework corresponding to the business module registered in the basic framework can be directly called to render the business data.
[0057] In some possible implementations, the business data may include text data or image data. Therefore, the basic UI of the basic framework includes basic UI implementations for characters and basic UI implementations for images.
[0058] In some possible implementations, loading business data into a waterfall card based on a business controller includes: loading business data based on a business controller, rendering business data based on a user interface style, and loading the rendered business data into a waterfall card.
[0059] That is to say, after obtaining the business data, the business data is loaded based on the business controller, the UI corresponding to the business data is implemented based on the UI style, and the UI corresponding to the business data is loaded and displayed in the waterfall flow card.
[0060] In some possible implementations, the rendering framework further includes a data structure model. The data structure model includes at least a plurality of business data components, each of which may be a business function corresponding to the business data, such as a title, a subtitle, and the like.
[0061] The user interface style includes the user interface style corresponding to part or all of the business data components, that is, the user interface style includes multiple UI implementations, each UI implementation corresponds to a business data component, and is the UI implementation of the data corresponding to the business data component, such as the UI implementation corresponding to the title and the UI implementation corresponding to the subtitle.
[0062] After obtaining the business data of the target business module and the rendering framework corresponding to the target business module, the business data can be split into multiple business sub-data based on the data structure model. Each business sub-data corresponds to a business data composition. For the data corresponding to the business data composition, the business sub-data corresponding to the business data composition is rendered based on the user interface style corresponding to the business data composition.
[0063] That is to say, after obtaining the business data, the business data is split into business sub-data according to the business functions corresponding to the business data. Each business sub-data is used to implement a business function, such as title data is used to implement the title function, subtitle data is used to implement the subtitle function, and main text data is used to implement the main text function. According to the business function implemented by each business sub-data, the UI implementation corresponding to the business sub-data is determined, and the business sub-data is rendered based on the UI implementation, and the business sub-data is displayed in the waterfall flow card in the form of the UI implementation.
[0064] In some possible implementations, while obtaining the service data, the user interaction corresponding to the service data may also be obtained, wherein the user interaction may be a service that needs to be executed in response to a user interaction operation.
[0065] After obtaining the business interaction corresponding to the business data, the execution flow of the business logic corresponding to the user interaction can be implemented based on the business controller, that is, the execution flow of the business logic corresponding to the business that needs to be executed in response to the user interaction operation, and the business data and execution flow are loaded into the waterfall flow card so that the waterfall flow card can respond to the user interaction and execute the execution flow of the business logic corresponding to the user interaction.
[0066] In some possible implementations, some business logic execution flows can be pre-implemented based on the page basic framework, that is, some business logic execution flows can be pre-implemented based on the basic objects and basic services of the page basic framework and encapsulated in the business controller.
[0067] When obtaining the business interaction corresponding to the business data, you can directly call the execution flow of the business logic in the business controller and bind the execution flow to the business interaction to realize the loading of the execution flow.
[0068] The following is a specific example of how to generate waterfall cards.
[0069] For a business module, its corresponding business requirements are abstracted into a unified business model, which includes:
[0070] 1. Unique identifier of the business module
[0071] Each business module is assigned a unique 6-digit identifier. The first three digits represent the direction of all businesses based on the team to which they belong, for example: Operations - 100, Commerce - 200, Basic Experience - 300, etc. The last three digits represent the number of the business direction, for example: Operations Homepage Ad Space - 100001, Commerce Membership Purchase Module - 200001, etc.
[0072] 2. Common business data structure
[0073] Define common business data structures for waterfall rendering and unified business interactions, such as card ID, card type, card extended information, title, subtitle, thumbnail, label, etc.
[0074] Implement the registration of business modules in the basic framework according to the business model. Specifically, based on the business data structure, implement the corresponding UI implementation for each business data component, that is, implement the corresponding UI implementation of the title, subtitle, thumbnail, label, etc., and encapsulate the UI implementation through the encapsulation protocol defined by the waterfall flow page basic framework to obtain the user interface style.
[0075] Determine the business operations corresponding to the business modules based on the business data structure of the business modules, implement the business operations by orchestrating the interactions between objects and services of multiple basic frameworks, and encapsulate the business operations through the encapsulation protocol defined by the waterfall page basic framework.
[0076] Pre-implement the execution flow of some business logic based on the page basic framework, that is, pre-implement the execution flow of some business logic based on the basic objects and basic services of the page basic framework, and encapsulate it through the encapsulation protocol defined by the waterfall flow page basic framework.
[0077] Business operations and execution flows are encapsulated in business controllers.
[0078] Based on the unique identifier of the business module, the business data structure, user interface style, and business controller are registered in the basic framework. During the registration process, the business module is filtered based on business operations, etc., and illegal businesses are filtered out. The business data structure, user interface style, and business controller corresponding to the business module that meets the requirements are registered as the rendering framework corresponding to the business module, and the rendering framework is corresponded to the unique identifier of the business module.
[0079] After obtaining the business data of the target business module, the rendering framework corresponding to the target business module is obtained based on the unique identifier of the target business module, and the loading of the business data is implemented based on the business controller; based on the business data structure, the business data is split into multiple business sub-data, and the business sub-data corresponding to the business data composition is rendered based on the user interface style corresponding to the business data composition; the user interaction corresponding to the business data is obtained, and the execution flow of the business logic corresponding to the user interaction is implemented based on the business controller, and the waterfall flow card is obtained.
[0080] In some specific implementations, some common data structures, user interface implementations, and business controllers will be preset based on the framework to support the generation of waterfall flow cards based on common data structures, user interface implementations, and business controllers when some regular business modules do not have corresponding rendering frameworks registered.
[0081] In some possible implementations, the page loading method provided by the embodiments of the present disclosure provides a data preloading mechanism to enhance user experience.
[0082] Specifically, in response to the waterfall page preloading operation, obtaining at least one business data and a corresponding rendering framework;
[0083] The waterfall page preloading operation is the initialization of the application where the waterfall page is located or the successful loading of other waterfall pages by the application where the waterfall page is located.
[0084] In some specific implementation methods, after the application where the waterfall flow page is located is cold started, during the initialization of the application, the waterfall flow page data is preloaded at the same time, that is, the business data is obtained and loaded into the waterfall flow card. Before the waterfall flow page is displayed, the waterfall flow page data has been prepared. After the application initialization is completed, the waterfall flow card is directly displayed in the corresponding position to display the waterfall flow page.
[0085] Cold start and hot start are two different startup modes. A cold start starts an application from scratch (i.e., the process does not exist in memory), such as the first time an application is started after a device restart, after being forcibly closed by the system, or after being cleared by the system after being unused for a long time. A hot start reactivates an application while its process is still running in the background, such as by quickly returning to the application after exiting it by pressing the Home button or by switching back to the application through the recent task.
[0086] Figure 2 FIG2 shows a flow chart of the preloading mechanism of the page loading method provided by the embodiment of the present disclosure after the application where the waterfall flow page is located is cold started in some specific implementations, such as Figure 2 As shown, the process of the data preloading mechanism may include the following steps:
[0087] S21. In response to a cold start of the application, business data is obtained and loaded into a waterfall card based on a corresponding rendering framework to implement pre-fetching of the waterfall card.
[0088] Among them, the application is the application where the waterfall flow page is located. The embodiment of the present disclosure does not limit the type of application. Any application that can display the waterfall flow page is within the protection scope of the embodiment of the present disclosure.
[0089] A cold start occurs when an application is started completely from scratch (i.e., the process does not exist in memory), such as when the application is started for the first time after a device restart, when the application is started after being forcibly closed by the system, or when the application is started after being cleared by the system after being unused for a long time.
[0090] The specific method of obtaining business data and loading the business data into the waterfall flow card based on the corresponding rendering framework is as described in steps S110 and S120, which will not be repeated here.
[0091] S22. Cache the waterfall card locally.
[0092] Specifically, the obtained waterfall flow cards can be stored in the local cache of the device where the application is located (such as a mobile phone, computer, etc.), such as the device memory.
[0093] S23. In response to the application entering the application homepage, the waterfall flow card is read from the local cache and loaded into the corresponding position of the waterfall flow page to generate the waterfall flow page.
[0094] The application entering the application homepage may refer to the application being successfully started.
[0095] Loading the waterfall flow cards to the corresponding positions of the waterfall flow page can be performed by determining the position of each waterfall flow card according to the layout of the waterfall flow page, and loading it to the corresponding position to generate the waterfall flow page.
[0096] S24. Display the waterfall flow page in the application.
[0097] That is, the obtained waterfall flow page is displayed on the front end of the application.
[0098] In some possible implementations, after the waterfall page data is successfully pulled, the next waterfall page data is immediately pulled and preloaded in advance.
[0099] Figure 3 A flow chart of the process of pulling the next waterfall page data and preloading it in advance is shown in some specific embodiments. Figure 3 As shown, pulling the next waterfall page data and preloading it in advance can include the following steps:
[0100] S31. The application where the waterfall flow page is located successfully loads other waterfall flow pages.
[0101] Among them, other waterfall flow pages may refer to other waterfall flow pages except the waterfall flow page corresponding to the waterfall flow card (that is, the waterfall flow page to which the waterfall flow card will be loaded).
[0102] Successfully loading another waterfall flow page can cause the waterfall flow page to be displayed on the front end of the application.
[0103] S32: Determine whether there is a next waterfall page on the current page.
[0104] Specifically, it is determined whether the current page has a next waterfall page by determining whether the current page is the last page.
[0105] S33. If the next waterfall page exists on the current page, preload the next waterfall page.
[0106] Specifically, when the application where the waterfall page is located successfully loads other waterfall pages, and when the next waterfall page exists on the current page, while displaying the waterfall page, steps S110 and S120 are immediately repeated to pre-pull the waterfall page data, that is, the waterfall card, to pre-pull the next waterfall page data and pre-load the next waterfall page.
[0107] S34. In response to the page scrolling operation, the next waterfall flow page is loaded and displayed.
[0108] In this way, when the user performs a page scrolling operation through an interactive device such as a mouse and needs to load a new waterfall flow page (i.e., the next waterfall flow page in step S33), the preloaded waterfall flow card is directly read and displayed at the position corresponding to the card, displaying the new waterfall flow page.
[0109] In some possible implementations, thumbnails corresponding to the images may be displayed in real time to enhance user experience.
[0110] Figure 4 A schematic diagram of a process for displaying thumbnails corresponding to pictures in real time in some specific embodiments is shown. Figure 4 As shown, real-time display of thumbnails corresponding to images may include the following steps:
[0111] S41. Load business data into the waterfall card to implement data pre-fetching.
[0112] S42. Traverse the waterfall flow cards. If the waterfall flow cards include picture data, obtain the thumbnail corresponding to the picture data and preload the thumbnail.
[0113] Specifically, after loading the business data into the waterfall card, that is, realizing data pre-pulling, the waterfall card is immediately traversed while displaying the waterfall card. When the waterfall card includes image data, the thumbnail corresponding to the image data is obtained and the thumbnail is preloaded.
[0114] S43. Load the waterfall flow card to the corresponding position of the waterfall flow page, generate and display the waterfall flow page.
[0115] Determine the position of each waterfall card according to the layout of the waterfall page, and load it to the corresponding position to generate the waterfall page.
[0116] Among them, step S42 and step S43 can be executed simultaneously or successively. The embodiment of the present disclosure does not impose any limitation on the execution order of step S42 and step S43.
[0117] S44: Load and display thumbnails corresponding to the image data.
[0118] When a user clicks on an image of a displayed waterfall card, a thumbnail can be loaded and the thumbnail corresponding to the image can be displayed in real time to improve the user experience.
[0119] In some possible implementations, the page loading method provided by the embodiments of the present disclosure provides multiple waterfall page refresh strategies.
[0120] Based on the characteristics of mobile systems and different user interaction behaviors, five data refresh opportunities are provided: application cold start, user pull-down refresh, remote message notification, user hot start, and user pull-down refresh.
[0121] In some possible implementations, in response to a waterfall page refresh operation, the process returns to executing the steps of obtaining the business data of the target business module and the rendering framework corresponding to the target business module, i.e., re-executing the page loading method provided in the embodiment of the present disclosure to generate a new waterfall page.
[0122] Among them, the waterfall flow page refresh operation is one of cold starting the application where the waterfall flow page is located, pulling down to display other waterfall flow pages of the application where the waterfall flow page is located, and receiving application notification.
[0123] In other words, the business data corresponding to the waterfall flow will be reset when the application is cold started, when the application is pulled to refresh, and when a remote message is notified, and the remote application is notified, and a new waterfall flow page is generated. Therefore, it is necessary to re-execute steps S110 and S120 to obtain multiple waterfall flow cards, calculate the position of each waterfall flow card in the multiple waterfall flow cards, load these waterfall flow cards to the corresponding position, and generate a new waterfall flow page.
[0124] The remote message notification may be a notification that illegal content exists on the waterfall page, etc. The pull-down refresh may be a notification that the user has pulled down the application page.
[0125] In some possible implementations, in response to a waterfall page refresh operation, a corresponding position of the waterfall card on the waterfall page currently displayed by the waterfall application is calculated, and the waterfall card is loaded to the corresponding position of the waterfall page currently displayed by the waterfall application;
[0126] Among them, the waterfall flow application is the application where the waterfall flow page is located; the waterfall flow page refresh operation is to hot start the waterfall flow application or pull up the waterfall flow page currently displayed by the waterfall flow application.
[0127] In other words, hot starting or pulling up the app will not reset the business data corresponding to the waterfall flow. Instead, it will append new business data, that is, add a new waterfall flow card to the waterfall flow page. Therefore, you only need to determine the position of the new waterfall flow card on the waterfall flow page and load it to the corresponding position.
[0128] Figure 5 FIG. 1 shows a schematic diagram of the execution process of the page loading method provided by the embodiment of the present disclosure during the application execution cycle, as shown in FIG. Figure 5 As shown, the execution process of the page loading method provided by the embodiment of the present disclosure includes:
[0129] S501: The application is cold started and a blank page is displayed.
[0130] Among them, a cold start is when an application is started completely from scratch (that is, the process does not exist in memory), such as when the application is started for the first time after the device is restarted, when the application is started after being forcibly closed by the system, or when the application is started after being cleaned up by the system after being unused for a long time.
[0131] S502: Acquire business data of a target business module and a rendering framework corresponding to the target business module.
[0132] S503: Rendering is performed based on the rendering framework of the target business module, and the business data is loaded into the waterfall flow card.
[0133] After a cold start of the application, a blank page is displayed, business data is obtained, and rendering is performed based on the rendering framework to generate waterfall cards. The generated waterfall cards are used to refresh the cache and cache the waterfall cards. The process of obtaining business data, rendering based on the rendering framework, and generating waterfall cards is as described in steps S110 and S120 and is not further described here.
[0134] S504: The application is hot-started, and the waterfall flow card is read from the cache and loaded into the corresponding position of the waterfall flow page to generate the waterfall flow page.
[0135] Among them, hot restart means that the application is reactivated while the application process is still running in the background, such as quickly returning after exiting the application by pressing the Home button, returning to the application through the recent task switch, etc.
[0136] S505: Acquire the business data of the target business module and the rendering framework corresponding to the target business module.
[0137] S506: Rendering is performed based on the rendering framework of the target business module, and the business data is loaded into the waterfall flow card.
[0138] When the waterfall page needs to be displayed during hot start of the application, the cache is read, the position of each waterfall card is determined according to the layout of the waterfall page, and it is loaded to the corresponding position to generate the waterfall page. At the same time, the business data is obtained again and rendered based on the rendering framework to generate waterfall cards. The cache is refreshed using the generated waterfall cards, and the steps of caching the waterfall cards are performed to preload the next page.
[0139] S507: In response to the user executing a pull-down refresh operation, business data of the target business module and a rendering framework corresponding to the target business module are obtained, and rendering is performed based on the rendering framework to generate a waterfall card.
[0140] S508: Rendering is performed based on the rendering framework of the target business module, and the business data is loaded into the waterfall flow card.
[0141] In response to the user performing a pull-down refresh operation, the business data corresponding to the waterfall flow needs to be reset and a new waterfall flow page is generated. Therefore, the business data is obtained again, and rendering is performed based on the rendering framework to generate waterfall flow cards. The cache is refreshed using the generated waterfall flow cards, the waterfall flow cards are cached, and a new waterfall flow page step is generated based on the generated waterfall flow cards, that is, re-rendering.
[0142] S509: In response to the user executing a pull-up loading operation, the business data of the target business module and the rendering framework corresponding to the target business module are obtained, and rendering is performed based on the rendering framework to generate a waterfall card.
[0143] S510: Rendering is performed based on the rendering framework of the target business module, the business data is loaded into the waterfall card, the position of the waterfall card on the current waterfall page is calculated, and the card is loaded into the current waterfall page.
[0144] In response to the user's pull-up loading operation, there is no need to generate a new waterfall page. Instead, the waterfall card in the cache is read, the position of the waterfall card in the current waterfall page is calculated, and it is loaded into the current waterfall page, that is, additional rendering. At the same time, business data is obtained and rendered based on the rendering framework to generate waterfall cards. The generated waterfall cards are used to refresh the cache and cache the waterfall cards.
[0145] S511: Receive remote message notification.
[0146] S512: Acquire the business data of the target business module and the rendering framework corresponding to the target business module.
[0147] S513: Rendering is performed based on the rendering framework of the target business module, and the business data is loaded into the waterfall flow card.
[0148] In response to receiving a remote notification, it is necessary to reset the business data corresponding to the waterfall flow and generate a new waterfall flow page. Therefore, the business data is obtained again, and rendering is performed based on the rendering framework to generate waterfall flow cards. The cache is refreshed using the generated waterfall flow cards, the waterfall flow cards are cached, and a new waterfall flow page step is generated based on the generated waterfall flow cards, that is, re-rendering.
[0149] It should be emphasized that the page loading method provided by the embodiment of the present disclosure may include some or all of the steps described above, and its specific execution process does not necessarily have to be strictly performed in accordance with the above steps.
[0150] Based on Figure 1The same principle as shown in the method, Figure 6 A schematic diagram of the structure of a page loading device provided by an embodiment of the present disclosure is shown. Figure 6 As shown, the page loading device 60 may include:
[0151] The data acquisition module 610 is used to acquire the business data of the target business module and the rendering framework corresponding to the target business module; the rendering framework at least includes a business controller implemented based on the page basic framework and encapsulated by the protocol corresponding to the page basic framework;
[0152] The data loading module 620 is used to load business data into the waterfall card based on the business controller;
[0153] The page module 630 is used to load the waterfall card into the waterfall page in response to the waterfall page refresh operation.
[0154] In the page loading device provided in the embodiment of the present invention, the business data corresponding to the business module is loaded into the waterfall card through the rendering framework corresponding to the business module, so as to realize different waterfall cards for different business modules, thereby realizing the diversity and scalability of the waterfall cards of the waterfall page; at the same time, since the generated waterfall cards are based on the business data and the basic framework of the page, different waterfall cards are completely isolated and independent of each other, which reduces the complexity of accessing or offline of the waterfall card and realizes zero-cost plug-in and unplugging.
[0155] In some possible implementations, the rendering framework also includes a user interface style implemented based on the page basic framework and encapsulated through the protocol corresponding to the page basic framework; the data loading module is specifically used to: load business data based on the business controller, render business data based on the user interface style, and load the rendered business data into the waterfall flow card.
[0156] In some possible implementations, the rendering framework also includes a data structure model; the data structure model includes multiple business data components; the user interface style includes a user interface style corresponding to at least part of the business data components; the data acquisition module is also used to: based on the data structure model, split the business data into multiple business sub-data, each business sub-data corresponds to a business data component, and is the data corresponding to the business data component; the data loading module is specifically used to: render the business sub-data corresponding to the business data component based on the user interface style corresponding to the business data component.
[0157] In some possible implementations, the page loading device also includes: a user interaction module, which is specifically used to: obtain user interactions corresponding to business data; implement the execution flow of business logic corresponding to user interactions based on the business controller, and load the business data and execution flow into the waterfall flow card, so that the waterfall flow card can respond to user interactions and execute the execution flow of business logic corresponding to user interactions.
[0158] In some possible implementations, the data acquisition module is specifically used to: obtain at least one business data and a corresponding rendering framework in response to a waterfall page preloading operation; wherein the waterfall page preloading operation is the initialization of the application where the waterfall page is located or the application where the waterfall page is located successfully loads other waterfall pages.
[0159] In some possible implementations, the page module is specifically used to: respond to a waterfall page refresh operation, return to execute and obtain the business data of the target business module and the rendering framework corresponding to the target business module; wherein the waterfall page refresh operation is one of cold starting the application where the waterfall page is located, pulling down to display other waterfall pages of the application where the waterfall page is located, and receiving an application notification.
[0160] In some possible implementations, the page module is specifically used to: respond to a waterfall page refresh operation, calculate the corresponding position of the waterfall card in the waterfall page currently displayed by the waterfall application, and load the waterfall card to the corresponding position of the waterfall page currently displayed by the waterfall application; wherein the waterfall application is the application where the waterfall page is located; the waterfall page refresh operation is to hot start the waterfall application or pull up the waterfall page currently displayed by the waterfall application.
[0161] It is understandable that the above modules of the page loading device in the embodiment of the present disclosure have the function of implementing Figure 1 The functions of the corresponding steps of the page loading method in the embodiment shown in . This function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. The above modules can be software and / or hardware, and the above modules can be implemented separately or integrated with multiple modules. For the functional description of each module of the above page loading device, please refer to Figure 1 The corresponding description of the page loading method in the embodiment shown in is not repeated here.
[0162] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0163] In the technical solution disclosed herein, the user's authorization or consent is obtained before obtaining or collecting the user's personal information.
[0164] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0165] The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the page loading method provided in the embodiment of the present disclosure.
[0166] Compared with the existing technology, this electronic device loads the business data corresponding to the business module into the waterfall card through the rendering framework corresponding to the business module, so as to realize different waterfall cards for different business modules, and realize the diversity and scalability of waterfall cards of waterfall pages; at the same time, since the generated waterfall cards are based on business data and the basic framework of the page, different waterfall cards are completely isolated and independent of each other, which reduces the complexity of accessing or offline of waterfall cards and realizes zero-cost plug-in and unplugging.
[0167] The readable storage medium is a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the page loading method provided in the embodiment of the present disclosure.
[0168] Compared with the existing technology, this readable storage medium loads the business data corresponding to the business module into the waterfall card through the rendering framework corresponding to the business module, so as to realize different waterfall cards for different business modules, thereby realizing the diversity and scalability of the waterfall cards of the waterfall page; at the same time, since the generated waterfall cards are based on business data and the basic framework of the page, different waterfall cards are completely isolated and independent of each other, which reduces the complexity of accessing or offline of waterfall cards and realizes zero-cost plug-in and unplugging.
[0169] The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the page loading method provided in the embodiment of the present disclosure.
[0170] Compared with the existing technology, this computer program product loads the business data corresponding to the business module into the waterfall card through the rendering framework corresponding to the business module, so as to realize different waterfall cards for different business modules, thereby realizing the diversity and scalability of the waterfall cards of the waterfall page; at the same time, since the generated waterfall cards are based on business data and the basic framework of the page, different waterfall cards are completely isolated and independent of each other, which reduces the complexity of accessing or offline of waterfall cards and realizes zero-cost plug-in and unplugging.
[0171] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0172] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the device 700 can also be stored in the RAM 703. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0173] Various components in device 700 are connected to I / O interface 705, including an input unit 706, such as a keyboard, mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a magnetic disk, optical disk, etc.; and a communication unit 709, such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows device 700 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0174] The computing unit 701 can be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as the page loading method. For example, in some embodiments, the page loading method can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the page loading method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the page loading method in any other appropriate manner (e.g., by means of firmware).
[0175] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system comprising at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0176] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0177] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer 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 of the foregoing.
[0178] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0179] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0180] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0181] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not limited herein.
[0182] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.
Claims
1. A page loading method, comprising: Obtaining the business data of the target business module and the rendering framework corresponding to the target business module; The rendering framework at least includes a business controller implemented based on the page basic framework and encapsulated by the protocol corresponding to the page basic framework; Loading the business data into the waterfall card based on the business controller; In response to the waterfall page refresh operation, the waterfall card is loaded into the waterfall page.
2. The method according to claim 1, wherein The rendering framework also includes a user interface style implemented based on the page basic framework and encapsulated through the protocol corresponding to the page basic framework; The step of loading the business data into the waterfall card based on the business controller includes: The business data is loaded based on the business controller, the business data is rendered based on the user interface style, and the rendered business data is loaded into the waterfall card.
3. The method according to claim 2, wherein: The rendering framework further includes a data structure model; the data structure model includes a plurality of business data components; the user interface style includes a user interface style corresponding to at least part of the business data components; After obtaining the business data of the target business module and the rendering framework corresponding to the target business module, the method further includes: Based on the data structure model, the business data is split into a plurality of business sub-data, each of the business sub-data corresponds to a business data component, and the data corresponding to the business data component is provided; The rendering of the business data based on the user interface style includes: The business sub-data corresponding to the business data composition is rendered based on the user interface style corresponding to the business data composition.
4. The method according to claim 1, further comprising: Obtaining user interactions corresponding to the business data; Based on the business controller, the execution flow of the business logic corresponding to the user interaction is implemented, and the business data and the execution flow are loaded into the waterfall card so that the waterfall card can respond to the user interaction and execute the execution flow of the business logic corresponding to the user interaction.
5. The method according to claim 1, wherein The acquiring of the business data of the target business module and the rendering framework corresponding to the target business module includes: In response to the waterfall page preloading operation, obtaining at least one of the business data and the corresponding rendering framework; The waterfall page preloading operation is the initialization of the application where the waterfall page is located or the successful loading of other waterfall pages by the application where the waterfall page is located.
6. The method according to claim 1, wherein The step of loading the waterfall card into the waterfall page in response to a waterfall page refresh operation includes: In response to the waterfall page refresh operation, returning to execute the step of obtaining the business data of the target business module and the rendering framework corresponding to the target business module; Among them, the waterfall page refresh operation is one of cold starting the application where the waterfall page is located, pulling down to display other waterfall pages of the application where the waterfall page is located, and receiving an application notification.
7. The method according to claim 1, wherein The step of loading the waterfall card into the waterfall page in response to a waterfall page refresh operation includes: In response to a waterfall page refresh operation, calculating a corresponding position of the waterfall card on the waterfall page currently displayed by the waterfall application, and loading the waterfall card to a corresponding position of the waterfall page currently displayed by the waterfall application; Among them, the waterfall flow application is the application where the waterfall flow page is located; the waterfall flow page refresh operation is to hot start the waterfall flow application or pull up the waterfall flow page currently displayed by the waterfall flow application.
8. A page loading device, comprising: A data acquisition module is used to acquire the business data of a target business module and a rendering framework corresponding to the target business module; The rendering framework at least includes a business controller implemented based on the page basic framework and encapsulated by the protocol corresponding to the page basic framework; A data loading module, configured to load the business data into a waterfall card based on the business controller; The page module is used to load the waterfall card into the waterfall page in response to a waterfall page refresh operation.
9. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.