Page rendering method and device

By using the method of calling and expanding business component interfaces in the B -end credit scenario of e -commerce, the problem of unable to share the business module can be solved, the sharing and expansion of cross -application business components is realized, and scalability and efficiency are improved.

CN119356769APending Publication Date: 2025-01-24CHINABANK PAYMENT (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411418927.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In the B-side credit scenario in the e-commerce field, common business modules such as credit and coupon statistics cannot be shared among different web applications, resulting in repeated development, high cost and low efficiency. The existing cross-application sharing method is implemented through iframes, but it cannot flexibly expand business components, which have limitations.

Method used

Perform components through interfaces exposed by business components, realize cross -application business component sharing, and expand based on call -based business components to update data rendering rules to improve scalability.

Benefits of technology

Realize the inter -application -sharing and flexible expansion of business components, improve the scalability of business capabilities, and reduce repeated development and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356769A_ABST
    Figure CN119356769A_ABST
Patent Text Reader

Abstract

The invention discloses a page rendering method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the steps of obtaining a page display demand, determining a corresponding target business component, calling the business component through a target interface, performing function expansion based on the component, obtaining a target component, updating and covering a rendering rule of the target component, and finally completing a page rendering operation. According to the implementation mode, cross-application calling of different functional components is achieved, the service expansibility is improved, and sending-free updating during component calling is achieved through updating and covering of the rendering rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for page rendering. Background Art

[0002] At present, in the B-end credit scenario in the e-commerce field, some common business modules, such as credit granting, coupon statistics and other business modules, often exist in different web applications when in use. In each application, the same business module is independently developed and maintained, and it is impossible to share business modules between applications, resulting in repeated development, high costs and low efficiency.

[0003] The existing cross-application shared business modules are mainly implemented through iframes, which share functions through embedded iframes and then implement cross-application module calls. However, this method only relies on the postMessage mechanism for communication between applications and cannot flexibly expand business components, which has certain limitations. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method and device for page rendering, which can call components through interfaces exposed by business components to achieve cross-application business component sharing. At the same time, it can also expand based on the called business components to achieve data updates in the business components, thereby improving the scalability of business capabilities.

[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for page rendering is provided, comprising:

[0006] Determine the target business components of the target business platform based on the obtained page display requirements;

[0007] Calling the target service component through the target interface corresponding to the target service component;

[0008] When the target business component does not meet the preset display condition, a target component is obtained by performing function expansion based on the target business component;

[0009] Updating the rendering rule of the target component based on the preset display condition;

[0010] The page is rendered based on the target component and the updated rendering rule to obtain a target page.

[0011] Optionally, the method further includes: when the target business component meets a preset display condition, performing page rendering based on the target business component and a rendering rule of the target business component to obtain a target page.

[0012] Optionally, before determining the target business component based on the acquired page display requirements, the method further includes: developing the target business component based on data and method driven view rendering through view interface development; and packaging the target business component and the corresponding target interface.

[0013] Optionally, before calling the target business component through the target interface included in the target business component, the method further includes: loading packaging data of the target business component and determining a target interface of the target business component.

[0014] Optionally, calling the target business component through a target interface included in the target business component includes: determining a calling address of the target business component through a target interface corresponding to the target business component; and calling the target business component based on the calling address.

[0015] Optionally, performing page rendering based on the target component and the updated rendering rules to obtain the target page includes: determining a display position of the target component based on the page display requirements; rendering the target component at the display position based on the target component and the updated rendering rules to obtain the target page.

[0016] According to another aspect of an embodiment of the present invention, there is provided a device, comprising:

[0017] A determination module is used to determine the target business components of the target business platform based on the acquired page display requirements;

[0018] A calling module, used to call the target service component through a target interface corresponding to the target service component;

[0019] An expansion module, used for, when the target business component does not meet the preset display conditions, performing function expansion based on the target business component to obtain a target component;

[0020] An updating module, used for updating the rendering rule of the target component based on the preset display condition;

[0021] The rendering module is used to perform page rendering based on the target component and the updated rendering rules to obtain a target page.

[0022] Optionally, the device further includes: a rendering module, which is further used to perform page rendering based on the target business component and the rendering rule of the target business component to obtain a target page when the target business component meets a preset display condition.

[0023] Optionally, the device further includes: a development module, which is used to develop a target business component based on data and method driven view rendering by way of view interface development; and to package the target business component and the corresponding target interface.

[0024] Optionally, the device further includes: a loading module, configured to load the packaging data of the target business component and determine a target interface of the target business component.

[0025] Optionally, a calling module, used to call the target business component through the target interface corresponding to the target business component, includes: a determination module, used to determine the calling address of the target business component through the target interface contained in the target business component; and a calling module, used to call the target business component based on the calling address.

[0026] Optionally, a rendering module is used to render a page based on the target component and the updated rendering rules to obtain a target page, including: a determination module is used to determine a display position of the target component based on the page display requirements; a rendering module is used to render the target component at the display position based on the target component and the updated rendering rules to obtain the target page.

[0027] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising: one or more processors; 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 data rendering method provided by an embodiment of the present invention.

[0028] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the data rendering method provided by an embodiment of the present invention is implemented.

[0029] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the data rendering method provided by an embodiment of the present invention is implemented.

[0030] An embodiment of the above invention has the following advantages or beneficial effects: by displaying the requirements on the page, the target business component to be called is determined, and the corresponding component is called based on the target interface exposed by the target component to realize the sharing of the business component, and then the corresponding target component is obtained by functionally expanding the business component, thereby improving the scalability of the business capability. The page is rendered based on the expanded data to realize the business expansion process.

[0031] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0033] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present invention;

[0034] Figure 2 This is a schematic diagram of the main process of the page rendering method according to an embodiment of the present invention;

[0035] Figure 3 is a schematic diagram of main modules of a device for page rendering according to an embodiment of the present invention;

[0036] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0037] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0038] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0039] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution disclosed in the present invention are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0040] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.

