Page rendering methods, apparatus, devices and computer-readable storage media

By obtaining and processing page floor information, virtual floors are created to achieve rendering compatibility between the system and the business side's floors, which solves the problem of incompatibility between the business side and the original component page rendering, and ensures that the components adapt to individual needs.

CN112100552BActive Publication Date: 2024-10-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010785211.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-06
Publication Date
2024-10-18
Estimated Expiration
2040-08-06

AI Technical Summary

Technical Problem

When the business party performs customized logical expansion of the original component, it is difficult to achieve compatibility with the original component page, resulting in failure to render the combined page and limiting the personalized adaptability of the component.

Method used

By obtaining the page floor information, determine the floor sequence, create a virtual floor consistent with the system floor architecture, obtain the business side floor data, and achieve rendering compatibility between the system floor and the business side floor.

Benefits of technology

It achieves full compatibility between the business side floor and the system floor, ensuring successful rendering of the combined page and meeting the personalized needs of the business side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112100552B_ABST
    Figure CN112100552B_ABST
Patent Text Reader

Abstract

The present application provides a page rendering method, device, equipment and computer-readable storage medium; the method includes: obtaining the floor information of the page floor corresponding to the page, the page floor includes: the system floor corresponding to the original page element in the page, and the business floor corresponding to the custom page element that is combined with the original page element to form the page; based on the floor information, determining the floor order corresponding to each page floor; obtaining the data corresponding to the system floor, and creating a virtual floor that is consistent with the system floor architecture corresponding to the business floor, so as to obtain one or more groups of data corresponding to the business floor through the virtual floor; based on the data of the system floor and the data of the business floor, rendering the system floor and the business floor respectively in the floor order to obtain the page. Through this application, the compatibility of the business page and the system page can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to Internet technology, and in particular to a page rendering method, apparatus, device and computer-readable storage medium. Background Art

[0002] Componentization is to split the originally coupled software modules and upgrade them into components. Each component can break through the limitations of the original environment and be flexibly applied to serve different scenarios. A component can be provided to multiple business parties, and in order to meet their own personalized needs, the business parties often hope to add customized logic based on the original components.

[0003] However, when the business side adds customized logic to the original component, it is difficult to understand the complex logic within the original component. When rendering the page, it is often difficult to achieve compatibility between the page corresponding to the custom added customized logic and the page of the original component, and to obtain a fully compatible and usable combined page. Summary of the invention

[0004] The embodiments of the present application provide a page rendering method, device, and computer-readable storage medium, which can achieve compatibility between business party pages and system pages.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] An embodiment of the present application provides a page rendering method, including: obtaining floor information of a page floor corresponding to a page, the page floor including: a system floor corresponding to an original page element in the page, and a business floor corresponding to a custom page element that is combined with the original page element to constitute the page; based on the floor information, determining a floor order corresponding to each of the page floors; obtaining data corresponding to the system floor, and creating a virtual floor corresponding to the business floor and consistent with the system floor architecture, so as to obtain one or more groups of data corresponding to the business floor through the virtual floor; based on the data of the system floor and the data of the business floor, respectively rendering the system floor and the business floor in accordance with the floor order to obtain the page.

[0007] An embodiment of the present application provides a page rendering device, including: an acquisition module, used to acquire floor information of a page floor corresponding to a page, the page floor including: a system floor corresponding to an original page element in the page, and a business floor corresponding to a custom page element that is combined with the original page element to constitute the page; a floor sequence determination module, used to determine the floor sequence corresponding to each of the page floors based on the floor information; a floor creation module, used to acquire data corresponding to the system floor, and to create a virtual floor corresponding to the business floor and consistent with the system floor architecture, so as to acquire one or more groups of data corresponding to the business floor through the virtual floor; a rendering module, used to perform floor rendering on the system floor and the business floor respectively according to the floor sequence based on the data of the system floor and the data of the business floor, to obtain the page.

[0008] In the above scheme, the floor information of the page floors includes the floor identifiers corresponding to each page floor respectively; the determination module is also used to determine the floor order corresponding to each page floor based on the storage order of the floor identifiers corresponding to each page floor.

[0009] In the above scheme, the page rendering device also includes: a floor type determination module, which is used to obtain the type information of the corresponding page floor according to each floor identification; based on the acquired type information of each page floor, determine whether the page floor corresponding to each floor identification is a system floor or a business floor.

[0010] In the above scheme, the floor type determination module is also used to obtain a system floor identification list that records the floor identifications of the system floors; based on the floor identifications of each of the page floors, the system floor identification list is queried; the page floor corresponding to the floor identification queried in the system floor identification list is determined as the system floor, and the page floor corresponding to the floor identification not queried in the system floor identification list is determined as the business floor.

