CN-122019898-A - Page floor processing method and device
Abstract
The invention discloses a page floor processing method and device, and relates to the technical field of application development. The method comprises the steps of constructing a floor relation mapping table when loading each page floor of a page, acquiring context information associated with at least two page floors with interactive relation by acquiring the floor relation mapping table between the page floors, and rendering at least two pages by the context information so that interaction between page floors is carried out on the basis of the context information by different page floors. The embodiment of the invention solves the problems of poor flexibility and expansibility of processing the page floors and lower performance caused by redundancy of processing logic in the existing method, and improves the efficiency and performance of processing the page floors.
Inventors
- YU HAILONG
Assignees
- 北京沃东天骏信息技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20241111
Claims (11)
- 1. A method for processing a page floor, comprising: responding to a rendered page, acquiring each page floor contained in the page, and acquiring a floor relation mapping table between at least two page floors; Determining a first page floor and a second page floor with interactive relations according to the floor relation mapping table, and acquiring context information associated with the first page floor and the second page floor; And 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 interact with each other based on the context information.
- 2. The method of claim 1, wherein the step of determining the position of the substrate comprises, Before acquiring the floor relation mapping table between at least two of the page floors, the method further comprises: loading each page floor, and generating the floor relation mapping table between the page floors of the page after loading each page floor is completed.
- 3. The method of claim 2, wherein the step of determining the position of the substrate comprises, And loading each page floor, and after loading each page floor is completed, generating the floor relation mapping table between the page floors of the page, wherein the floor relation mapping table comprises the following steps: In the process of loading each page floor, the following operations are executed: for the page floor, under the condition that the page floor contains context information, acquiring a target floor with an interactive relation with the page floor from the context information; Building a floor mapping relation between the page floor and the target floor according to the floor identification of the page floor and the floor identification of the target floor; after each page floor is determined to be loaded, generating a floor relation mapping table among page floors of the page based on the floor mapping relation.
- 4. The method of claim 2, wherein the step of determining the position of the substrate comprises, After generating the floor relation mapping table between the page floors of the page, further comprising: Registering the floor relation mapping table to the floor parameter of each page floor contained in the page, so that each page floor obtains the floor relation mapping table through the corresponding floor parameter.
- 5. The method of claim 1, wherein the step of determining the position of the substrate comprises, The context information comprises floor components related to the interaction relationship among the page floors and calling methods among the floor components; the method for enabling the first page floor and the second page floor to conduct interaction between page floors based on the context information comprises the following steps: Respectively acquiring a first floor assembly corresponding to the first page floor and a second floor assembly corresponding to the second page floor from the context information, and acquiring a calling method between the first floor assembly and the second floor assembly; In response to a trigger for the first floor assembly, interaction between the first floor assembly and the second floor assembly is performed by the calling method.
- 6. The method of claim 2, wherein the step of determining the position of the substrate comprises, The step of obtaining each page floor included in the page further includes: in response to detecting that there is a change in the number of page floors of the page, And reloading each page floor of the page, and after each page floor is loaded, generating an updated floor relation mapping table among page floors of the page.
- 7. The method of claim 1, wherein the step of determining the position of the substrate comprises, And in response to the first page floor not having an interactive relationship with other floors, directly rendering the first page floor.
- 8. A page floor processing device is characterized by comprising a floor acquisition module, an information acquisition module and a rendering module, wherein, The system comprises a floor acquiring module, an information acquiring module, a user acquiring module and a user acquiring module, wherein the floor acquiring module is used for responding to a rendering page, acquiring each page floor contained in the page and acquiring a floor relation mapping table between at least two page floors; and the rendering module is used for 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.
- 9. An electronic device, comprising: one or more processors; storage means for storing one or more programs, When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-7.
- 10. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-7.
- 11. A computer program product comprising a computer program, characterized in that the program, when executed by a processor, implements the method according to any of claims 1-7.
Description
Page floor processing method and device Technical Field The invention relates to the technical field of application development, in particular to a method and a device for processing page floors. Background As the functions of internet applications are more and more abundant, the development complexity for the applications is higher and higher, and in page rendering, the development means of modularized page floors can be generally adopted for realizing. At present, different page floors in a page are usually independently developed and independently operated, however, with the diversification of business, interaction needs possibly exist among page floors, for example, display data of another page floor are changed through operation of one page floor, in the existing floor interaction method after page floor processing, all page floors in the page need to be refreshed under the condition that data change exists in any page floor, and the existing method has the problems of poor flexibility of processing page floors and low performance caused by redundancy of processing logic. Disclosure of Invention In view of the above, the embodiments of the present invention provide a method and an apparatus for processing page floors, which can construct a floor relation mapping table when loading each page floor of a page, obtain context information associated with at least two page floors with an interaction relation by obtaining the floor relation mapping table between page floors, and render at least two pages by the context information, so that interaction between page floors is performed by different page floors based on the context information. The embodiment of the invention solves the problems of poor flexibility and expansibility of processing the page floors and lower performance caused by redundancy of processing logic in the existing method, and improves the efficiency and performance of processing the page floors. In order to achieve the above object, according to one aspect of the embodiment of the present invention, there is provided a method for processing a page floor, which is characterized by comprising obtaining each page floor included in a page and obtaining a floor relation mapping table between at least two page floors in response to rendering the page, obtaining a first page floor and a second page floor having an interactive relation according to the floor relation mapping table and obtaining context information associated with the first page floor and the second page floor, and 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 perform interaction between the page floors based on the context information. Optionally, before acquiring the floor relation mapping table between at least two page floors, loading each page floor, and after loading each page floor, generating the floor relation mapping table between page floors of the page. Optionally, loading each page floor, and after loading each page floor is completed, generating a floor relation mapping table between page floors of the page, wherein in the process of loading each page floor, the method comprises the following operation of acquiring a target floor with an interaction relation with the page floor from context information for the page floor under the condition that the page floor contains the context information, constructing floor mapping relations between the page floor and the target floor according to floor identifications of the page floor and floor identifications of the target floor, and generating a floor relation mapping table between page floors of the page based on each floor mapping relation after loading of each page floor is determined. Optionally, the context information comprises floor components associated with the interaction relation among the page floors and a calling method among the floor components, so that the first page floors and the second page floors can interact among the page floors based on the context information, the method comprises the steps of respectively acquiring the first floor components corresponding to the first page floors and the second floor components corresponding to the second page floors from the context information, acquiring the calling method among the first floor components and the second floor components, and executing interaction among the first floor components and the second floor components through the calling method in response to triggering of the first floor components. Optionally, acquiring each page floor included in the page further comprises reloading each page floor of the page in response to detecting that there is a change in the number of page floors of the page, and after each page floor is loaded, generating an updated floor relationship mapping table between page floors of the page. Optionally, in response to the first landing floor having no interactive relatio