[0041] like Figure 1The application scenario schematic diagram of an embodiment of the present invention is shown, including a business front-end application (application A), a business component platform (application B) and a display page obtained by rendering the business component of the called business component platform based on the business front-end application. Among them, the business component pool in the business component platform stores business components A, business components B and business components C. The business front-end application includes module 1 (module that reuses business component A), module 2 (module that reuses and extends business component B), module 3 (module of the business line itself) and module federation remote loading configuration data, which is used to implement cross-application calls of business components of the business component platform. The business line front-end application renders the page based on module 1, module 2, and module 3 to obtain a browser page display, which includes rendered modules 1, 2, and 3. It should be known that the business components A, B, C and modules 1, 2, and 3 in the above description are only examples. In actual application scenarios, the number and names of business components and modules can be freely set without limitation. In this schematic diagram, the business line application (application A) as a user needs to use certain components in the business component platform (application B). Based on the module federation technical solution, the components in application B need to be exposed first (specific steps: 1. Load the module federation npm (Node Package Manager, a package manager for the software runtime environment) package, 2. Declare and expose the components that need to be remotely referenced according to the API in the module federation package), and then remotely reference application B in application A (specific steps: 1. Load the module federation npm package, 2. Reference the components exposed in application A according to the API in the module federation package).

[0042] Figure 2 is a schematic diagram of the main process of the method for page rendering according to an embodiment of the present invention, such as Figure 2 As shown, including:

[0043] Step S201: determining a target business component of a target business platform based on the acquired page display requirements.

[0044] Generate corresponding page display requirements based on the business requirements of the current business line application. The page display requirements include information about the business components that need to be displayed at each location on the page, that is, according to the page display requirements, it is possible to determine the information about the target business components that need to be called in the target business platform. The page display requirements also include requirements for the display methods of each target business component, such as restrictions on the rendering method of the target business component and restrictions on the display content.

[0045] Step S202: calling the target business component through the target interface included in the target business component.

[0046] After determining the target business component, the target business component is called through the exposed target interface. The target interface is exposed through the interface (API) in the module federation npm package to realize the exposure of the target business component in the target business platform. After the target business component is exposed, the target business component can be called through the API.