[0011] In the above scheme, the business party floor is generated based on a predetermined protocol; the floor creation module is also used to obtain one or more groups of data corresponding to the business party floor through the virtual floor according to the predetermined protocol.

[0012] In the above scheme, the page rendering device also includes: a cache creation module, which is used to create a floor information cache based on the floor information, so as to obtain data corresponding to the page floor by searching the floor information cache.

[0013] In the above scheme, the page rendering device also includes: a response module, which is used to monitor the page and obtain interaction instructions; according to the target page floor corresponding to the interaction instruction, request the floor logic unit corresponding to the target page floor to respond to the interaction instruction.

[0014] The present application provides a page rendering device, including:

[0015] A memory for storing executable instructions;

[0016] The processor is used to implement the page rendering method provided in the embodiment of the present application when executing the executable instructions stored in the memory.

[0017] An embodiment of the present application provides a computer-readable storage medium storing executable instructions for causing a processor to execute and implement the page rendering method provided in the embodiment of the present application.

[0018] The embodiments of the present application have the following beneficial effects: by acquiring the floor information of the page floor corresponding to the page, and determining the floor order corresponding to each page floor based on the floor information, by directly acquiring the data of the system floor and rendering it according to the determined floor order, when rendering the business side floor, a virtual floor consistent with the architecture of the system floor corresponding to the original component is created, and one or more groups of data of the business side floor are acquired and rendered through the virtual floor, thereby achieving compatibility between the business side floor and the system floor, and obtaining a fully compatible and available page that combines the system floor and the business side floor. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is an optional structural diagram of the page rendering system architecture provided in the embodiment of the present application;

[0020] Figure 2 This is an optional structural diagram of a page rendering device provided in an embodiment of the present application;

[0021] Figure 3 This is an optional flowchart of the page rendering method provided in the embodiment of the present application;

[0022] Figure 4 It is an optional schematic diagram of the page layout provided in the embodiment of the present application;

[0023] Figure 5 The page rendering method provided in the embodiment of the present application is based on Figure 3 An optional flowchart diagram of the steps before step S103;

[0024] Figure 6 The page rendering method provided in the embodiment of the present application is based on Figure 3 An optional flowchart diagram of the steps before step S103;

[0025] Figure 7 The page rendering method provided in the embodiment of the present application is based on Figure 3 An optional flowchart diagram of the steps after step S104. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.

[0027] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0028] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0030] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0031] 1) Component is a simple encapsulation of data and methods. In C++Builder, a component is a specific object derived from TComponent. Components can have their own properties and methods. Properties are simple accessors to component data. Methods are some simple and visible functions of components.

[0032] 2) Pages. In the World Wide Web (WWW) environment, information is organized in the form of pages, which are implemented by language. Hypertext links are established between pages for easy browsing.

[0033] 3) Rendering refers to the process of using software to generate images from models. Models are descriptions of three-dimensional objects using strictly defined languages ​​or data structures, which include geometry, viewpoint, texture, and lighting information.

[0034] 4) Page elements, including text, pictures, audio, animation, and video. Each page element must meet the predetermined layout requirements to form a page.

[0035] Since it is difficult for the business party to understand the complex logic inside the original component when expanding the logical functions of the original packaged original component, when the custom developed custom component is combined with the original component and the corresponding page is rendered, it is easy for the two to be incompatible and unable to render the combined page, thus limiting the customization demand for the component and making it difficult for the component to adapt to the personalized needs of the business party. At present, when rendering the corresponding pages of the original component and the business party component customized by the business party, there is a problem of incompatibility and difficulty in obtaining a usable combined page.

[0036] When facing the above problems, the present application obtains the floor information of the page floor corresponding to the page, determines the floor order corresponding to each page floor based on the floor information, directly obtains the data of the system floor and renders it according to the determined floor order, and when rendering the business side floor, creates a virtual floor that is consistent with the architecture of the system floor corresponding to the original component, obtains one or more groups of data of the business side floor through the virtual floor and renders it, thereby achieving compatibility between the business side floor and the system floor, and obtaining a fully compatible and usable page that combines the system floor and the business side floor.

[0037] The embodiments of the present application provide a page rendering method, apparatus, device, and computer-readable storage medium, which can obtain a fully compatible and usable combined page. The following describes an exemplary application of the page rendering device provided by the embodiments of the present application. The page rendering device provided by the embodiments of the present application can be implemented as various types of user terminals such as laptops, tablet computers, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), and can also be implemented as a server. Below, an exemplary application when the device is implemented as a terminal will be described.

[0038] See also Figure 1 , Figure 1This is an optional architecture diagram of the page rendering system 100 provided in the embodiment of the present application. To realize supporting a page rendering application, the terminal 400 (page rendering device, exemplarily showing the terminal 400-1 and the terminal 400-2) is connected to the server 200 via the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. The server 200 is connected to the terminal 400 and the database 500 respectively.

