Page floor processing method and device
By constructing a mapping table of page relationships and obtaining context information, efficient interaction between page levels is achieved, solving the problems of insufficient flexibility and performance in existing technologies, and improving page processing efficiency and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
- Filing Date
- 2024-11-11
- Publication Date
- 2026-05-12
AI Technical Summary
Existing page layer processing methods suffer from poor flexibility and low performance due to redundant processing logic, especially when there is interaction between page layers, requiring a complete page refresh.
By constructing a floor relationship mapping table between page floors, the context information of page floors with interactive relationships is obtained, and the interaction between page floors is rendered based on the context information. The floor relationship mapping table is dynamically judged and updated to adapt to changes in page floors.
It improves the efficiency and performance of page layer processing, enhances the flexibility and scalability of interaction between page layers, and reduces the performance loss caused by redundant logic.
Smart Images

Figure CN122019898A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of application development technology, and in particular to a method and apparatus for page layer processing. Background Technology
[0002] As internet applications become more feature-rich, the complexity of application development also increases. In page rendering, a modular approach to page layer development is often used to achieve this.
[0003] Currently, different page levels within a page are typically developed and run independently. However, with the diversification of business needs, there may be interaction requirements between page levels. For example, an operation on one page level might change the displayed data of another page level. In existing page level interaction methods, if any page level changes its data, all page levels on the page need to be refreshed. Existing methods suffer from poor flexibility in handling page levels and low performance due to redundant processing logic. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a page layer processing method and apparatus, which can construct a layer relationship mapping table when loading each page layer, obtain the context information associated with at least two page layers with interactive relationships by obtaining the layer relationship mapping table between page layers, and render at least two pages based on the context information, enabling different page layers to interact based on the context information. Embodiments of the present invention overcome the problems of poor flexibility and scalability in processing page layers in existing methods, as well as the low performance caused by redundancy in processing logic; thus improving the efficiency and performance of page layer processing.
[0005] To achieve the above objectives, according to one aspect of the present invention, a page floor processing method is provided, characterized in that it includes: in response to rendering a page, obtaining each page floor contained in the page, and obtaining a floor relationship mapping table between at least two page floors; according to the floor relationship mapping table, obtaining a first page floor and a second page floor with an interactive relationship, and obtaining context information associated with the first page floor and the second page floor; rendering the first page floor and the second page floor according to the context information, so that the first page floor and the second page floor can interact with each other based on the context information.
[0006] Optionally, before obtaining the floor relationship mapping table between at least two page floors, the method further includes: loading each page floor, and after each page floor has been loaded, generating the floor relationship mapping table between page floors.
[0007] Optionally, each page level is loaded, and after each page level has been loaded, a page level relationship mapping table between page levels is generated, including: during the loading of each page level, the following operations are performed: for each page level, if it is determined that the page level contains context information, the target level with an interactive relationship with the page level is obtained from the context information; based on the page level identifier and the target level identifier, a page level mapping relationship between the page level and the target level is constructed; after it is determined that each page level has been loaded, a page level relationship mapping table between page levels is generated based on the page level mapping relationship.
[0008] Optionally, the context information includes: the floor components associated with the interaction relationship between page floors and the calling methods between the floor components; to enable the first page floor and the second page floor to interact between page floors based on the context information, including: obtaining the first floor component corresponding to the first page floor and the second floor component corresponding to the second page floor from the context information; and obtaining the calling methods between the first floor component and the second floor component; and in response to a trigger on the first floor component, executing the interaction between the first floor component and the second floor component by calling the methods.
[0009] Optionally, obtaining the individual page levels contained in the page further includes: in response to detecting a change in the number of page levels of the page, reloading each page level of the page, and after each page level has been loaded, generating an updated page relationship mapping table between the page levels of the page.
[0010] Optionally, if the first page does not interact with other pages, the first page can be rendered directly.
[0011] To achieve the above objectives, according to a second aspect of the present invention, a page floor processing apparatus is provided, characterized in that it includes: a floor acquisition module, an information acquisition module, and a rendering module; wherein,
[0012] The floor acquisition module is used to retrieve the floor information of each page contained in the page in response to the page rendering, and to retrieve the floor relationship mapping table between at least two page floors; the information acquisition module is used to retrieve the first page floor and the second page floor with interactive relationship according to the floor relationship mapping table, and to retrieve the context information associated with the first page floor and the second page floor.
[0013] The rendering module is used to render the first page and the second page based on context information, so that the first page and the second page can interact with each other based on the context information.
[0014] Optionally, the page floor processing apparatus is configured to, before obtaining the floor relationship mapping table between at least two page floors, further include: loading each page floor, and generating the floor relationship mapping table between page floors after each page floor has been loaded.
[0015] Optionally, the page floor processing device is configured to perform the following operations during the loading of each page floor: for each page floor, if it is determined that the page floor contains context information, obtain the target floor that has an interactive relationship with the page floor from the context information; construct a floor mapping relationship between the page floor and the target floor based on the floor identifier of the page floor and the floor identifier of the target floor; and after it is determined that each page floor has been loaded, generate a floor relationship mapping table between the page floors based on the floor mapping relationship.
[0016] Optionally, the context information includes: the floor components associated with the interaction relationship between page floors and the calling methods between the floor components; the page floor processing device is used to enable the first page floor and the second page floor to interact with each other based on the context information, including: obtaining the first floor component corresponding to the first page floor and the second floor component corresponding to the second page floor from the context information; and obtaining the calling methods between the first floor component and the second floor component; and in response to a trigger on the first floor component, executing the interaction between the first floor component and the second floor component by calling the methods.
[0017] Optionally, the page layer processing device, used to obtain each page layer contained in the page, further includes: in response to detecting a change in the number of page layers of the page, reloading each page layer of the page, and after each page layer has been loaded, generating a layer relationship mapping table between the page layers of the page.
[0018] Optionally, the page floor processing device is used to directly render the first page floor in response to the fact that the first page floor does not have an interactive relationship with other floors.
[0019] To achieve the above objectives, according to a third aspect of the present invention, an electronic device for page floor processing is provided, characterized in that it includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform any of the methods described above for page floor processing.
[0020] To achieve the above objectives, according to a fourth aspect of the present invention, a computer-readable medium is provided having a computer program stored thereon, characterized in that, when the program is executed by a processor, it implements any of the methods described in the above-described page floor processing methods.
[0021] To achieve the above objectives, according to a fifth aspect of the present invention, a computer program product is provided, comprising a computer program, characterized in that, when executed by a processor, the computer program implements any of the methods described above for page floor processing.
[0022] One embodiment of the above invention has the following advantages or beneficial effects: it can construct a floor relationship mapping table when loading each page floor, and obtain the context information associated with at least two page floors with interactive relationships by obtaining the floor relationship mapping table between page floors; it can render at least two pages based on the context information, enabling different page floors to interact based on the context information. This embodiment of the invention overcomes the problems of poor flexibility and scalability in handling page floors and low performance caused by redundancy in processing logic in existing methods; it improves the efficiency and performance of page floor processing.
[0023] The further effects of the aforementioned unconventional alternative methods will be explained below in conjunction with specific implementation methods. Attached Figure Description
[0024] The accompanying drawings are provided to better understand the invention and are not intended to unduly limit the scope of the invention. Wherein:
[0025] Figure 1 This is a flowchart illustrating a page floor processing method according to an embodiment of the present invention;
[0026] Figure 2 This is a schematic diagram of a page floor processing procedure provided in one embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of another page floor processing method provided in one embodiment of the present invention;
[0028] Figure 4 This is a schematic diagram of the structure of a page floor processing device provided in one embodiment of the present invention;
[0029] Figure 5 This is an exemplary system architecture diagram in which embodiments of the present invention can be applied;
[0030] Figure 6 This is a schematic diagram of the structure of a computer system suitable for implementing terminal devices or servers of the present invention. Detailed Implementation
[0031] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of the present invention, including various details to aid understanding. These details should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0032] It should be noted that the collection, use, storage, sharing and transfer of user personal information involved in the technical solution of the present invention all comply with the provisions of relevant laws and regulations, and require notification to users and obtaining their consent or authorization. When applicable, user personal information is subjected to de-identification and / or anonymization and / or encryption technical processing.
[0033] like Figure 1 As shown, this embodiment of the invention provides a page floor processing method, which may include the following steps:
[0034] Step S101: In response to rendering the page, obtain the various page floors contained in the page, and obtain a floor relationship mapping table between at least two page floors.
[0035] Specifically, in the embodiments of the present invention, the page includes multiple page layers, wherein a page layer refers to different levels or areas in the page design, each level or area carrying different functions and content. The division of page layers helps to organize and manage the information architecture of the page, enabling users to browse and perform interactions with the page more clearly based on the page layers.
[0036] In embodiments of the present invention, at least two page floors have an interactive relationship, and the specific information of the page floors with interactive relationships is stored using a floor relationship mapping table corresponding to the page; it can be understood that one page corresponds to one floor relationship mapping table.
[0037] Furthermore, the specific interaction content between page levels is set according to the business scenario. For example, to change the display height of another page level B through the click event of a component in page level A, context information about page level B can be set in page level A. Within the click event in page level A, a custom method of page level B can be called through the context information of page level B, and the display height can be changed through the code logic implemented in the custom method. Another example is that a change in component data in page level A can trigger a change in the display data of another page level B, thereby realizing the interaction between one page level and one or more other page levels (one-way interaction, two-way interaction, etc.).
[0038] Furthermore, before performing the page floor processing step, a floor relationship mapping table is dynamically constructed for the page; that is, the floor relationship mapping table is constructed when loading each page floor.
[0039] Specifically, during the loading of each page level, it is determined whether each page level contains context information. This context information includes the level identifiers of multiple page levels with interactive relationships, as well as information about the specific page components (e.g., DOM elements) corresponding to the interactive relationships, and methods called between components. This context information can be obtained through the `useRef` hook function in React (a framework for developing front-end user interfaces). Using this context information, the components used for interaction and the methods called for multiple page levels with interactive relationships can be obtained. It is understood that a page level can have interactive relationships with other different page levels. After traversing all page levels, a level relationship mapping table for that page is generated. This level relationship mapping table is stored in a key-value format; for example, the key stores the level identifier of page level 1, and the value stores the context information of page level 2 that interacts with page level 1. That is, before obtaining the level relationship mapping table between at least two page levels, the process further includes: loading each page level, and after each page level has been loaded, generating a level relationship mapping table between the page levels of the entire page. The floor relationship mapping table contains the floor mapping relationship between two floors (i.e., the floor mapping relationship between a page floor and a target floor). This floor mapping relationship is constructed based on the floor identifiers of the page floor and the target floor. For example, if page floor 1 and page floor 5 have a floor mapping relationship, then the floor identifiers of page floor 1 (e.g., floor1) and page floor 5 (e.g., floor5) are stored accordingly to construct the floor mapping relationship between page floor 1 and page floor 5. In other words, after loading each page floor and all page floors have been loaded, a floor relationship mapping table between the page floors is generated. This includes: during the loading of each page floor, the following operations are performed: for each page floor, if it is determined that the page floor contains context information, the target floor with an interactive relationship with the page floor is obtained from the context information; a floor mapping relationship between the page floor and the target floor is constructed based on the floor identifiers of the page floor and the target floor; after determining that all page floors have been loaded, a floor relationship mapping table between the page floors is generated based on each floor mapping relationship.
[0040] Once all page levels of the page have been loaded, a floor relationship mapping table can be obtained, allowing the step of retrieving the floor relationship mapping table to be executed when rendering the page.
[0041] Furthermore, after generating the floor relationship mapping table between page floors, the process further includes: registering the floor relationship mapping table to the floor parameters of each page floor contained in the page, so that each page floor can obtain the floor relationship mapping table through the corresponding floor parameters. Specifically, the generated floor relationship mapping table can be registered to each page floor. The registration method can be to register the floor relationship mapping table to the props input parameter of each page floor, so that each page floor can obtain the floor relationship mapping table through the props input parameter.
[0042] By dynamically building a floor relationship mapping table for the floors contained in the page, and enabling each floor to access the floor relationship mapping table through parameter registration, the flexibility of determining the interaction between floor pages is improved, and the interaction code for floor pages is decoupled, thereby improving the efficiency of handling floor pages and enhancing the user experience.
[0043] Step S102: Based on the floor relationship mapping table, obtain the first page floor and the second page floor that have an interactive relationship, and obtain the context information associated with the first page floor and the second page floor.
[0044] Step S103: Render the first page floor and the second page floor according to the context information, so that the first page floor and the second page floor can interact with each other based on the context information.
[0045] Specifically, steps S102 and S103 describe how, during the page floor processing, each page floor can be traversed using a floor relationship mapping table, and it can be determined whether each page floor has an interaction relationship with other page floors. For page floors without page interaction relationships, rendering of the page floor can be performed; that is, in response to the first page floor not having an interaction relationship with other floors, the first page floor is directly rendered. If at least two page floors with an interaction relationship are determined, the page floor identifiers of the first and second page floors with the interaction relationship are further obtained, and the context information associated with the first and second page floors is obtained. For example, if it is determined from the floor relationship mapping table that page floor 2 and page floor 3 have an interaction relationship, the context information associated with the first and second page floors is obtained, and the specific interaction behavior is determined based on the components and calling methods in the context information. In other words, the context information includes: the floor components associated with the interaction relationships between page floors and the calling methods between these floor components; enabling the first page floor and the second page floor to interact based on the context information includes: obtaining the first floor component corresponding to the first page floor and the second floor component corresponding to the second page floor from the context information; obtaining the calling methods between the first floor component and the second floor component; and responding to a trigger on the first floor component by executing the interaction between the first floor component and the second floor component through the calling methods. For example: changing the display style of page floor 3 (the second page floor) by calling a custom method (i.e., the calling method) through the click event (trigger) of the button (first floor component) in page floor 2 (first page floor) to change the display style of page floor 3 (e.g., the floor display height, background image, font style, etc. represented by one or more second floor components).
[0046] In embodiments of the present invention, before rendering each page level, it dynamically determines whether each page level has context information. Page levels with context information are stored and a page relationship mapping table is generated. This mapping table is registered in the `props` parameter of each page level. After page rendering, each page level can access the page relationship mapping table through `props`. Furthermore, based on the page level identifier (level ID) in the mapping table, the context information of other page levels with interactive relationships can be obtained. This allows the use of context information to retrieve methods set within each page level, enabling method calls between page levels and facilitating data transfer or retrieval (i.e., interaction between page levels).
[0047] In an embodiment of the present invention, the page layer processing method can be implemented using the Taro framework. Taro is an open cross-platform and cross-framework solution that supports the development of applications such as mini-programs, H5, and React Native using frameworks such as React, Vue.js, and Nerv.
[0048] like Figure 2 As shown, this embodiment of the invention provides a process for page floor processing, which may include the following steps:
[0049] Step S201: Load each page level, and during the loading process, execute steps S202 to S203.
[0050] Step S202: For page floors, if it is determined that the page floor contains context information, obtain the target floor that has an interactive relationship with the page floor from the context information; construct the floor mapping relationship between the page floor and the target floor based on the floor identifier of the page floor and the floor identifier of the target floor.
[0051] Step S203: After each page floor is loaded, a floor relationship mapping table between page floors is formed based on the mapping relationship of each first floor.
[0052] Specifically, such as Figure 2 The example page 200 shown contains multiple page levels: page level 1, page level 2, page level 3, page level 4, page level 5... page level N. Assuming that, based on the business scenario, page levels 2 and 5 have a need to interact with other page levels, then page levels 2 and 5 are configured with different context information based on these business requirements. The page level and its corresponding context information can be stored in a pre-defined page mapping table, which can be stored on the server side. For example, the page mapping table may contain mappings such as: page level 1: no context information, page level 2: has context information, and so on.
[0053] Furthermore, after the client determines and analyzes the context information set for page floor 2 (e.g., floor identifier: floor2) based on the floor mapping table obtained from the server, it parses the context information to obtain the page floor 3 (i.e., the target floor, e.g., floor identifier: floor3) that has an interactive relationship with page floor 3 as indicated by the context information. It then stores the floor identifier of the page floor, the context information, and the target floor that has an interactive relationship with the page floor indicated by the context information. Based on the floor identifier of the page floor and the floor identifier of the target floor, a floor mapping relationship between the page floor and the target floor is constructed. Thus, a floor relationship mapping table between the page floors is formed based on each floor mapping relationship.
[0054] Steps S201 to S203 are described as follows: before obtaining the floor relationship mapping table between at least two page floors, the following steps are further included: loading each page floor, and after each page floor has been loaded, generating the floor relationship mapping table between page floors; wherein, the floor relationship mapping table can also be bound to the page identifier and stored on the server or stored locally on the client.
[0055] The embodiments of the present invention dynamically determine whether each page layer contains context information before rendering each page layer of the page. Page layers with context are stored and a layer relationship mapping table is generated. The context information between different page layers can be configured (added, modified, deleted) and the interaction relationship, page layer components, calling methods, etc. of the page layers contained in the context information can be changed. This improves the flexibility and scalability of handling interactions between page layers.
[0056] like Figure 3 As shown in the figure, this embodiment of the invention provides another method for processing page floors, which may include the following steps:
[0057] Step S301: After each page floor is loaded, a floor relationship mapping table between page floors is formed based on the mapping relationship of each first floor.
[0058] Step S302: In response to a change in context information, execute the storage of the page floor identifier, the changed context information, and the changed context information indicating other floors that have an interactive relationship with the page floor, to form a first floor mapping relationship between the page floor and other floors.
[0059] Step S303: In response to the detection of a change in the number of page floors, reload each page floor of the page. After each page floor has been loaded, generate an updated floor relationship mapping table between the page floors.
[0060] Specifically, embodiments of the present invention may perform the step of generating a page floor relationship mapping table before each rendering of the page, or may change the page floor relationship mapping table accordingly by determining whether the context information of the page floor has changed or whether the page floor has changed.
[0061] In response to changes in the number of page levels (adding new page levels, deleting page levels, etc.), i.e., in response to the detection of changes in the number of page levels, each page level of the page is reloaded. After each page level has been loaded, an updated page level relationship mapping table is generated between the page levels.
[0062] Furthermore, for any change in the context information of a page floor (e.g., modifying the target floor corresponding to the interaction relationship of a page floor, such as changing the interaction relationship between page floor 1 and page floor 2 to page floor 1 interacting with page floor 2 and page floor 3, or modifying the component calling methods and data interaction content between page floors), that is, in response to the setting of context information for a page floor, storing the page floor's identifier, context information, and the target floor with interaction relationship indicated by the context information, and forming a floor mapping relationship between the page floor and the target floor, it further includes: in response to a change in the context information, executing the storage of the page floor's identifier, the changed context information, and the other floors with interaction relationship indicated by the changed context information, forming a floor mapping relationship between the page floor and other floors.
[0063] This invention improves the flexibility and scalability of post-processing page interactions by dynamically detecting and updating the page's floor relationship mapping table.
[0064] like Figure 4 As shown, this embodiment of the invention provides a page floor processing device 400, including: a floor acquisition module 401, an information acquisition module 402, and a rendering module 403; wherein,
[0065] The floor acquisition module 401 is used to respond to the rendering page by acquiring the floor of each page contained in the page, and acquiring a floor relationship mapping table between at least two page floors;
[0066] The information acquisition module 402 is used to acquire the first page floor and the second page floor with interactive relationship according to the floor relationship mapping table, and to acquire the context information associated with the first page floor and the second page floor;
[0067] The rendering module 403 is used to render the first page floor and the second page floor according to the context information, so that the first page floor and the second page floor can interact with each other based on the context information.
[0068] This invention also provides an electronic device for page layer processing, comprising: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0069] This invention also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method provided in any of the above embodiments.
[0070] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the page floor processing methods described above.
[0071] Figure 5 An exemplary system architecture 500 is shown that can be applied to the page layer processing method or page layer processing apparatus of the present invention.
[0072] like Figure 5 As shown, system architecture 500 may include terminal devices 501, 502, and 503, a network 504, and a server 505. Network 504 serves as the medium for providing communication links between terminal devices 501, 502, and 503 and server 505. Network 504 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0073] Users can use terminal devices 501, 502, and 503 to interact with server 505 via network 504 to receive or send messages, etc. Various client applications can be installed on terminal devices 501, 502, and 503, such as e-commerce client applications, web browser applications, search applications, instant messaging tools, and email clients.
[0074] Terminal devices 501, 502, and 503 can be various electronic devices with displays and supporting various client applications, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0075] Server 505 can be a server that provides various services, such as a backend management server that supports client applications used by users through terminal devices 501, 502, and 503. The backend management server can store floor relationship mapping tables for multiple pages in the application, and upon receiving a request to retrieve the floor relationship mapping table, it will return the matching floor relationship mapping table to the terminal device.
[0076] It should be noted that the page floor processing method provided in the embodiments of the present invention is generally executed by terminal devices 501, 502, and 503. Correspondingly, the page floor processing device is generally disposed in terminal devices 501, 502, and 503.
[0077] It should be understood that Figure 5 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0078] The following is for reference. Figure 6 It shows a schematic diagram of the structure of a computer system 600 suitable for implementing a terminal device of the present invention. Figure 6The terminal device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0079] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 602 or programs loaded from storage section 608 into random access memory (RAM) 603. The RAM 603 also stores various programs and data required for the operation of the system 600. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0080] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 608 as needed.
[0081] In particular, according to the embodiments disclosed in this invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs the functions defined above in the system of this invention.
[0082] It should be noted that the computer-readable medium shown in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0083] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0084] The modules and / or units described in the embodiments of the present invention can be implemented in software or hardware. The described modules and / or units can also be housed in a processor. For example, a processor can be described as including a floor acquisition module, an information acquisition module, and a rendering module. The names of these modules do not necessarily limit the module itself; for example, the floor acquisition module can also be described as "a module that acquires the floors of each page contained in a page and a floor relationship mapping table."
[0085] In another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs, which, when executed by the device, cause the device to include: in response to rendering a page, obtaining each page level contained in the page, and obtaining a level relationship mapping table between at least two page levels; obtaining page level identifiers of a first page level and a second page level having an interactive relationship according to the level relationship mapping table, and obtaining context information associated with the first page level and the second page level; rendering the first page level and the second page level according to the context information, so that the first page level and the second page level can interact with each other based on the context information.
[0086] Embodiments of the present invention can construct a floor relationship mapping table when loading each page floor, and obtain context information associated with at least two page floors that have an interactive relationship by acquiring the floor relationship mapping table between page floors; at least two pages are rendered using the context information, enabling different page floors to interact based on the context information. Embodiments of the present invention overcome the problems of poor flexibility and scalability in handling page floors and low performance caused by redundancy in processing logic in existing methods; thus improving the efficiency and performance of page floor processing.
[0087] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for processing page floor levels, characterized in that, include: In response to rendering the page, obtain the various page floors contained in the page, and obtain a floor relationship mapping table between at least two of the page floors; Based on the floor relationship mapping table, determine the first page floor and the second page floor that have an interactive relationship, and obtain the context information associated with the first page floor and the second page floor; The first page floor and the second page floor are rendered according to the context information, so that the first page floor and the second page floor can interact with each other based on the context information.
2. The method according to claim 1, characterized in that, Before obtaining the floor relationship mapping table between at least two of the page floors, the process further includes: Each page level is loaded, and after each page level is loaded, a mapping table of page relationships between the page levels is generated.
3. The method according to claim 2, characterized in that, The process of loading each page level and, after all page levels have been loaded, generating a mapping table of page relationships between page levels includes: During the loading of each page level, the following operations are performed: For the page floor, if it is determined that the page floor contains context information, the target floor that has an interactive relationship with the page floor is obtained from the context information; Based on the floor identifier of the page floor and the floor identifier of the target floor, construct a floor mapping relationship between the page floor and the target floor; After confirming that each page level has been fully loaded, a page relationship mapping table is generated based on the page mapping relationships.
4. The method according to claim 2, characterized in that, After generating the floor relationship mapping table between the page floors of the page, the process further includes: The floor relationship mapping table is registered to the floor parameters of each page floor contained in the page, so that each page floor can obtain the floor relationship mapping table through the corresponding floor parameters.
5. The method according to claim 1, characterized in that, The context information includes: the floor components associated with the interaction relationships between page floors and the calling methods between floor components; The step of enabling the first page level and the second page level to interact between page levels based on the context information includes: From the context information, obtain the first floor component corresponding to the first page floor and the second floor component corresponding to the second page floor; and obtain the calling methods between the first floor component and the second floor component. In response to a trigger on the first floor component, the interaction between the first floor component and the second floor component is executed through the invocation method.
6. The method according to claim 2, characterized in that, The step of obtaining the various page levels contained in the page further includes: In response to the detection that the number of page floors on the page has changed, Reload each page level of the page. After each page level has been loaded, generate an updated page relationship mapping table between the page levels of the page.
7. The method according to claim 1, characterized in that, Since the first page has no interaction with other pages, the first page is rendered directly.
8. A page floor processing device, characterized in that, include: The module includes a floor acquisition module, an information acquisition module, and a rendering module; among them, The floor acquisition module is used to acquire each page floor contained in the page in response to the rendering page, and acquire a floor relationship mapping table between at least two page floors; the information acquisition module is used to acquire a first page floor and a second page floor with an interactive relationship according to the floor relationship mapping table, and acquire context information associated with the first page floor and the second page floor. The rendering module is used to render the first page floor and the second page floor according to the context information, so that the first page floor and the second page floor can interact with each other based on the context information.
9. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
11. A computer program product, comprising a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.