[0047] Step S203: when the target business component does not meet the preset display condition, function expansion is performed based on the target business component to obtain the target component.

[0048] Based on the obtained page display requirements, the preset display conditions of the target business component are screened to determine whether the current target business component can meet the preset display conditions and whether it needs to be modified. If the preset display conditions are not met, the function of the target business component needs to be expanded. During the expansion, the target business component needs to be inherited through the estends method provided by the development framework for building the user interface to obtain the target component for subsequent modification of the rendering rules of the target component.

[0049] Step S204: updating the rendering rule of the target component based on the preset display condition.

[0050] When the target business component does not meet the preset display conditions and needs to be expanded in function, the corresponding rendering rules are written according to the preset display conditions, and the original rendering method in the target component is replaced and updated based on the written rendering rules, so that the business line front-end application can render based on the updated rendering rules, thereby achieving flexible expansion of the page view.

[0051] Step S205 , performing page rendering based on the target component and the updated rendering rules to obtain a target page.

[0052] The page is rendered according to the called target components and the updated rendering rules corresponding to each target component. For components whose rendering rules have not been updated, the original rendering rules are used for page rendering. For the components of the business line front-end application itself, the component's own rendering rules are used for page rendering to obtain the final target page.

[0053] According to the page rendering method provided by the embodiment of the present invention, the cross-application call of the target business component can be realized through the target interface of the module federation package, thereby reducing the repeated development of business components. When the target business component does not meet the preset display conditions, the target business component is first inherited to obtain the target component, and then the rendering rules of the target component are overwritten and updated, and the page rendering is performed, thereby improving the scalability of the business.

[0054] Optionally, the method further includes: when the target business component meets the preset display condition, performing page rendering based on the target business component and the rendering rule of the target business component to obtain the target page. When the target business component meets the preset display condition, the target business component does not need to be modified, and the page rendering is directly performed according to the rendering rule of the target business component to obtain the target page.

[0055] According to the page rendering method provided by the embodiment of the present invention, it is possible to implement cross-application calls of target business components through the target interface of the module federation package, reduce repeated development of business components, and determine whether to modify the component by judging whether the target business component meets the preset display conditions. If the display conditions are not met, the rendering rules of the business component can be modified, and then overwritten and updated, and the page rendering can be performed, thereby improving the scalability of the business, and being able to flexibly set the rendering rules of the component according to display requirements, thereby improving business processing capabilities.

[0056] Optionally, based on the acquired page display requirements, before determining the target business component, the method also includes: developing a target business component based on data and method driven view rendering through view interface development; and packaging the target business component and the corresponding target interface. Before calling a business component, the business component must be processed first. Specifically, the business component is written using jsx syntax, and the business component is exposed according to the target interface of the module federation library, that is, the business component can be called through the target interface. The target interface and the business component are packaged. Among them, the packaging process can be achieved through the module federation technology of webpack5.

[0057] Optionally, before calling the target business component through the target interface corresponding to the target business component, the method further includes: loading the packaged data of the target business component and determining the target interface of the target business component. Before calling the business component, the packaged data of the target business component needs to be loaded to obtain the target business component and the corresponding target interface.

[0058] According to the page rendering method provided by an embodiment of the present invention, cross-application calls of target business components can be realized through the target interface of the module federation package. During development, the module federation technology is used to expose the target business components to the corresponding target interface to facilitate subsequent calls, reduce repeated development of business components, and reduce business development costs.

[0059] Optionally, calling the target business component through the target interface corresponding to the target business component includes: determining the calling address of the target business component through the target interface included in the target business component; and calling the target business component based on the calling address. After loading the packaged data of the target business component, determining the calling address of the target business component according to the obtained target interface, and implementing the calling process of the target business component based on the calling address.

[0060] Optionally, rendering the page based on the target component and the updated rendering rules to obtain the target page includes: determining the display position of the target component based on the page display requirements; rendering the target component at the display position based on the target component and the updated rendering rules to obtain the target page. Determine the display position of the target component in the page according to the page display requirements, and render it at the determined display position according to the updated rendering rules to obtain the rendered component.