[0039] Among them, the terminal 400 can obtain the page rendering instruction, and based on the page rendering instruction, request the server 200 for the page data corresponding to the page specified by the page rendering instruction. After receiving the page data, the terminal 400 can render the page. Among them, the page data includes page elements, and the page elements include text, pictures, audio, animation, and video. In an embodiment of the present invention, the page is composed of multiple page floors, and the page data includes floor information and data corresponding to each page floor. The page data can be stored in the server 200, and can also be stored in a database 500 connected to the server 200. It can be understood that any terminal 400 connected to the server 200 can request the server 200 to obtain page data through the network 300, such as the terminal 400-1 and the terminal 400-2 shown in the figure. In addition, the page data can also be stored in the terminal 400. When the terminal 400 obtains the page rendering instruction, it can directly retrieve the local page data to render the page. The page data may also be stored in an external device, and the terminal 400 is connected to the external device in a wired or wireless manner. When receiving a page rendering instruction, the terminal 400 directly obtains the page data from the external device connected to the external device to render the page. The embodiment of the present application does not specifically limit the storage form and storage location of the page data.

[0040] Terminal 400 is used to obtain the floor information of the page floor corresponding to the page, and the page floor includes: the system floor corresponding to the original page element in the page, and the business floor corresponding to the custom page element that is combined with the original page element to form the page; based on the floor information, determine the floor order corresponding to each page floor; obtain the data corresponding to the system floor, and create a virtual floor that is consistent with the system floor architecture corresponding to the business floor, so as to obtain one or more groups of data corresponding to the business floor through the virtual floor; based on the data of the system floor and the data of the business floor, render the system floor and the business floor in the floor order to obtain the page. The obtained page is displayed in the graphical interface 410 (graphical interface 410-1 and graphical interface 410-2 are shown as examples).

[0041] In some embodiments, the terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The server 200 may be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present invention.

[0042] See also Figure 2 , Figure 2 is a schematic diagram of the structure of a page rendering device 400 provided in an embodiment of the present application. Figure 2 The page rendering device 400 shown includes: at least one processor 410, a memory 450, at least one network interface 420 and a user interface 430. The various components in the page rendering device 400 are coupled together through a bus system 440. It can be understood that the bus system 440 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .

[0043] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0044] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0045] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 described above includes one or more storage devices that are physically remote from the processor 410.

[0046] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0047] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.

[0048] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0049] A network communication module 452, for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Authentication (WiFi), and Universal Serial Bus (USB);

[0050] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);

[0051] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.

[0052] In some embodiments, the page rendering device provided in the embodiments of the present application can be implemented in a software manner. Figure 2 The page rendering device 455 stored in the memory 450 is shown, which can be software in the form of a program and a plug-in, etc., and includes the following software modules: an acquisition module 4551, a floor sequence determination module 4552, a floor creation module 4553, a rendering module 4554, a floor type determination module 4555, a cache creation module 4556 and a response module 4557. The functions of each module will be described below. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented.

[0053] In other embodiments, the page rendering device provided in the embodiments of the present application can be implemented in hardware. As an example, the page rendering device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the page rendering method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.

[0054] The page rendering method provided in the embodiment of the present application will be described in conjunction with the exemplary application and implementation of the terminal provided in the embodiment of the present application.

[0055] See also Figure 3 , Figure 3 is an optional flow chart of the page rendering method provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are explained.

[0056] Step S101, obtaining floor information of a page floor corresponding to a page, wherein the page floor includes: a system floor corresponding to an original page element in the page, and a business floor corresponding to a custom page element that is combined with the original page element to form the page;

[0057] It should be noted that the page can be a web page, or it can be the user interface (UI, User Interface) of an application (APP, Application), etc. In the embodiment of the present invention, the page is taken as the UI of the APP for explanation. In this embodiment, the functional modules of the APP are componentized. It should be understood that an APP can include its own original components, as well as business side components custom developed by the business party. After the business side components are integrated with the original components, the functions of the APP can be expanded to obtain a new APP. The new APP should have the functions of the original components and the functions of the business side components. Among them, the original components and the business side components are both managed by the control unit of the APP.

[0058] It should also be noted that each component includes an independent logic unit and UI unit. Among them, the logic unit is used to respond to page-based interaction instructions for background logic processing. The UI unit is used to render the page floor of the corresponding component. The UI units of each component are rendered and combined to form the UI of the APP. Here, the pages rendered by the UI units of each component are displayed in the form of floors. In this embodiment, the page displayed corresponding to the UI unit of the component is recorded as a page floor for explanation.

[0059] In this embodiment, a page can correspond to page floors of multiple components, and the page floors are combined in the form of floors to form a common page. Among them, each page floor corresponds to its own independent floor page element, so as to be displayed independently in the page. Among them, the page floor includes the system floor and the business side floor. The system floor is the floor corresponding to the original page element in the page, and the business side floor is the floor corresponding to the custom page in the page. For the system floor, its corresponding component is the original component containing the original page element. For the business side floor, its corresponding component is the custom component.

