Component rendering method, device, readable medium and electronic device
Through the component configuration file acquisition and rendering method of the component management platform, the problems of slow component loading and integration reuse are solved, and the page rendering efficiency and component development efficiency are improved.
Patent Information
- Application Number
- CN202011448989.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-09
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-12-09
Smart Images

Figure CN112558933B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a component rendering method, device, readable medium and electronic device. Background Art
[0002] At present, the concept of componentization is usually adopted in the development of front-end pages. The page can be regarded as a container of components, and each page can be composed of one or more components. As an independent entity, the component can be applied in different pages.
[0003] Rendering a component may refer to the process of converting a data object into a visual object. In the related art, when rendering a component, the loading speed of the component is slow, which affects the rendering efficiency of the entire page. In addition, each component may be developed by different developers. How to effectively integrate these components and achieve independent development and dynamic combination of components is an important issue in the field of front-end development. Summary of the invention
[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0005] In a first aspect, the present disclosure provides a component rendering method, the method comprising: in response to the presence of a component of a second application in a current page, sending a component configuration file acquisition request to a component management platform, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; receiving the component configuration file sent by the component management platform, and determining a target component to be rendered of the second application in the current page based on the component configuration information; acquiring the target component to be rendered from the component management platform, and rendering the target component to be rendered in the current page.
[0006] In a second aspect, the present disclosure provides a component rendering method, the method comprising: receiving a component configuration file acquisition request sent by a terminal in response to a component of a second application existing in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; sending the component configuration file to the terminal so that the terminal determines a target component to be rendered of the second application in the current page based on the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after acquiring the target component to be rendered.
[0007] In a third aspect, the present disclosure provides a component rendering device, comprising: a first sending module, configured to send a component configuration file acquisition request to a component management platform in response to the presence of a component of a second application in a current page, wherein the second application is different from the first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; a first determination module, configured to receive the component configuration file sent by the component management platform, and determine a target component to be rendered of the second application in the current page based on the component configuration information; a rendering module, configured to obtain the target component to be rendered from the component management platform, and render the target component to be rendered in the current page.
[0008] In a fourth aspect, the present disclosure provides a component rendering device, comprising: a receiving module, configured to receive a component configuration file acquisition request sent by a terminal in response to a component of a second application existing in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; a second sending module, configured to send the component configuration file to the terminal, so that the terminal determines the target component to be rendered of the second application in the current page according to the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after acquiring the target component to be rendered.
[0009] In a fifth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method provided in the first aspect of the present disclosure.
[0010] In a sixth aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method provided in the second aspect of the present disclosure.
[0011] In a seventh aspect, the present disclosure provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method provided in the first aspect of the present disclosure.
[0012] In an eighth aspect, the present disclosure provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method provided in the second aspect of the present disclosure.
[0013] Through the above technical solution, the terminal can respond to the presence of a component of the second application in the current page, and send a component configuration file acquisition request to the component management platform. The second application is different from the first application corresponding to the current page. The component configuration file can be constructed based on the component configuration information of multiple components. Compared with the multiple components published to the component management platform, the space occupied by the component configuration file is relatively small. Based on the component configuration file, the target component to be rendered of the second application is determined, and it is not necessary to load a large number of components in the component management platform to the terminal locally, but only to load the target component to be rendered in the current page that needs to be rendered, so as to realize the on-demand loading of components. Since the number of loaded components is greatly reduced, the impact of irrelevant components on the loading speed can be reduced, the component loading speed can be improved, the overall rendering efficiency of the page can be improved, and the user's browsing experience can be improved. In addition, the component developer can publish the component to the component management platform after completing the development of the component. The developers of different components will not be affected by each other, and the independent development of the component can be realized. By publishing the component to the component management platform, each application can obtain the components of other applications that need to be loaded from the component management platform, which can effectively realize the reuse of components, improve development efficiency, and reduce the coupling dependence between components of different applications. Therefore, through the above solution, not only can the component loading speed be improved, the overall page rendering efficiency can be improved, but also the effective reuse of components can be achieved and the component development efficiency can be improved.
[0014] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:
[0016] Figure 1 It is a schematic diagram showing an implementation environment according to an exemplary embodiment.
[0017] Figure 2 The present invention is a flowchart of a component rendering method according to an exemplary embodiment.
[0018] Figure 3 The figure is a flowchart of a component rendering method according to another exemplary embodiment.
[0019] Figure 4 The present invention is a flowchart of a component rendering method according to an exemplary embodiment.
[0020] Figure 5The present invention is a flowchart of interaction between a user terminal and a component management platform in a component rendering method according to an exemplary embodiment.
[0021] Figure 6 The invention is a block diagram showing a component rendering device according to an exemplary embodiment.
[0022] Figure 7 The invention is a block diagram of a component rendering device according to another exemplary embodiment.
[0023] Figure 8 The diagram is a schematic diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0030] First, the application scenarios of the present disclosure are introduced. Figure 1 FIG. 1 is a schematic diagram of an implementation environment according to an exemplary embodiment. Figure 1 As shown, the implementation environment may include a user terminal 101, a component management platform 102, and a component developer terminal 103. Various applications may be installed in the user terminal 101, and the user may browse application pages through the user terminal 101. After completing component development work, the component developer may publish the component to the component management platform 102 through the component developer terminal 103. The user terminal 101 and the component developer terminal 103 may be terminal devices such as mobile phones, tablet computers, and personal computers. Figure 1 Take the user terminal 101 as a mobile phone and the component developer terminal 103 as a personal computer as an example. The component management platform 102 can be a component management server, a cloud server, etc. The user terminal 101 and the component developer terminal 103 are both communicatively coupled with the component management platform 102, for example, they can communicate in any manner such as 3G, 4G, 5G, NB-IOT, eMTC, LTE, LTE-A, near field communication, wired communication, etc.
[0031] Figure 2 is a flowchart of a component rendering method according to an exemplary embodiment, which can be applied to a terminal, such as Figure 1 The user terminal 101 shown in FIG. Figure 2 As shown, the method may include S201 to S203.
[0032] In S201, in response to the presence of a component of the second application in the current page, a component configuration file acquisition request is sent to a component management platform.
[0033] The second application is different from the first application corresponding to the current page. At present, there are more and more applications installed in the terminals used by users, and there is a certain correlation between the various applications. The application page may integrate components of one or more other applications. For example, the first application corresponding to the current page is application A. In addition to the components of application A, the current page may also integrate components of a second application such as application B or application C.
[0034] In response to the presence of components of the second application in the current page, the user terminal 101 may send a component configuration file acquisition request to the component management platform 102, where the component configuration file acquisition request is used to request the acquisition of the component configuration file to determine which components of the second application need to be rendered through the component configuration file.
[0035] The component configuration file may be constructed according to component configuration information of multiple components. In the present disclosure, the component configuration information may be determined by the component management platform 102 according to component codes of components released to the component management platform 102 .
[0036] After determining the component configuration information of the component, the component management platform 102 may form the component configuration information of multiple components in the form of a file, i.e., the above-mentioned component configuration file. The present disclosure does not specifically limit the amount of component configuration information included in the component configuration file. Moreover, as the component developer continuously publishes components to the component management platform 102, the component configuration file may be dynamically updated, i.e., when a new component is published to the component management platform 102, the component management platform 102 may analyze and determine the component configuration information of the new component and add it to the component configuration file.
[0037] In S202, a component configuration file sent by a component management platform is received, and a target component to be rendered of a second application in a current page is determined according to the component configuration information.
[0038] After receiving the component configuration file acquisition request sent by the user terminal 101 , the component management platform 102 may send the component configuration file to the user terminal 101 , and the user terminal 101 may receive the component configuration file.
[0039] After receiving the component configuration file sent by the component management platform 102, the user terminal 101 can determine the target components to be rendered of the second application in the current page according to the component configuration information included in the component configuration file, that is, determine which components of the second application need to be rendered according to the received component configuration file. In an optional embodiment, the application A corresponding to the current page can provide a parsing module, and the parsing module can analyze the page structure of the current page when the application A is running, and determine the target components to be rendered of the second application suitable for the current page according to the page structure. Among them, the present disclosure does not make specific restrictions on the number of target components to be rendered, which can be one or more.
[0040] In S203, the target component to be rendered is obtained from the component management platform, and the target component to be rendered is rendered in the current page.
[0041] After determining the target component to be rendered of the second application, the user terminal 101 can obtain the target component to be rendered from the component management platform 102. In this way, in the present disclosure, the user terminal 101 can determine the target component to be rendered suitable for the current page according to the component configuration file, and only needs to load the target component to be rendered, without having to load a large number of components published to the component management platform 102, thereby realizing on-demand loading of components. Since the number of loaded components is greatly reduced, the impact of irrelevant components on the loading speed can be reduced, the component loading speed can be increased, the overall page rendering efficiency can be improved, and the user's page browsing experience can be improved.
[0042] Furthermore, for component developers, they can realize independent development of components. After completing the development of components, they can publish the components to the component management platform 102. Developers of different components will not be affected by each other. By publishing components to the component management platform 102, each application can obtain components of other applications that need to be loaded from the component management platform 102, which can effectively realize component reuse and improve development efficiency.
[0043] Through the above technical solution, the terminal can respond to the presence of a component of the second application in the current page, and send a component configuration file acquisition request to the component management platform. The second application is different from the first application corresponding to the current page. The component configuration file can be constructed based on the component configuration information of multiple components. Compared with the multiple components published to the component management platform, the space occupied by the component configuration file is relatively small. Based on the component configuration file, the target component to be rendered of the second application is determined, and it is not necessary to load a large number of components in the component management platform to the terminal locally, but only to load the target component to be rendered in the current page that needs to be rendered, so as to realize the on-demand loading of components. Since the number of loaded components is greatly reduced, the impact of irrelevant components on the loading speed can be reduced, the component loading speed can be improved, the overall rendering efficiency of the page can be improved, and the user's browsing experience can be improved. In addition, the component developer can publish the component to the component management platform after completing the development of the component. The developers of different components will not be affected by each other, and the independent development of the component can be realized. By publishing the component to the component management platform, each application can obtain the components of other applications that need to be loaded from the component management platform, which can effectively realize the reuse of components, improve development efficiency, and reduce the coupling dependence between components of different applications. Therefore, through the above solution, not only can the component loading speed be improved, the overall page rendering efficiency can be improved, but also the effective reuse of components can be achieved and the component development efficiency can be improved.
[0044] Optionally, in response to the presence of a component of the second application in the current page in S201, before sending a component configuration file acquisition request to the component management platform, the component rendering method applied to the terminal provided by the present disclosure may further include:
[0045] When the rendering of the components of the first application in the current page is completed, if there are components to be rendered in the current page, it is determined that there are components of the second application in the current page.
[0046] Usually, in order to improve the user's browsing experience, the front-end page aims to shorten the first screen time. The first screen time refers to the time consumed to display the first screen page. The total rendering time of a page is longer than the first screen time. In the case where the components of the second application are integrated in the current page, in order to shorten the first screen time, the components of the first application corresponding to the current page are usually rendered first. After the rendering of the components of the first application itself is completed, the components of the second application are loaded.
[0047] For example, the current page browsed by the user is the page of application A, and the user terminal 101 can obtain the components of application A itself from the server corresponding to application A. After the components of application A itself are rendered, if the current page has not been rendered as a whole, there may be components of the second application in the current page. It is worth noting that the present disclosure does not specifically limit the number of second applications and the number of components to be rendered, which can be one or more.
[0048] In the present disclosure, the component configuration file may be constructed by the component management platform 102 according to the component configuration information of multiple components. The component management platform 102 may construct the component configuration file in the following manner:
[0049] In response to receiving a component published to a component management platform, parsing the received component code to obtain component configuration information of the component; and constructing the component configuration information of the plurality of components into a component configuration file.
[0050] Among them, after completing the component development work, the component developers of each application can publish the components to the component management platform 102 through the component developer terminal 103. The component management platform 102 can be used to store these components and parse the component codes of these components. For example, the component code can be parsed by AST (Abstract Syntax Tree) and other methods to parse out the component configuration information of the component. The component code can be the JavaScript and CSS (Cascading Style Sheets) code of the component. For example, the component configuration information of the component may include the component package identifier (packageId), the component package name (packageName), the component package version (version), the component package download address (URL, Uniform Resource Locator, Uniform Resource Locator), the component version grayscale strategy, the component version status (status), the component type information (Type), the component rendering location information (selector), and so on. The component management platform 102 can construct the component configuration information of multiple components into a component configuration file.
[0051] In one embodiment, the component management platform 102 may construct the component configuration information of the components whose version status is visible or grayscale into a component configuration file, that is, the component configuration file may include the component configuration information of the components whose version status is visible or grayscale published to the component management platform 102.
[0052] The version status of a component can be defined by the component developer when developing the component, and can be a visible state, a gray state, or an invisible state. The version status of a component is a visible state, which means that all user terminals can load the component; an invisible state, which means that the user terminal cannot load the component; and a gray state, which means that some user terminals can load the component. The user terminals can be pre-marked. For example, a component in a gray state can be a new version of the component, so that some users use the component first, which can avoid the problem that the instability of the new version affects the use of a large number of users.
[0053] In another embodiment, the component management platform 102 may construct the component configuration information of the component whose version status is a visible state or a grayscale state and is pre-subscribed by the first application into a component configuration file, that is, the component configuration file may include the component configuration information of the component whose version status is a visible state or a grayscale state and is pre-subscribed by the first application corresponding to the current page published to the component management platform 102.
[0054] In this embodiment, each application can pre-subscribe to the required components according to its own needs, and the component management platform 102 can generate component configuration files corresponding to each application according to the components pre-subscribed by different applications. By way of example, for example, the component management platform 102 stores component configuration information of 1,000 components, and application A pre-subscribes to 200 components, then the component configuration file corresponding to application A may include the component configuration information of the 200 components it pre-subscribes to. For example, if application B pre-subscribes to 300 components, then the component configuration file corresponding to application B may include the component configuration information of the 300 components it pre-subscribes to. It should be noted that the above numerical values are only examples and do not constitute limitations on the embodiments of the present disclosure.
[0055] In this way, each application can pre-subscribe to the components it needs. The component configuration file obtained does not include the component configuration information of all components in the visible state or grayscale state, but the component configuration information of the components that meet its own needs. When determining the target component to be rendered according to the component configuration file, it can improve efficiency and reduce the impact of irrelevant components.
[0056] Figure 3 is a flowchart of a component rendering method according to another exemplary embodiment, which can be applied to a terminal, such as Figure 3 As shown, the method may include S301 to S308, wherein determining the target component to be rendered of the second application in the current page according to the component configuration information in S202 may include S303 to S305, and S203 may include S306 to S308.
[0057] In S301 (201), in response to the presence of a component of the second application in the current page, a component configuration file acquisition request is sent to a component management platform.
[0058] Among them, the specific implementation of S301 is consistent with the implementation mentioned in S201, and will not be repeated here.
[0059] In S302, a component configuration file sent by a component management platform is received.
[0060] In S303, the page structure information of the current page is obtained.
[0061] The page structure information of the current page may be a DOM (Document Object Model) structure of the current page.
[0062] In S304, in the component configuration file, rendering position information matching the position information of the to-be-rendered portion in the current page is determined according to the page structure information.
[0063] In S305, the component corresponding to the rendering position information matching the position information of the part to be rendered in the current page is determined as the target component to be rendered.
[0064] The component configuration information may include the rendering position information of the component, which may include the coordinate information of the component rendered in the page. According to the page structure information of the current page, the position information of the part to be rendered, that is, the position information of the part that has not been rendered in the current page, may be determined.
[0065] For example, in the component configuration file, you can traverse the various component configuration information included therein. If the rendering position information in the currently traversed component configuration information matches the position information of the part to be rendered in the current page, that is, they are consistent, it means that the component corresponding to the component configuration information is suitable for the current page and is the component that needs to be rendered on the current page. The component can be determined as the target component to be rendered.
[0066] It is worth noting that the present disclosure does not impose specific restrictions on the number of parts to be rendered and the number of target components to be rendered. If there are multiple parts to be rendered in the current page, the target components to be rendered corresponding to each part to be rendered can be determined. In addition, when traversing the component configuration information in the component configuration file, the traversal can be performed in sequence. For the same part to be rendered in the current page, if there are multiple components that match the location information of the part to be rendered, the component corresponding to the component configuration information traversed last can be used as the target component to be rendered.
[0067] In S306, a component acquisition request is sent to the component management platform.
[0068] After determining the target component to be rendered, the user terminal 101 may obtain the target component to be rendered from the component management platform 102. The user terminal 101 may send a component acquisition request to the component management platform 102, and the component acquisition request is used to request to obtain the target component to be rendered.
[0069] In S307, when the target component to be rendered is obtained, a loading completion event is triggered.
[0070] After receiving the component acquisition request sent by the user terminal 101, the component management platform 102 may send the target component to be rendered to the user terminal 101. After the user terminal 101 receives the target component to be rendered, it is equivalent to loading the target component to be rendered. At this time, a loading completion event may be triggered, and the loading completion event is used to indicate that the target component to be rendered has been loaded.
[0071] In S308 , in response to the loading completion event, the target component to be rendered is rendered in the current page according to the rendering timing indicated by the component type information of the target component to be rendered.
[0072] The loading completion event may indicate that the target component to be rendered has been loaded locally on the user terminal 101, and the target component to be rendered may be rendered in the current page. The component configuration information may include component type information, which may be used to indicate the rendering timing of the component. When rendering the target component to be rendered, the rendering may be performed according to the rendering timing indicated by the component type information of the target component to be rendered.
[0073] Among them, the rendering timing of different components may be different, and the rendering timing may include, for example, immediate rendering, delayed rendering, and triggered rendering. Immediate rendering means rendering the component to the current page immediately after loading it, delayed rendering means rendering the component to the page after loading it for a preset time, and triggered rendering means rendering the component to the page in response to a preset event.
[0074] Through the above technical solution, the component corresponding to the rendering position information that matches the position information of the part to be rendered in the current page is determined as the target component to be rendered, so that it is possible to accurately determine which components need to be loaded in the current page, realize on-demand loading of components, and improve the speed of component loading. Each application can obtain the target components to be rendered of other applications that need to be loaded from the component management platform, which can effectively realize the reuse of components and improve development efficiency. In addition, according to the rendering timing indicated by the component type information of the target component to be rendered, the target component to be rendered is rendered in the current page, which can ensure the accurate rendering of the target component to be rendered.
[0075] In addition, the component rendering method applied to the terminal provided by the present disclosure may also include:
[0076] Monitor the rendering status of the target component to be rendered in the current page; and / or
[0077] After the rendering of the target component to be rendered is completed, the running status of the target component to be rendered in the current page is monitored.
[0078] In the present disclosure, the first application corresponding to the current page pays more attention to the user's browsing experience. Therefore, the user terminal 101 running the first application can monitor the rendering status of the target component to be rendered in the current page. The rendering status may include whether the target component to be rendered starts rendering at the rendering timing indicated by the component type information, and whether the rendering is completed normally after the rendering starts. If the rendering status of the target component to be rendered is abnormal, such as not starting rendering at the rendering timing, or failing to complete rendering normally after starting rendering, the user terminal 101 can send the rendering abnormality to the server corresponding to the first application, so that the first application can monitor the rendering status of its own page in real time.
[0079] After the rendering of the target component to be rendered is completed, the user terminal 101 can monitor the running status of the target component to be rendered in the current page. The running status may include whether the target component to be rendered reports an error during the running process. If the running of the target component to be rendered in the current page is abnormal, the user terminal 101 can send the running abnormality to the server corresponding to the first application. In this way, the first application can monitor the running status of its own page in real time.
[0080] Among them, the user terminal 101 can monitor the rendering status of the target component to be rendered in the current page, or monitor the running status of the target component to be rendered. Preferably, the rendering status and running status of the target component to be rendered can be monitored at the same time. In this way, the first application corresponding to the current page pays more attention to the user's browsing experience, and the component developer is only responsible for independently developing the component. The first application corresponding to the current page can monitor the rendering status and / or running status of the component in the page in real time.
[0081] Figure 4 is a flowchart of a component rendering method according to an exemplary embodiment, which can be applied to a component management platform, such as Figure 1 The component management platform 102 shown. Figure 4 As shown, the method may include S401 and S402.
[0082] In S401, the receiving terminal responds to a component configuration file acquisition request sent by a component of a second application in a current page.
[0083] The terminal can be Figure 1 The user terminal 101 is shown. The second application is different from the first application corresponding to the current page, and the component configuration file is constructed according to component configuration information of multiple components.
[0084] In S402, a component configuration file is sent to the terminal, so that the terminal determines the target component to be rendered of the second application in the current page according to the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after acquiring the target component to be rendered.
[0085] Through the above technical solution, the terminal can respond to the presence of a component of the second application in the current page, and send a component configuration file acquisition request to the component management platform. The second application is different from the first application corresponding to the current page. The component configuration file can be constructed based on the component configuration information of multiple components. Compared with the multiple components published to the component management platform, the space occupied by the component configuration file is relatively small. Based on the component configuration file, the target component to be rendered of the second application is determined, and it is not necessary to load a large number of components in the component management platform to the terminal locally, but only to load the target component to be rendered in the current page that needs to be rendered, so as to realize the on-demand loading of components. Since the number of loaded components is greatly reduced, the impact of irrelevant components on the loading speed can be reduced, the component loading speed can be improved, the overall rendering efficiency of the page can be improved, and the user's browsing experience can be improved. In addition, the component developer can publish the component to the component management platform after completing the development of the component. The developers of different components will not be affected by each other, and the independent development of the component can be realized. By publishing the component to the component management platform, each application can obtain the components of other applications that need to be loaded from the component management platform, which can effectively realize the reuse of components, improve development efficiency, and reduce the coupling dependence between components of different applications. Therefore, through the above solution, not only can the component loading speed be improved, the overall page rendering efficiency can be improved, but also the effective reuse of components can be achieved and the component development efficiency can be improved.
[0086] Optionally, the component configuration file is constructed in the following manner: in response to receiving a component published to a component management platform, parsing the component code of the received component to obtain the component configuration information of the component; and constructing the component configuration information of multiple components into the component configuration file.
[0087] Optionally, constructing the component configuration information of multiple components into the component configuration file includes: constructing the component configuration information of components whose version status is a visible state or a grayscale state into the component configuration file; or, constructing the component configuration information of components whose version status is a visible state or a grayscale state and which the first application has pre-subscribed into the component configuration file.
[0088] Regarding the method in the above embodiment, the specific implementation of each step has been described in detail in the embodiment of the method on the terminal side, and will not be elaborated here.
[0089] Figure 5 FIG. 1 is a flowchart of interaction between a user terminal 101 and a component management platform 102 in a component rendering method according to an exemplary embodiment. Figure 5 As shown, the method may include S501 to S514.
[0090] In S501 , in response to the presence of a component of the second application in the current page, the user terminal 101 sends a component configuration file acquisition request to the component management platform 102 .
[0091] In S502 , the component management platform 102 receives a component configuration file acquisition request sent by the user terminal 101 .
[0092] In S503 , the component management platform 102 sends the component configuration file to the user terminal 101 .
[0093] In S504 , the user terminal 101 receives the component configuration file sent by the component management platform 102 .
[0094] In S505 , the user terminal 101 obtains page structure information of the current page.
[0095] In S506 , the user terminal 101 determines, in the component configuration file, according to the page structure information, rendering position information that matches the position information of the to-be-rendered portion of the current page.
[0096] In S507 , the user terminal 101 determines the component corresponding to the rendering position information that matches the position information of the part to be rendered in the current page as the target component to be rendered.
[0097] In S508 , the user terminal 101 sends a component acquisition request to the component management platform 102 .
[0098] In S509 , the component management platform 102 receives the component acquisition request sent by the user terminal 101 .
[0099] In S510 , the component management platform 102 sends the target component to be rendered to the user terminal 101 .
[0100] In S511 , when the user terminal 101 obtains the target component to be rendered, it triggers a loading completion event.
[0101] In S512 , in response to the loading completion event, the user terminal 101 renders the target component to be rendered in the current page according to the rendering timing indicated by the component type information of the target component to be rendered.
[0102] In S513 , the user terminal 101 monitors the rendering status of the target component to be rendered in the current page.
[0103] In S514 , after the rendering of the target component to be rendered is completed, the user terminal 101 monitors the running status of the target component to be rendered in the current page.
[0104] Figure 5The specific implementation of each step shown has been described in detail above. It is worth noting that Figure 5 This is only an example and an optional implementation of the component rendering method provided by the present disclosure.
[0105] Based on the same inventive concept, the present disclosure also provides a component rendering device. Figure 6 is a block diagram of a component rendering device according to an exemplary embodiment, which can be applied to a terminal, such as Figure 1 The user terminal 101 shown in FIG. Figure 6 As shown, the device 600 may include:
[0106] A first sending module 601 is configured to send a component configuration file acquisition request to a component management platform in response to a component of a second application existing in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed according to component configuration information of multiple components;
[0107] A first determination module 602 is configured to receive the component configuration file sent by the component management platform, and determine the target component to be rendered of the second application in the current page according to the component configuration information;
[0108] The rendering module 603 is configured to obtain the target component to be rendered from the component management platform, and render the target component to be rendered in the current page.
[0109] With the above device, the terminal can respond to the presence of a component of a second application in the current page, and send a component configuration file acquisition request to the component management platform. The second application is different from the first application corresponding to the current page. The component configuration file can be constructed based on the component configuration information of multiple components. Compared with the multiple components published to the component management platform, the space occupied by the component configuration file is relatively small. Based on the component configuration file, the target component to be rendered of the second application is determined, and it is not necessary to load a large number of components in the component management platform to the terminal locally, but only the target component to be rendered in the current page that needs to be rendered is loaded, so as to realize the on-demand loading of components. Since the number of loaded components is greatly reduced, the impact of irrelevant components on the loading speed can be reduced, the component loading speed can be increased, the overall rendering efficiency of the page can be improved, and the user's browsing experience can be improved. In addition, the component developer can publish the component to the component management platform after completing the development of the component. The developers of different components will not be affected by each other, and the independent development of the component can be realized. By publishing the component to the component management platform, each application can obtain the components of other applications that need to be loaded from the component management platform, which can effectively realize the reuse of components, improve development efficiency, and reduce the coupling dependence between components of different applications. Therefore, through the above solution, not only can the component loading speed be improved, the overall page rendering efficiency can be improved, but also the effective reuse of components can be achieved and the component development efficiency can be improved.
[0110] Optionally, the device 600 may also include: a second determination module, configured to be used for the first sending module 601 to respond to the presence of a component of the second application in the current page before sending a component configuration file acquisition request to the component management platform, when the rendering of the component of the first application in the current page is completed, if there is a component to be rendered in the current page, to determine that there is a component of the second application in the current page.
[0111] Optionally, the component configuration information includes rendering position information of the component; the first determination module 602 includes: an acquisition submodule configured to acquire page structure information of the current page; a first determination submodule configured to determine, in the component configuration file, rendering position information that matches the position information of the part to be rendered in the current page according to the page structure information; and a second determination submodule configured to determine the component corresponding to the rendering position information that matches the position information of the part to be rendered in the current page as the target component to be rendered.
[0112] Optionally, the rendering module 603 includes: a sending sub-module, configured to send a component acquisition request to the component management platform, the component acquisition request is used to request to obtain the target component to be rendered; a triggering sub-module, configured to trigger a loading completion event when the target component to be rendered is acquired, the loading completion event is used to indicate that the loading of the target component to be rendered has been completed; a rendering sub-module, configured to respond to the loading completion event and render the target component to be rendered in the current page according to the rendering timing indicated by the component type information of the target component to be rendered.
[0113] Optionally, the device 600 may also include: a first monitoring module, configured to monitor the rendering status of the target component to be rendered in the current page; and / or a second monitoring module, configured to monitor the running status of the target component to be rendered in the current page after the rendering of the target component to be rendered is completed.
[0114] Regarding the apparatus in the above embodiment, the specific implementation of each module therein has been described in detail in the embodiment of the method on the terminal side, and will not be elaborated here.
[0115] Figure 7 is a block diagram of a component rendering device according to another exemplary embodiment, which can be applied to a component management platform, such as Figure 1 The component management platform 102 shown in FIG. Figure 7 As shown, the device 700 may include:
[0116] The receiving module 701 is configured to receive a component configuration file acquisition request sent by a terminal in response to a component of a second application existing in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed according to component configuration information of multiple components;
[0117] The second sending module 702 is configured to send the component configuration file to the terminal, so that the terminal determines the target component to be rendered of the second application in the current page according to the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after obtaining the target component to be rendered.
[0118] With the above device, the terminal can respond to the presence of a component of a second application in the current page, and send a component configuration file acquisition request to the component management platform. The second application is different from the first application corresponding to the current page. The component configuration file can be constructed based on the component configuration information of multiple components. Compared with the multiple components published to the component management platform, the space occupied by the component configuration file is relatively small. Based on the component configuration file, the target component to be rendered of the second application is determined, and it is not necessary to load a large number of components in the component management platform to the terminal locally, but only the target component to be rendered in the current page that needs to be rendered is loaded, so as to realize the on-demand loading of components. Since the number of loaded components is greatly reduced, the impact of irrelevant components on the loading speed can be reduced, the component loading speed can be increased, the overall rendering efficiency of the page can be improved, and the user's browsing experience can be improved. In addition, the component developer can publish the component to the component management platform after completing the development of the component. The developers of different components will not be affected by each other, and the independent development of the component can be realized. By publishing the component to the component management platform, each application can obtain the components of other applications that need to be loaded from the component management platform, which can effectively realize the reuse of components, improve development efficiency, and reduce the coupling dependence between components of different applications. Therefore, through the above solution, not only can the component loading speed be improved, the overall page rendering efficiency can be improved, but also the effective reuse of components can be achieved and the component development efficiency can be improved.
[0119] Optionally, the component configuration file is constructed by the following modules: a parsing module, configured to, in response to receiving a component published to a component management platform, parse the component code of the received component to obtain the component configuration information of the component; and a building module, configured to build the component configuration information of multiple components into the component configuration file.
[0120] Optionally, the construction module includes: a first construction sub-module, configured to construct the component configuration information of the component whose version status is a visible state or a grayscale state into the component configuration file; or, a second construction sub-module, configured to construct the component configuration information of the component whose version status is a visible state or a grayscale state and which is pre-subscribed by the first application into the component configuration file.
[0121] Regarding the device in the above embodiment, the specific implementation method of each module has been described in detail in the embodiment of the method on the component management platform side, and will not be elaborated here.
[0122] Reference below Figure 8 , which shows an electronic device (eg, Figure 1The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic 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 disclosure.
[0123] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0124] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0125] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory 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 a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0126] It should be noted that the computer-readable medium disclosed above 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 disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, 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 suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0127] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0128] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0129] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to the presence of a component of a second application in the current page, sends a component configuration file acquisition request to a component management platform, wherein the second application is different from the first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; receives the component configuration file sent by the component management platform, and determines the target component to be rendered of the second application in the current page based on the component configuration information; obtains the target component to be rendered from the component management platform, and renders the target component to be rendered in the current page.
[0130] Alternatively, the computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device: receives a component configuration file acquisition request sent by a terminal in response to a component of a second application existing in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; sends the component configuration file to the terminal, so that the terminal determines the target component to be rendered of the second application in the current page based on the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after acquiring the target component to be rendered.
[0131] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0132] 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 disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square 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 square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / 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.
[0133] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, the first sending module may also be described as a "component configuration file acquisition request sending module".
[0134] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0135] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0136] According to one or more embodiments of the present disclosure, Example 1 provides a component rendering method, which includes: in response to the presence of a component of a second application in a current page, sending a component configuration file acquisition request to a component management platform, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; receiving the component configuration file sent by the component management platform, and determining a target component to be rendered of the second application in the current page based on the component configuration information; acquiring the target component to be rendered from the component management platform, and rendering the target component to be rendered in the current page.
[0137] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, and before sending a component configuration file acquisition request to a component management platform in response to the presence of a component of a second application in the current page, the method further includes: when rendering of the component of the first application in the current page is completed, if there is a component to be rendered in the current page, determining that a component of the second application exists in the current page.
[0138] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, wherein the component configuration information includes rendering position information of the component; determining the target component to be rendered of the second application in the current page based on the component configuration information includes: obtaining page structure information of the current page; determining, in the component configuration file, rendering position information that matches the position information of the part to be rendered in the current page based on the page structure information; and determining the component corresponding to the rendering position information that matches the position information of the part to be rendered in the current page as the target component to be rendered.
[0139] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 1, wherein the component configuration file includes component configuration information of a component whose version status is visible or grayscale and published to the component management platform, or the component configuration file includes component configuration information of a component whose version status is visible or grayscale and published to the component management platform and to which the first application is pre-subscribed.
[0140] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein obtaining the target component to be rendered from the component management platform and rendering the target component to be rendered in the current page includes: sending a component acquisition request to the component management platform, wherein the component acquisition request is used to request to obtain the target component to be rendered; when the target component to be rendered is obtained, triggering a loading completion event, wherein the loading completion event is used to indicate that the target component to be rendered has been loaded; in response to the loading completion event, rendering the target component to be rendered in the current page according to the rendering timing indicated by the component type information of the target component to be rendered.
[0141] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 1, which further includes: monitoring the rendering status of the target component to be rendered in the current page; and / or, after the rendering of the target component to be rendered is completed, monitoring the running status of the target component to be rendered in the current page.
[0142] According to one or more embodiments of the present disclosure, Example 7 provides a component rendering method, which includes: receiving a component configuration file acquisition request sent by a terminal in response to a component of a second application existing in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; sending the component configuration file to the terminal so that the terminal determines the target component to be rendered of the second application in the current page based on the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after acquiring the target component to be rendered.
[0143] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 7, wherein the component configuration file is constructed in the following manner: in response to receiving a component published to a component management platform, parsing the component code of the received component to obtain the component configuration information of the component; and constructing the component configuration information of multiple components into the component configuration file.
[0144] According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 8, wherein the component configuration information of multiple components is constructed into the component configuration file, including: constructing the component configuration information of components whose version status is a visible state or a grayscale state into the component configuration file; or, constructing the component configuration information of components whose version status is a visible state or a grayscale state and to which the first application is pre-subscribed into the component configuration file.
[0145] According to one or more embodiments of the present disclosure, Example 10 provides a component rendering device, which includes: a first sending module, configured to send a component configuration file acquisition request to a component management platform in response to the presence of a component of a second application in a current page, wherein the second application is different from the first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; a first determination module, configured to receive the component configuration file sent by the component management platform, and determine the target component to be rendered of the second application in the current page based on the component configuration information; a rendering module, configured to obtain the target component to be rendered from the component management platform, and render the target component to be rendered in the current page.
[0146] According to one or more embodiments of the present disclosure, Example 11 provides a component rendering device, which includes: a receiving module, configured to receive a component configuration file acquisition request sent by a terminal in response to a component of a second application existing in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed based on component configuration information of multiple components; a second sending module, configured to send the component configuration file to the terminal, so that the terminal determines the target component to be rendered of the second application in the current page according to the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after acquiring the target component to be rendered.
[0147] According to one or more embodiments of the present disclosure, Example 12 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in any one of Examples 1 to 9 when executed by a processing device.
[0148] According to one or more embodiments of the present disclosure, Example 13 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method described in any one of Examples 1 to 6.
[0149] According to one or more embodiments of the present disclosure, Example 14 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any one of the methods described in Examples 7 to 9.
[0150] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0151] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0152] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Claims
1. A component rendering method, It is characterized in that The method comprises: In response to a component of a second application existing in the current page, sending a component configuration file acquisition request to a component management platform, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed according to component configuration information of multiple components; Receive the component configuration file sent by the component management platform, and determine the target component to be rendered of the second application in the current page according to the component configuration information; Acquire the target component to be rendered from the component management platform, and render the target component to be rendered in the current page; The component configuration information includes the rendering position information of the component; and determining the target component to be rendered of the second application in the current page according to the component configuration information includes: Obtaining page structure information of the current page; In the component configuration file, determining rendering position information that matches position information of a portion to be rendered in the current page according to the page structure information; The component corresponding to the rendering position information matching the position information of the to-be-rendered portion in the current page is determined as the to-be-rendered target component.
2. The method according to claim 1, It is characterized in that Before sending a component configuration file acquisition request to the component management platform in response to the presence of a component of the second application in the current page, the method further includes: When the rendering of the components of the first application in the current page is completed, if there are components to be rendered in the current page, it is determined that there are components of the second application in the current page.
3. The method according to claim 1, It is characterized in that The component configuration file includes component configuration information of a component whose version status is visible or grayscale and published to the component management platform, or the component configuration file includes component configuration information of a component whose version status is visible or grayscale and published to the component management platform and to which the first application is pre-subscribed.
4. The method according to claim 1, It is characterized in that The acquiring the target component to be rendered from the component management platform and rendering the target component to be rendered in the current page includes: Sending a component acquisition request to the component management platform, wherein the component acquisition request is used to request to acquire the target component to be rendered; When the target component to be rendered is obtained, a loading completion event is triggered, where the loading completion event is used to indicate that the loading of the target component to be rendered has been completed; In response to the loading completion event, the target component to be rendered is rendered in the current page according to the rendering timing indicated by the component type information of the target component to be rendered.
5. The method according to claim 1, It is characterized in that The method further comprises: Monitoring the rendering status of the target component to be rendered in the current page; and / or After the rendering of the target component to be rendered is completed, the running status of the target component to be rendered in the current page is monitored.
6. A component rendering method, It is characterized in that The method comprises: The receiving terminal responds to a component configuration file acquisition request sent by a component of a second application in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed according to component configuration information of multiple components; Sending the component configuration file to the terminal, so that the terminal determines the target component to be rendered of the second application in the current page according to the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after acquiring the target component to be rendered; The component configuration information includes the rendering position information of the component; the terminal determines the target component to be rendered of the second application in the current page according to the component configuration information in the following manner: Obtain page structure information of the current page; determine, in the component configuration file, rendering position information that matches position information of a portion to be rendered in the current page based on the page structure information; and determine a component corresponding to the rendering position information that matches position information of a portion to be rendered in the current page as the target component to be rendered.
7. The method according to claim 6, It is characterized in that The component configuration file is constructed as follows: In response to receiving a component published to a component management platform, parsing a component code of the received component to obtain the component configuration information of the component; The component configuration information of a plurality of components is constructed into the component configuration file.
8. The method according to claim 7, It is characterized in that The step of constructing the component configuration information of the plurality of components into the component configuration file comprises: The component configuration information of the component whose version status is a visible status or a grayscale status is constructed as the component configuration file; or, The component configuration information of the component whose version status is a visible status or a grayscale status and which is pre-subscribed by the first application is constructed as the component configuration file.
9. A component rendering device, It is characterized in that The device comprises: A first sending module is configured to send a component configuration file acquisition request to a component management platform in response to a component of a second application existing in the current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed according to component configuration information of multiple components; A first determination module is configured to receive the component configuration file sent by the component management platform, and determine the target component to be rendered of the second application in the current page according to the component configuration information; A rendering module, configured to obtain the target component to be rendered from the component management platform, and render the target component to be rendered in the current page; Among them, the first determination module includes: an acquisition sub-module, configured to obtain the page structure information of the current page; a first determination sub-module, configured to determine, in the component configuration file, the rendering position information that matches the position information of the part to be rendered in the current page according to the page structure information; and a second determination sub-module, configured to determine the component corresponding to the rendering position information that matches the position information of the part to be rendered in the current page as the target component to be rendered.
10. A component rendering device, It is characterized in that The device comprises: a receiving module configured to receive a component configuration file acquisition request sent by a terminal in response to a component of a second application existing in a current page, wherein the second application is different from a first application corresponding to the current page, and the component configuration file is constructed according to component configuration information of multiple components; a second sending module, configured to send the component configuration file to the terminal, so that the terminal determines the target component to be rendered of the second application in the current page according to the component configuration information after receiving the component configuration file, and renders the target component to be rendered in the current page after acquiring the target component to be rendered; The component configuration information includes the rendering position information of the component; the terminal determines the target component to be rendered of the second application in the current page according to the component configuration information in the following manner: Obtain page structure information of the current page; determine, in the component configuration file, rendering position information that matches position information of a portion to be rendered in the current page based on the page structure information; and determine a component corresponding to the rendering position information that matches position information of a portion to be rendered in the current page as the target component to be rendered.
11. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 5 are implemented; or, when the program is executed by a processing device, the steps of the method described in any one of claims 6 to 8 are implemented.
12. An electronic device, It is characterized in that include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 5.
13. An electronic device, It is characterized in that include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 6 to 8.
Citation Information
Patent Citations
Page construction method and device
CN110727869A
Page rendering method and device, rendering server and storage medium
CN111045655A
Document loading method, device and equipment and storage medium
CN111581555A
Page response method and device, storage medium and electronic equipment
CN111581563A
Page management method and device, electronic equipment and computer readable medium
CN111782210A