[0061] Optionally, when the business component code in the business component pool of the business component platform is updated / repaired, the latest version of the static file (the latest version of the business component code) is stored in the business component platform. Since the business line front-end application calls the business component in the business component platform in real time, when the code of the business component in the business component platform is updated / repaired, the latest version of the business component code can be automatically called and rendered to obtain the target page, which can realize the free update of cross-application business components, that is, there is no need to release the latest version of the business component and then call it, simplifying the update process and improving business efficiency.

[0062] According to the page rendering method provided by the embodiment of the present invention, it is possible to implement cross-application calls of target business components through the target interface of the module federation package, reduce the repeated development of business components, and when the target business component does not meet the preset display conditions, first inherit the target business component to obtain the target component, then overwrite and update the rendering rules of the target component, and perform page rendering; and components that meet the preset display conditions can be directly rendered, which improves the scalability of the business and the flexible modification of the target business component. In addition, since the cross-application call of the target business component is a real-time call, that is, the latest version of the target business component data will be called for rendering each time the rendering is performed, so when the called component is updated or repaired, it can be automatically updated to achieve the free update of the business component, which greatly improves the flexibility and practicality of the business component expansion.

[0063] Figure 3 is a schematic diagram of a page rendering device 300 provided in an embodiment of the present invention, such as Figure 3 As shown, the apparatus 300 for page rendering according to the embodiment of the present invention mainly includes: a determination module 301 , a calling module 302 , an expansion module 303 , an update module 304 and a rendering module 305 .

[0064] A determination module 301 is used to determine a target business component of a target business platform based on the acquired page display requirements;

[0065] A calling module 302 is used to call a target business component through a target interface corresponding to the target business component;

[0066] An expansion module 303 is used to expand the business based on the target business component to obtain the target component when the target business component does not meet the preset display condition;

[0067] An updating module 304, used to update the rendering rule of the target component based on a preset display condition;

[0068] The rendering module 305 is used to render the page based on the target component and the updated rendering rules to obtain the target page.

[0069] The page rendering device provided according to the embodiment of the present invention can realize cross-application calling of the target business component through the target interface of the module federation package, reduce the repeated development of business components, and when the target business component does not meet the preset display conditions, first inherit the target business component to obtain the target component, then overwrite and update the rendering rules of the target component, and perform page rendering, thereby improving the scalability of the business.

[0070] Optionally, the device further includes: a rendering module 305, which is further configured to perform page rendering based on the target business component and a rendering rule of the target business component to obtain a target page when the target business component meets a preset display condition.

[0071] Optionally, the device further includes: a development module 306, which is used to develop a target business component based on data and method driven view rendering by way of view interface development; and to package the target business component and the corresponding target interface.

[0072] Optionally, the device further includes: a loading module 307, which is used to load the packaging data of the target business component and determine the target interface of the target business component.

[0073] Optionally, the calling module 302 is used to call the target business component through the target interface corresponding to the target business component, including: a determining module 301, used to determine the calling address of the target business component through the target interface included in the target business component; and a calling module 302, used to call the target business component based on the calling address.

[0074] Optionally, a rendering module 305 is used to render a page based on a target component and updated rendering rules to obtain a target page, including: a determination module 301 is used to determine a display position of a target component based on page display requirements; a rendering module 305 is used to render a target component at a display position based on the target component and updated rendering rules to obtain a target page.

[0075] The device for page rendering provided in accordance with the embodiment of the present invention can realize cross-application calls of target business components through the target interface of the module federation package, reduce the repeated development of business components, and when the target business component does not meet the preset display conditions, first inherit the target business component to obtain the target component, then overwrite and update the rendering rules of the target component, and perform page rendering; and components that meet the preset display conditions can be directly rendered, which improves the scalability of the business and the flexible modification of the target business component. In addition, since the cross-application call of the target business component is a real-time call, that is, the latest version of the target business component data will be called for rendering each time the rendering is performed, so when the called component is updated or repaired, it can be automatically updated to achieve the free update of the business component, which greatly improves the flexibility and practicality of the business component expansion.