[0060] For example, Figure 4 An optional schematic diagram of the page layout provided by an embodiment of the present application is shown, which is a product details page of a shopping app, and the product details page of the shopping app includes multiple system floors and multiple business side floors. Among them, the system floor includes the main picture floor, the title floor and the shopping cart floor. The business side floor includes the must-buy floor, the discount floor and the group purchase floor. The system floor and the business side floor together constitute the product details page of the shopping app. Here, the original component corresponding to the system floor is the component originally packaged by the shopping app, and the custom component corresponding to the business side floor is the business side component developed by a third-party developer to expand the function of the original component of the shopping app.

[0061] In an embodiment of the present invention, a terminal may obtain a page rendering instruction for rendering a page. The page rendering instruction may be generated by a user operating the terminal, or may be generated by the terminal when receiving a control instruction from another device, or may be automatically generated by the terminal under certain conditions. In response to the page rendering instruction, the terminal obtains the floor information of the page floor corresponding to the page. Specifically, the floor information of the page floor may be stored locally in the terminal, and the terminal directly calls the local floor information for acquisition. The floor information of the page floor may also be stored in a server that is communicatively connected to the terminal. When the terminal obtains the page rendering instruction, it sends a request to the server to obtain the floor information of the page floor. After receiving the request, the server sends the corresponding floor information of the page floor to the terminal. The floor information may be the floor identification (ID) of each floor. For example, for Figure 4For the product details page of the shopping APP shown, the corresponding floor information can be bpMainImage, bpMustPing, bpTitle, bpDiscount, bpPingTuan, and bpShoppingCart, which correspond to the main image floor, must-buy floor, title floor, discount floor, group purchase floor, and shopping cart floor, respectively.

[0062] Step S102, based on the floor information, determining the floor order corresponding to each of the page floors;

[0063] It should be noted that when the business side expands the functionality of the original component to develop business side components, the business side can customize the floor order of the page by obtaining the floor information of the page floors corresponding to each component, and then sorting the floor information of each page floor in the rendering order, thereby obtaining the re-sorted floor information.

[0064] In one embodiment, the floor information of the page floors includes floor identifiers corresponding to the respective page floors, and step S101 specifically includes: determining the floor order corresponding to the respective page floors based on the storage order of the floor identifiers corresponding to the respective page floors.

[0065] It should be noted that the floor ID is information indicating the unique identity of the floor. One page floor corresponds to a unique floor ID. In this embodiment, the floor IDs corresponding to each page floor are centrally stored, and the storage form can be a list or an array, etc. This embodiment does not specifically limit the storage form of the floor ID. The terminal can determine the storage order of the floor ID by obtaining the storage address of the floor ID. If the floor ID is stored in the form of a list or an array, the arrangement order of the floor ID in the list or array is the storage order of the floor ID. Further, the terminal determines the floor order corresponding to each page floor according to the storage order of the floor ID. Specifically, the terminal can directly determine the actual storage order of the floor ID as the floor order displayed in the page for each page floor corresponding to each floor ID, or it can be that after converting the storage order of the floor ID through other rules, the converted order is determined as the floor order corresponding to each page floor.

[0066] In this embodiment, the terminal obtains the floor identification of the page floor corresponding to the page, and determines the floor order corresponding to each page floor based on the storage order of the floor identification, so that before rendering the page, the floor order corresponding to the page floor can be accurately, effectively and quickly determined.

[0067] Step S103, obtaining data corresponding to the system floor, and creating a virtual floor corresponding to the business floor that is consistent with the system floor architecture, so as to obtain one or more sets of data corresponding to the business floor through the virtual floor;

[0068] It should be noted that after the terminal obtains the floor sequence of each page floor, it can render each page floor according to the floor sequence to obtain a page composed of ordered page floors.

[0069] In the embodiment of the present invention, the data of the page floor includes but is not limited to the page elements and page height corresponding to the system floor. In some embodiments, the data of the page floor also includes the page position and page width, etc. It should be noted that a set of data in the embodiment of the present invention corresponds to a page floor, and the page in the embodiment of the present invention may include at least one page floor and at least one business side floor.

[0070] Here, when the terminal obtains the data corresponding to the system floor corresponding to the original component, it can load the data and render the system floor according to the logic inside the APP integrated with the original component. The embodiment of the present invention does not specifically limit the method of loading the data and rendering the system floor.

[0071] In addition, since the custom component corresponding to the business party floor is developed by the business party, its architecture and base class may be inconsistent with the original component. When the architecture of the custom component is inconsistent with the original component, the terminal cannot directly load the data of the business party floor to render the business party floor. In order to solve this problem, in this embodiment, when the terminal obtains a set of data of the business party floor, it creates a virtual floor through an APP integrated with the original component. The virtual floor directly inherits the base class of the original component, and its architecture is consistent with the original component. Then, the virtual floor communicates with the custom component, and a set of data of the business party floor is loaded into the virtual floor, so as to render the virtual floor to obtain a visualized business party floor. When loading and rendering data for multiple business party floors, the terminal creates multiple virtual floors accordingly, and obtains multiple sets of data corresponding to multiple business party floors through multiple virtual floors.

[0072] It should be noted that when the virtual floor communicates with the custom component, a unified communication protocol is required so that the virtual floor can obtain the data in the custom component based on the communication protocol. It is understood that the custom component developed by the business party should be generated based on a unified communication protocol. In this embodiment, the communication protocol defined based on the original component is recorded as a predetermined protocol. It is understood that the business party floor is generated based on the predetermined protocol.

[0073] Based on this, in step S103, obtaining one or more sets of data corresponding to the business party floor through the virtual floor includes: obtaining one or more sets of data corresponding to the business party floor through the virtual floor according to a predetermined protocol.

[0074] It should be noted that the data of the business side floor includes the view of the business side floor and the height of the business side floor. The predetermined protocol includes a method for returning the view of the business side floor, a method for returning the height of the business side floor, and a method for setting the data of the business side floor. The specific implementation of each method in the predetermined protocol can be customized and developed by the business side, as long as these methods can be provided for the virtual floor to call to obtain the data of the business side floor.

[0075] Therefore, by setting a predetermined protocol to standardize the custom components developed by the business party, the original components can be better compatible with the custom components of the business party, so that the system floor and the business floor can be connected in series more reliably and effectively, enhancing the reusability of the components.

[0076] Step S104, based on the data of the system floor and the data of the business floor, the system floor and the business floor are rendered in order of floors to obtain a page.

[0077] It is understandable that the terminal can render each page floor after loading the data corresponding to all page floors, or it can render a page floor after obtaining the data corresponding to the page floor, and then continue to obtain the data of the next page floor to render the page floors sequentially.

[0078] It should be noted that when the terminal renders the data of the page floor, it renders it at the corresponding position of the page based on the view in the data and the height of the floor, so as to obtain a visualized page floor. In this embodiment, the width of each page floor can be uniformly set to the display width of the terminal, and the rendering is performed according to the floor order and height of each page floor, and finally a complete page is obtained.

[0079] In this embodiment, by obtaining the floor information of the page floor corresponding to the page, and determining the floor order corresponding to each page floor based on the floor information, by directly obtaining the data of the system floor and rendering it in the determined floor order, when rendering the business side floor, a virtual floor is created that is consistent with the architecture of the system floor corresponding to the original component, and the data of the business side floor is obtained and rendered through the virtual floor, thereby achieving compatibility between the business side floor and the system floor, and obtaining a fully compatible and available page that combines the system floor and the business side floor.

[0080] In some embodiments, see Figure 5 , Figure 5 The page rendering method provided in the embodiment of the present application is based on Figure 3 An optional flow chart of the steps before step S103, before step S103, the following steps may also be performed:

[0081] Step S201, according to each floor identification, obtain the type information of the corresponding page floor;

[0082] It should be noted that after the terminal obtains the floor ID of each page floor, it can determine the type information of the page floor according to the floor ID. The types of page floors include two types, namely, system floors and business floor. In this embodiment, the terminal can obtain the type information of the page floor corresponding to the floor ID by querying the correspondence between the floor ID and the data of the corresponding page floor. For example, the floor ID corresponding to the system floor is stored mapped with the corresponding data, and the data of the system floor is stored in the directory of the original component. The terminal can determine through the directory that the page floor indicated by the type information corresponding to the floor ID is the system floor.

[0083] Step S202: Based on the acquired type information of each page floor, determine whether the page floor corresponding to each floor identification is a system floor or a business floor.

[0084] It should be noted that the terminal determines the type of the page floor corresponding to each floor ID based on the type information of each page obtained, so as to distinguish the types of all page floors and obtain system floors and business floors with clear types. Based on the clearly distinguished system floors and business floors, when loading and rendering the data of the page floors, different methods can be used in a targeted manner.

[0085] Of course, the execution order of steps S201 and S202 is not limited to Figure 5 shown.

[0086] In some embodiments, reference Figure 6 , Figure 6 The page rendering method provided in the embodiment of the present application is based on Figure 3 An optional flow chart of the steps before step S103, before step S103, the following steps may also be performed:

[0087] Step S301, obtaining a system floor identification list recording the floor identifications of system floors;

[0088] It should be noted that the system floor identification list records the floor IDs of all system floors corresponding to the page. The storage order of the floor IDs in the system floor identification list can be the original floor order of the original component or a random order. When the terminal needs to determine the type of the page floor, it calls the system floor identification list to obtain the information recorded in the series of floor identification lists.