[0076] Figure 4 An exemplary system architecture 400 is shown to which the method or apparatus for page rendering according to an embodiment of the present invention may be applied.

[0077] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0078] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0079] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0080] The server 405 may be a server that provides various services, such as a background management server that supports websites browsed by users using terminal devices 401, 402, and 403. The background management server may determine the target business component of the target business platform based on the obtained page display requirements for the received page rendering request; call the target business component through the target interface corresponding to the target business component; when the target business component does not meet the preset display conditions, inherit the target business component to obtain the target component; update the rendering rules of the target component based on the preset display conditions; render the page based on the target component and the updated rendering rules to obtain the target page, etc., and feed back the processing results (such as the target page - just an example) to the terminal device.

[0081] It should be noted that the page rendering method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the page rendering device is generally set in the server 405 .

[0082] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0083] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0084] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0085] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0086] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0087] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0088] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0089] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a determination module, a calling module, an inheritance module, an update module, and a rendering module. The names of these modules do not, in some cases, constitute a limitation on the module itself. For example, the determination module may also be described as "a module for determining a target business component of a target business platform based on the acquired page display requirements."

[0090] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0091] Determine the target business components of the target business platform based on the obtained page display requirements;

[0092] Call the target business component through the target interface corresponding to the target business component;

[0093] When the target business component does not meet the preset display conditions, the target component is obtained by inheritance based on the target business component;

[0094] Update the rendering rules of the target component based on the preset display conditions;

[0095] The page is rendered based on the target component and the updated rendering rules to obtain the target page.

[0096] As another aspect, the present invention further provides a computer program product, including a computer program, which implements the method of the embodiment of the present invention when the computer program is executed by a processor.

[0097] According to the technical solution of the embodiment of the present invention, the cross-application call of the target business component can be realized through the target interface of the module federation package, thereby reducing the repeated development of business components. When the target business component does not meet the preset display conditions, the target business component is first inherited to obtain the target component, and then the rendering rules of the target component are overwritten and updated, and the page rendering is performed, thereby improving the scalability of the business.

[0098] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for page rendering, characterized in that: include: Determine the target business components of the target business platform based on the obtained page display requirements; Calling the target service component through the target interface corresponding to the target service component; When the target business component does not meet the preset display condition, a target component is obtained by performing function expansion based on the target business component; Updating the rendering rule of the target component based on the preset display condition; The page is rendered based on the target component and the updated rendering rule to obtain a target page.

2. The method according to claim 1, characterized in that The method further comprises: When the target business component meets the preset display condition, page rendering is performed based on the target business component and the rendering rule of the target business component to obtain a target page.

3. The method according to claim 1 or 2, characterized in that: Before determining the target business component based on the acquired page display requirements, the method further includes: Develop a target business component based on data and method driven view rendering by means of view interface development; and package the target business component and the corresponding target interface.

4. The method according to claim 3, characterized in that Before calling the target service component through the target interface corresponding to the target service component, the method further includes: The packaging data of the target service component is loaded, and the target interface of the target service component is determined.

5. The method according to claim 1, characterized in that The calling the target service component through the target interface corresponding to the target service component includes: Determining a calling address of the target service component through a target interface included in the target service component; The target service component is called based on the calling address.

6. The method according to claim 1, characterized in that The performing page rendering based on the target component and the updated rendering rule to obtain the target page includes: Determining a display position of the target component based on the page display requirement; The target component is rendered at the display position based on the target component and the updated rendering rule to obtain a target page.

7. A device for page rendering, characterized in that: include: A determination module is used to determine the target business components of the target business platform based on the acquired page display requirements; A calling module, used to call the target service component through a target interface corresponding to the target service component; An expansion module, used for, when the target business component does not meet the preset display conditions, performing function expansion based on the target business component to obtain a target component; An updating module, used for updating the rendering rule of the target component based on the preset display condition; The rendering module is used to perform page rendering based on the target component and the updated rendering rules to obtain a target page.

8. An electronic device, characterized in that: include: one or more processors; a 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 according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.