[0089] Step S302, based on the floor identification of each page floor, query the system floor identification list;

[0090] It should be understood that the floor corresponding to the floor ID recorded in the system floor identification list is the system floor. In this embodiment, the terminal queries the system floor identification list according to the floor ID of each page floor in turn. Specifically, when the terminal queries based on the floor ID corresponding to a certain page floor, the floor ID queried in the system floor identification list is compared with the floor ID corresponding to the page floor in turn. If they are consistent, the query is terminated, otherwise the system floor identification list is continued to be queried until the floor ID in the system floor identification list is compared.

[0091] Step S303, determining the page floor corresponding to the floor identifier queried in the system floor identifier list as the system floor, and determining the page floor corresponding to the floor identifier not queried in the system floor identifier list as the business floor.

[0092] It can be understood that if a floor ID consistent with the floor ID of the page floor is queried in the system floor identification list, the page floor corresponding to the floor ID is the system floor. If a floor ID consistent with the floor ID of the page floor is not queried in the system floor identification list, the page floor corresponding to the floor ID is not the system floor. In this embodiment, the page floor corresponding to the floor ID that has not been queried is determined as the business party floor.

[0093] In some embodiments, the business party also provides a business floor identification list for the developed custom component, which records the floor IDs corresponding to the business party floors corresponding to all custom components. In step S303, for the floor ID corresponding to the page floor that is not queried in the system floor identification column, the terminal further queries the business floor identification list. If the floor ID corresponding to the page floor is queried in the business floor identification list, the page floor is determined as the business party floor. If it is queried in both the system floor identification list and the business floor identification list, the page floor is discarded and no further processing is performed.

[0094] In this embodiment, by querying the system floor identification list that records the floor ID corresponding to the system floor, the type of the page floor of unknown type is determined according to the query result class, so that the types of all page floors can be determined very quickly and effectively.

[0095] Of course, the execution order of steps S301, S302 and S303 is not limited to Figure 6 shown.

[0096] In some embodiments, before step S103, it may also be performed: based on the floor information, create a floor information cache, so as to obtain data corresponding to the page floor by searching the floor information cache.

[0097] It should be noted that the cache is a buffer for data exchange. When the terminal wants to read data, it will first search for the required data from the cache. If the data is found, it will be executed directly. If not, it will be searched from the memory. Since the cache runs much faster than the memory, it can help the hardware run faster. In this embodiment, the floor information cache stores floor information. Specifically, the floor information may include a mapping relationship between the floor identifier of the page floor and the data corresponding to the page floor. The floor information can be stored in the form of a list, for example, based on Figure 4 For the shopping APP shown in the figure, the floor information of each page floor corresponding to the product details page can be: “floors”:[{“mId”:“bpMainImage”,“data”:Object{…}}{mI d”:“bpMustPing”,“data”:Object{…}}{“mId”:“bpTitle”,“data”:Object{…}}{mId”:“bpDiscount”,“data”:Object{…}}{mId”:“bpPingTuan”,“data”:Object{…}}{mId”:“bpShoppingCart”,“data”:Object{…}}].

[0098] In this embodiment, when the terminal needs to find the data corresponding to the page floor, it first queries the floor information cache according to the floor ID of the page floor. If it is found in the floor information cache, the data of the page floor corresponding to the floor ID is directly obtained and loaded. If the floor ID is not found in the floor information cache, the system floor identification list and the business floor identification list are queried. By setting the floor information cache, the speed of finding the floor ID and obtaining the data of the page floor is improved.

[0099] Of course, the execution order of step S401 is not limited to Figure 7 shown.

[0100] In some embodiments, see Figure 7 , Figure 7 The page rendering method provided in the embodiment of the present application is based on Figure 3 An optional flowchart of the steps after step S104; after step S104, the following may also be performed:

[0101] Step S401, monitor the page and obtain the interaction instruction;

[0102] It should be noted that after the terminal has loaded the page, it can provide an interactive interface to the user based on the page. The user can issue an interactive instruction by clicking on the page. After the terminal receives the user's interactive instruction based on the page, it can respond to the interactive instruction according to the background logic unit. In this embodiment, the terminal monitors the state of the page, and when a click event is monitored, the click event is converted into an interactive instruction.

[0103] Step S402: According to the target page floor corresponding to the interaction instruction, request the floor logic unit corresponding to the target page floor to respond to the interaction instruction.

[0104] In the embodiment of the present invention, the page is composed of various page floors, each page floor corresponds to an independent component, and each component corresponds to an independent floor logic unit to process the interactive instruction triggered by the page floor corresponding to the component. When the terminal obtains the interactive instruction, it obtains the floor information of the page floor corresponding to the triggering interactive instruction, and based on the floor information of the page floor, sends the interactive instruction to the floor logic unit corresponding to the page floor, so that the floor logic unit responds to the interactive instruction, and returns the response result to the page for display for the user to browse. Through the floorization of the page and the independent logical processing of the floor-based page, it is very convenient to realize the functional expansion of the original component without the business party knowing the internal logical structure of the original component, and it is also possible to reliably realize customized functional customization.

[0105] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.

[0106] Reference Figure 1 , the page is the user interface of the APP, which can be the user interface of one of the components of the APP. For example Figure 4 The page shown is the page corresponding to the product details component of the shopping app. The page is logically divided vertically into multiple separate business units, and each business unit is the corresponding page floor. For example Figure 4 The main image layer, group purchase layer, title layer, discount layer, group purchase layer and shopping cart layer are shown. Each page layer is defined with a unique identifier. For example, the identifier of the main image layer is defined as bpMainImage, and the identifier of the title layer is defined as bpTitle, etc.

[0107] In an embodiment of the present application, the page floors include the system floors that come with the APP and the business floor developed by the business party. Among them, the business floor is generated based on a predetermined protocol. The predetermined protocol includes a method for returning the view of the business floor, a method for returning the height of the business floor, and a method for setting the data of the business floor. The system floor also corresponds to a system floor identification list, which stores the floor IDs corresponding to all system floors. The business floor also corresponds to a business floor identification list, which stores the floor IDs corresponding to all business floors. In addition, the page also corresponds to a floor management unit, and the terminal manages each page floor of the page based on the floor management.

[0108] When the terminal obtains the page rendering instruction, it requests a floor identification list from the server. The floor identification list stores the floor IDs of the page floors, including the floor IDs corresponding to the system floors and the floor IDs corresponding to the business floor. The order of the floor IDs stored in the floor identification list is the order in which the corresponding page floors are rendered. The business party can change the order of rendering the page floors by changing the order of the floor IDs in the floor identification list in the server.

[0109] After the terminal obtains the floor identification list, it creates a cache to store the mapping relationship between the floor ID and the corresponding page floor data. When it is necessary to find the page floor, the terminal searches the cache to obtain the corresponding floor ID and the corresponding page floor data. If the floor ID is found in the cache, the data of the page floor is directly obtained, and the floor is created for rendering. Among them, if the page floor corresponding to the found floor ID is the system floor, the visual system floor is directly rendered. If the page floor corresponding to the found floor ID is the business floor, a virtual floor is created, and communication is carried out with the business floor based on a predetermined protocol to obtain the data of the business floor, and the business floor is rendered to obtain the visual business floor. If the floor ID is not found in the cache, the system floor identification list is continued to be searched. If it is found in the system floor identification list, the floor ID is added to the cache, and the floor is created and rendered. If the floor ID is not found in the system floor identification list, the business floor identification list is searched. If it is found, the floor ID is added to the cache, and a virtual floor is created for rendering. If the floor ID is not found in the system floor ID list and the business floor ID list, the floor ID is discarded. According to the above process of searching for floor ID and rendering the floor, the rendering of the page floor corresponding to the floor ID is completed in sequence to obtain the page.

[0110] The following is a description of an exemplary structure of a page rendering device 455 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2As shown, the software modules stored in the page rendering device 455 of the memory 450 may include:

[0111] The acquisition module 4551 is used to acquire the floor information of the page floor corresponding to the page, wherein the page floor includes: the system floor corresponding to the original page element in the page, and the business party floor corresponding to the custom page element that is combined with the original page element to form the page;

[0112] A floor sequence determination module 4552, used to determine the floor sequence corresponding to each of the page floors based on the floor information;

[0113] The floor creation module 4553 is used to obtain data corresponding to the system floor, and create a virtual floor corresponding to the business party floor and consistent with the system floor architecture, so as to obtain one or more groups of data corresponding to the business party floor through the virtual floor;

[0114] The rendering module 4554 is used to render the system floors and the business floor in the order of the floors based on the data of the system floors and the data of the business floor to obtain the page.

[0115] In an embodiment of the present invention, the floor information of the page floors includes the floor identifiers corresponding to each page floor respectively; the determination module 4552 is also used to determine the floor order corresponding to each page floor based on the storage order of the floor identifiers corresponding to each page floor.

[0116] In an embodiment of the present invention, the software module stored in the page rendering device 455 of the memory 450 may also include: a floor type determination module 4555, which is used to obtain the type information of the corresponding page floor according to each of the floor identifiers; based on the acquired type information of each of the page floors, determine whether the page floor corresponding to each of the floor identifiers is a system floor or a business floor.

[0117] In an embodiment of the present invention, the floor type determination module 4555 is also used to obtain a system floor identification list that records the floor identifications of the system floors; query the system floor identification list based on the floor identifications of each of the page floors; determine the page floor corresponding to the floor identification queried in the system floor identification list as the system floor, and determine the page floor corresponding to the floor identification not queried in the system floor identification list as the business floor.

[0118] In an embodiment of the present invention, the business party floor is generated based on a predetermined protocol; the floor creation module 4553 is also used to obtain one or more groups of data corresponding to the business party floor through the virtual floor according to the predetermined protocol.

[0119] In an embodiment of the present invention, the software module stored in the page rendering device 455 of the memory 450 may also include: a cache creation module 4556, which is used to create a floor information cache based on the floor information, so as to obtain data corresponding to the page floor by searching the floor information cache.

[0120] In an embodiment of the present invention, the software module stored in the page rendering device 455 of the memory 450 may also include: a response module 4557, which is used to monitor the page and obtain interaction instructions; according to the target page floor corresponding to the interaction instruction, request the floor logic unit corresponding to the target page floor to respond to the interaction instruction.

[0121] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the page rendering method described above in the embodiment of the present application.

[0122] The present application embodiment provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the page rendering method provided by the present application embodiment, for example, Figure 3 The method shown.

[0123] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EP ROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.

[0124] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0125] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0126] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0127] In summary, through the embodiments of the present application, the compatibility between the business side floor and the system floor is achieved, and a fully compatible and available page combining the system floor and the business side floor can be obtained.

[0128] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A page rendering method, characterized in that: include: Acquire floor information of a page floor corresponding to a page, wherein the page floor includes: a system floor corresponding to an original page element in the page, and a business floor corresponding to a custom page element that is combined with the original page element to form the page; Based on the floor information, determine the floor order corresponding to each of the page floors; Acquire data corresponding to the system floor, and create a virtual floor corresponding to the business party floor and consistent with the system floor architecture, so as to acquire one or more sets of data corresponding to the business party floor through the virtual floor; Based on the data of the system floor and the data of the business floor, the system floor and the business floor are rendered respectively in the order of the floors to obtain the page.

2. The page rendering method according to claim 1, characterized in that: The floor information of the page floors includes floor identifiers corresponding to the respective page floors; The determining, based on the floor information, the floor order corresponding to each of the page floors includes: Based on the storage order of the floor identifiers corresponding to the floors on each page, the floor order corresponding to the floors on each page is determined.

3. The page rendering method according to claim 1, characterized in that: The method further comprises: According to each floor identification, obtain the type information of the corresponding page floor; Based on the acquired type information of each of the page floors, determine whether the page floor corresponding to each of the floor identifiers is a system floor or a business floor.

4. The page rendering method according to claim 1, characterized in that: The method further comprises: Get the system floor ID list recording the floor IDs of the system floors; Based on the floor identification of each of the page floors, query the system floor identification list; The page floor corresponding to the floor identifier queried in the system floor identifier list is determined as the system floor, and the page floor corresponding to the floor identifier not queried in the system floor identifier list is determined as the business floor.

5. The page rendering method according to claim 1, characterized in that: The business party floor is generated based on a predetermined agreement; The obtaining one or more sets of data corresponding to the business party floor through the virtual floor includes: According to the predetermined protocol, one or more sets of data corresponding to the business party floor are obtained through the virtual floor.

6. The page rendering method according to claim 5, characterized in that: The method further comprises: Based on the floor information, a floor information cache is created to obtain data corresponding to the page floor by searching the floor information cache.

7. The page rendering method according to any one of claims 1 to 6, characterized in that: After rendering the system floors and the business side floors respectively according to the floor order, the page rendering method further includes: Monitor the page and obtain interaction instructions; According to the target page floor corresponding to the interaction instruction, the floor logic unit corresponding to the target page floor is requested to respond to the interaction instruction.

8. A page rendering device, characterized in that: include: An acquisition module, used to acquire floor information of a page floor corresponding to a page, wherein the page floor includes: a system floor corresponding to an original page element in the page, and a business floor corresponding to a custom page element that is combined with the original page element to form the page; A floor sequence determination module, used to determine the floor sequence corresponding to each of the page floors based on the floor information; A floor creation module, used to obtain data corresponding to the system floor, and create a virtual floor corresponding to the business party floor and consistent with the system floor architecture, so as to obtain one or more groups of data corresponding to the business party floor through the virtual floor; A rendering module is used to render the system floors and the business floor in the order of floors based on the data of the system floors and the data of the business floor to obtain the page.

9. A page rendering device, characterized in that: include: A memory for storing executable instructions; The processor is used to implement the page rendering method described in any one of claims 1 to 7 when executing the executable instructions stored in the memory.

10. A computer-readable storage medium, characterized in that: Executable instructions are stored, which are used to implement the page rendering method described in any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Page configuration method and device, server and medium

    CN108008954A

  • Page information individualization processing method, device and system

    CN108153788A