CN112558933B - Component rendering method and device, readable medium and electronic equipment - Google Patents
Component rendering method and device, readable medium and electronic equipment Download PDFInfo
- Publication number
- CN112558933B CN112558933B CN202011448989.4A CN202011448989A CN112558933B CN 112558933 B CN112558933 B CN 112558933B CN 202011448989 A CN202011448989 A CN 202011448989A CN 112558933 B CN112558933 B CN 112558933B
- Authority
- CN
- China
- Prior art keywords
- component
- rendered
- current page
- application
- rendering
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The disclosure relates to a component rendering method, a device, a readable medium and an electronic apparatus. The method comprises the following steps: responding to the existence of a component of a second application in a current page, and 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 a plurality of 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 according to the component configuration information; and acquiring the target component to be rendered from the component management platform, and rendering the target component to be rendered in the current page. Through the technical scheme, the assembly loading speed can be improved, and the overall rendering efficiency of the page is improved. And the effective multiplexing of the components can be realized, and the development efficiency of the components is improved.
Description
Technical Field
The disclosure relates to the field of computer technology, and in particular relates to a component rendering method, a device, a readable medium and electronic equipment.
Background
At present, front-end pages often employ componentized concepts in development, pages can be viewed as containers of components, each page being made up of one or more components. The assembly is provided as a single unitary body, can be applied in not in the same page.
Rendering a component may refer to the process of converting a data object into a visual object. In the related art, when the component is rendered, the rendering efficiency of the whole page is affected due to the slower loading speed of the component. Moreover, the individual components may be developed by different developers, and how to effectively integrate these components and achieve independent development and dynamic combination of the components is an important issue in the front-end development field.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a component rendering method, the method comprising: responding to the existence of a component of a second application in a current page, and 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 a plurality of 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 according to the component configuration information; and acquiring the target component to be rendered from the component management platform, and rendering the target component to be rendered in the current page.
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 the existence of 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 a plurality of components; and 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 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.
In a third aspect, the present disclosure provides a component rendering apparatus, the apparatus comprising: the device comprises a first sending module, a component management platform and a second sending module, wherein the first sending module is configured to respond to the existence of a component of a second application in a current page, 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 a plurality of components; the first determining module is 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 according to the component configuration information; and the rendering module is configured to acquire the target component to be rendered from the component management platform and render the target component to be rendered in the current page.
In a fourth aspect, the present disclosure provides a component rendering apparatus, the apparatus comprising: the receiving module is configured to receive a component configuration file acquisition request sent by a terminal in response to the existence of 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 a plurality of components; the second sending module is configured to send 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 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.
In a fifth aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which when executed by a processing device implements the steps of the method provided by the first aspect of the present disclosure.
In a sixth aspect, the present disclosure provides a computer readable medium having stored thereon a computer program which when executed by a processing device implements the steps of the method provided by the second aspect of the present disclosure.
In a seventh aspect, the present disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; processing means for executing said computer program in said storage means to carry out the steps of the method provided by the first aspect of the present disclosure.
In an eighth aspect, the present disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; processing means for executing said computer program in said storage means to carry out the steps of the method provided by the second aspect of the present disclosure.
According to the technical scheme, the terminal can respond to the components of the second application in the current page, the second application is different from the first application corresponding to the current page, the component configuration file can be constructed according to the component configuration information of the components, compared with the components distributed to the component management platform, the space occupied by the component configuration file is relatively smaller, the target components to be rendered of the second application are determined based on the component configuration file, and the components to be rendered in the current page are not required to be loaded to the terminal locally, but only the determined target components to be rendered in the current page are required to be loaded. Because the number of the loaded components is greatly reduced, the influence of irrelevant components on the loading speed can be reduced, the loading speed of the components can be increased, the overall rendering efficiency of the page can be improved, and the experience of a user for browsing the page can be improved. And after the development work of the components is completed, the component developers can issue the components to the component management platform, the development parties of different components cannot be influenced, and the independent development of the components can be realized. By publishing the components to the component management platform, each application can acquire the components of other applications to be loaded from the component management platform, multiplexing of the components can be effectively realized, development efficiency is improved, and coupling dependence among the components of different applications is reduced. Therefore, through the scheme, the assembly loading speed can be improved, the overall page rendering efficiency is improved, the effective multiplexing of the assemblies can be realized, and the assembly development efficiency is improved.
Additional features and advantages of the present disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale. In the drawings:
FIG. 1 is a schematic diagram illustrating an implementation environment according to an example embodiment.
FIG. 2 is a flow chart illustrating a component rendering method according to an example embodiment.
FIG. 3 is a flowchart illustrating a component rendering method according to another exemplary embodiment.
FIG. 4 is a flowchart illustrating a component rendering method according to an example embodiment.
Fig. 5 is a flowchart illustrating interaction between a user terminal and a component management platform in a component rendering method according to an exemplary embodiment.
FIG. 6 is a block diagram of a component rendering apparatus, according to an example embodiment.
Fig. 7 is a block diagram of a component rendering apparatus according to another exemplary embodiment.
Fig. 8 is a schematic diagram of an electronic device, according to an example embodiment.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is 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. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
First, an application scenario of the present disclosure will be described. FIG. 1 is a schematic diagram illustrating an implementation environment according to an example embodiment. As shown in FIG. 1, 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 a user may browse pages of the applications through the user terminal 101. After completing the 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 a mobile phone, a tablet computer, and a personal computer, and fig. 1 illustrates an example in which the user terminal 101 is a mobile phone and the component developer terminal 103 is a personal computer. The component management platform 102 may be a component management server, cloud server, or the like. The user terminal 101 and the component developer terminal 103 are communicatively coupled to the component management platform 102, and may communicate in any of 3G, 4G, 5G, NB-IOT, eMTC, LTE, LTE-a, near field communication, wired communication, and the like, for example.
Fig. 2 is a flowchart illustrating a component rendering method according to an exemplary embodiment, which may be applied to a terminal, such as the user terminal 101 shown in fig. 1. As shown in fig. 2, the method may include S201 to S203.
In S201, in response to the presence of the component of the second application in the current page, a component profile acquisition request is sent to the component management platform.
Wherein the second application is different from the first application corresponding to the current page. Currently, more and more applications are installed in terminals used by users, and certain relevance exists between the applications, so that components of one or more other applications may be integrated in a page of the application. For example, the first application corresponding to the current page is application a, and in addition to the components of application a, the components of a second application, such as application B and application C, may be integrated in the current page.
In response to the presence of a component of the second application in the current page, the user terminal 101 may send a component profile acquisition request to the component management platform 102, the component profile acquisition request being for requesting acquisition of a component profile to determine which components of the second application need to be rendered from the component profile.
The component configuration file may be constructed based on component configuration information of a plurality of components, which in this disclosure may be determined by the component management platform 102 based on component code of the component published to the component management platform 102.
After determining the component configuration information of the components, the component management platform 102 may form the component configuration information of the plurality of components into a file, i.e., the component configuration file described above. The present disclosure is not particularly limited with respect to the number of component configuration information included in the component configuration file. And, as the component developer issues components to the component management platform 102, the component configuration file may be dynamically updated, that is, when a new component is issued 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 the component configuration information to the component configuration file.
In S202, a component configuration file sent by the component management platform is received, and a target component to be rendered of the second application in the current page is determined according to the component configuration information.
The component management platform 102 may send the component configuration file to the user terminal 101 after receiving the component configuration file acquisition request sent by the user terminal 101, and the user terminal 101 may receive the component configuration file.
After receiving the component configuration file sent by the component management platform 102, the user terminal 101 may determine, according to component configuration information included in the component configuration file, a target component to be rendered of the second application in the current page, that is, determine, according to the received component configuration file, which components of the second application need to be rendered. In an alternative embodiment, the application a corresponding to the current page may provide an parsing module, and the application a may analyze a page structure of the current page by the parsing module when running, and determine, according to the page structure, a target component to be rendered of the second application suitable for the current page. The number of target components to be rendered is not particularly limited, and may be one or more.
In S203, a target component to be rendered is acquired from the component management platform, and the target component to be rendered is rendered in the current page.
After determining the target component to be rendered of the second application, the user terminal 101 may acquire the target component to be rendered from the component management platform 102. In this way, in the present disclosure, the user terminal 101 may determine, according to the component configuration file, a target component to be rendered suitable for the current page, and only need to load the target component to be rendered, without loading a large number of components published to the component management platform 102, so as to implement on-demand loading of the components.
In addition, for the component developer, independent development of the component can be realized, after the development work of the component is completed, the component is released to the component management platform 102, and the developers of different components are not affected. By publishing the components to the component management platform 102, each application can acquire the components of other applications to be loaded from the component management platform 102, so that multiplexing of the components can be effectively realized, and development efficiency is improved.
According to the technical scheme, the terminal can respond to the components of the second application in the current page, the second application is different from the first application corresponding to the current page, the component configuration file can be constructed according to the component configuration information of the components, compared with the components distributed to the component management platform, the space occupied by the component configuration file is relatively smaller, the target components to be rendered of the second application are determined based on the component configuration file, and the components to be rendered in the current page are not required to be loaded to the terminal locally, but only the determined target components to be rendered in the current page are required to be loaded. Because the number of the loaded components is greatly reduced, the influence of irrelevant components on the loading speed can be reduced, the loading speed of the components can be increased, the overall rendering efficiency of the page can be improved, and the experience of a user for browsing the page can be improved. And after the development work of the components is completed, the component developers can issue the components to the component management platform, the development parties of different components cannot be influenced, and the independent development of the components can be realized. By publishing the components to the component management platform, each application can acquire the components of other applications to be loaded from the component management platform, multiplexing of the components can be effectively realized, development efficiency is improved, and coupling dependence among the components of different applications is reduced. Therefore, through the scheme, the assembly loading speed can be improved, the overall page rendering efficiency is improved, the effective multiplexing of the assemblies can be realized, and the assembly development efficiency is improved.
Optionally, before the component configuration file acquisition request is sent to the component management platform in response to the component of the second application existing in the current page in S201, the component rendering method applied to the terminal provided in the present disclosure may further include:
And under the condition that the rendering of the components of the first application in the current page is completed, if the components to be rendered exist in the current page, determining that the components of the second application exist in the current page.
In general, in order to improve the browsing experience of the user, the front-end page aims at a short first screen time, that is, the time consumed by displaying the first screen page, and the total rendering time of one page is longer than the first screen time. For the case that the component of the second application is integrated in the current page, in order to shorten the first screen time, the component of the first application corresponding to the current page is usually rendered first, and after the rendering of the component of the first application is completed, the component of the second application is loaded.
For example, the current page browsed by the user is a page of the application a, and the user terminal 101 may obtain a component of the application a from a server corresponding to the application a, and after the rendering of the component of the application a is completed, if the current page is not completely rendered, there may be a component of the second application in the current page. It should be noted that the number of the second applications and the number of the components to be rendered are not particularly limited, and may be one or more.
In this disclosure, the component configuration file may be constructed by the component management platform 102 according to component configuration information of a plurality of components, and the component management platform 102 may construct the component configuration file in the following manner:
responding to the received component issued to the component management platform, and analyzing the received component code of the component to obtain component configuration information of the component; component configuration information of the plurality of components is constructed as a component configuration file.
After the component developer of each application completes the component development work, the component developer may issue the component to the component management platform 102 through the component developer terminal 103, where the component management platform 102 may be configured to store the components and parse the component codes of the components, for example, may parse the component codes through an AST (Abstract Syntax Tree ) and other manners, so as to parse the component configuration information of the components. The component code may be JavaScript, CSS (CASCADING STYLE SHEETS, cascading style sheet) code of the component. Illustratively, the component configuration information of the component may include a component package identification (PACKAGEID), a component package name (PACKAGENAME), a component package version (version), a component package download address (URL, uniform Resource Locator, uniform resource locator), a version gray policy of the component, a version status of the component (status), a component Type information (Type), rendering location information (selector) of the component, and the like. The component management platform 102 may build component configuration information for a plurality of components as a component configuration file.
In one embodiment, the component management platform 102 may construct the component configuration information of the component with the version state being the visible state or the grayscale state as a component configuration file, i.e., the component configuration file may include the component configuration information of the component with the version state being the visible state or the grayscale state published to the component management platform 102.
The version state of the component may be defined by a component developer when the component is developed, and may be a visible state, a gray state, or an invisible state. The version state of the component is visible state, that is, all user terminals can load the component, the invisible state, that is, the user terminals cannot load the component, the gray state, that is, part of the user terminals can load the component, the part of the user terminals can be pre-calibrated, and the component in the gray state can be a new version component, for example, so that part of users can use the component first, and the problem that the use of a large number of users is influenced by instability of the new version can be avoided.
In another embodiment, the component management platform 102 may construct the component configuration information of the component to which the version state is a visible state or a gray state and the first application subscribes in advance as a component configuration file, that is, the component configuration file may include the component configuration information of the component to which the version state published to the component management platform 102 is a visible state or a gray state and the first application corresponding to the current page subscribes in advance.
In this embodiment, each application may subscribe to a required component in advance according to its own requirement, and the component management platform 102 may generate a component configuration file corresponding to each application for components subscribed in advance by different applications. For example, the component configuration information of 1000 components is stored in the component management platform 102, and the application a subscribes to 200 components in advance, and then the component configuration information of the 200 components subscribed in advance may be included in the component configuration file corresponding to the application a. For example, application B subscribes to 300 components in advance, and then the component configuration information of the 300 components to which application B subscribes may be included in the component configuration file corresponding to application B. It should be noted that the above numerical values are only examples, and do not limit the embodiments of the present disclosure.
Therefore, each application can subscribe the components required by the application in advance, the acquired component configuration file does not comprise all the component configuration information of the components in the visible state or the gray state, but the component configuration information of the components meeting the requirements of the application, and when the target components to be rendered are determined according to the component configuration file, the efficiency can be improved, and the influence of irrelevant components is reduced.
Fig. 3 is a flowchart illustrating a component rendering method according to another exemplary embodiment, which may be applied to a terminal, and as illustrated in fig. 3, the method may include S301 to S308, wherein determining a target component to be rendered of a second application in a current page according to component configuration information in S202 may include S303 to S305, and S203 may include S306 to S308.
In S301 (201), a component profile acquisition request is sent to the component management platform in response to the presence of a component of the second application in the current page.
The specific embodiment of S301 is identical to the embodiment mentioned in S201, and will not be described herein.
In S302, a component profile sent by a component management platform is received.
In S303, page structure information of the current page is acquired.
The page structure information of the current page may be a DOM (Document Object Model ) structure of the current page.
In S304, in the component configuration file, rendering position information that matches the position information of the portion to be rendered in the current page is determined from the page structure information.
In S305, a component corresponding to rendering position information that matches position information of a portion to be rendered in the current page is determined as a target component to be rendered.
Wherein the component configuration information may include rendering location information of the component, which may include coordinate information of the rendering of the component in the page. According to the page structure information of the current page, the position information of the part to be rendered, namely the position information of the part which is not rendered in the current page, can be determined.
For example, each component configuration information included in the component configuration file may be traversed, if the rendering position information in the currently traversed component configuration information is matched with, i.e. consistent with, the position information of the portion to be rendered in the current page, a component corresponding to the component configuration information is characterized as being suitable for the current page, and the component is determined to be a target component to be rendered for the current page.
It should be noted that, the present disclosure is not particularly limited with respect to the number of portions to be rendered and the number of target components to be rendered. If the number of the parts to be rendered in the current page is multiple, determining target components to be rendered corresponding to each part to be rendered respectively. In addition, when the component configuration information in the component configuration file is traversed, the component configuration information can be traversed in sequence, and if a plurality of components matched with the position information of the same part to be rendered are available for the same part to be rendered in the current page, the component corresponding to the component configuration information traversed last can be used as the target component to be rendered.
In S306, a component acquisition request is sent to the component management platform.
After determining the target component to be rendered, the user terminal 101 may acquire the target component to be rendered from the component management platform 102. Wherein the user terminal 101 may send a component acquisition request to the component management platform 102, where the component acquisition request is used to request acquisition of a target component to be rendered.
In S307, in the case where the target component to be rendered is acquired, a load completion event is triggered.
The component management platform 102 may transmit the target component to be rendered to the user terminal 101 after receiving the component acquisition request transmitted from the user terminal 101. After receiving the target component to be rendered, the user terminal 101 is equivalent to loading the target component to be rendered, and at this time, a loading completion event may be triggered, where the loading completion event is used to characterize that the target component to be rendered is loaded.
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 opportunity indicated by the component type information of the target component to be rendered.
The load completion event may characterize that the target component to be rendered has been loaded locally to the user terminal 101, at which point the target component to be rendered may be rendered in the current page. The component configuration information may include component type information, where the component type information may be used to indicate a rendering opportunity of a component, and when the target component to be rendered is rendered, the rendering may be performed according to the rendering opportunity indicated by the component type information of the target component to be rendered.
Wherein, the rendering time of different components may be different, and the rendering time may include, for example, immediate rendering, delayed rendering, and triggered rendering. Immediately rendering refers to rendering a component onto a current page immediately after loading the component, deferred rendering refers to rendering the component onto the page after loading the component for a preset period of time, and triggering rendering refers to re-rendering the component onto the page in response to a preset event.
By the technical scheme, the components corresponding to the rendering position information matched with the position information of the part to be rendered in the current page are determined to be the target components to be rendered, so that the components to be loaded in the current page can be accurately determined, the on-demand loading of the components is realized, and the component loading speed is improved. Each application can acquire target components to be rendered of other applications to be loaded from the component management platform, multiplexing of the components can be effectively achieved, and development efficiency is improved. And the target component to be rendered is rendered in the current page according to the rendering time indicated by the component type information of the target component to be rendered, so that accurate rendering of the target component to be rendered can be ensured.
In addition, the component rendering method applied to the terminal provided by the present disclosure may further include:
Monitoring the rendering condition of a target component to be rendered in a current page; and/or
And after the rendering of the target component to be rendered is completed, monitoring the running condition of the target component to be rendered in the current page.
In the present disclosure, the first application corresponding to the current page is more focused on the browsing experience of the user, so the user terminal 101 running the first application may monitor the rendering condition of the target component to be rendered in the current page, where the rendering condition may include whether the target component to be rendered starts to render at the rendering opportunity indicated by the component type information, and whether the rendering is completed normally after the rendering is started. If the rendering condition of the target component to be rendered is abnormal, for example, the rendering is not started at the rendering time or the rendering is not completed normally after the rendering is started, the user terminal 101 may send the rendering abnormal condition to the server corresponding to the first application, so that the first application may monitor the rendering condition of the self page in real time.
After the rendering of the target component to be rendered is completed, the user terminal 101 may monitor the running condition of the target component to be rendered in the current page, where the running condition may include whether the target component to be rendered is wrong in the running process, and if the running of the target component to be rendered in the current page is abnormal, the user terminal 101 may send the running abnormal condition to the server corresponding to the first application, so that the first application may monitor the running condition of the self page in real time.
The user terminal 101 may monitor the rendering condition of the target component to be rendered in the current page, or monitor the running condition of the target component to be rendered, and preferably, may monitor the rendering condition and the running condition of the target component to be rendered at the same time. Therefore, the first application corresponding to the current page is more focused on browsing experience of the user, the component developer is only required to independently develop the component, and the first application corresponding to the current page can monitor rendering conditions and/or running conditions of the component in the page in real time.
FIG. 4 is a flowchart illustrating a component rendering method that may be applied to a component management platform, such as component management platform 102 shown in FIG. 1, according to an exemplary embodiment. As shown in fig. 4, the method may include S401 and S402.
In S401, the receiving terminal responds to a component profile acquisition request sent by a component for which there is a second application in the current page.
The terminal may be the user terminal 101 shown in fig. 1. 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 a plurality of components.
In S402, the component configuration file is sent to the terminal, so that the terminal determines, according to the component configuration information, a target component to be rendered of the second application in the current page 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.
According to the technical scheme, the terminal can respond to the components of the second application in the current page, the second application is different from the first application corresponding to the current page, the component configuration file can be constructed according to the component configuration information of the components, compared with the components distributed to the component management platform, the space occupied by the component configuration file is relatively smaller, the target components to be rendered of the second application are determined based on the component configuration file, and the components to be rendered in the current page are not required to be loaded to the terminal locally, but only the determined target components to be rendered in the current page are required to be loaded. Because the number of the loaded components is greatly reduced, the influence of irrelevant components on the loading speed can be reduced, the loading speed of the components can be increased, the overall rendering efficiency of the page can be improved, and the experience of a user for browsing the page can be improved. And after the development work of the components is completed, the component developers can issue the components to the component management platform, the development parties of different components cannot be influenced, and the independent development of the components can be realized. By publishing the components to the component management platform, each application can acquire the components of other applications to be loaded from the component management platform, multiplexing of the components can be effectively realized, development efficiency is improved, and coupling dependence among the components of different applications is reduced. Therefore, through the scheme, the assembly loading speed can be improved, the overall page rendering efficiency is improved, the effective multiplexing of the assemblies can be realized, and the assembly development efficiency is improved.
Optionally, the component profile is constructed by: responding to the received component issued to the component management platform, and analyzing the received component code of the component to obtain the component configuration information of the component; the component configuration information of a plurality of components is constructed as the component configuration file.
Optionally, the building the component configuration information of the plurality of components into the component configuration file includes: constructing component configuration information of a component with a version state being a visible state or a gray state as the component configuration file; or the component configuration information of the component, of which the version state is a visible state or a gray state and the first application is subscribed in advance, is constructed as the component configuration file.
With respect to 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 described in detail here.
Fig. 5 is a flowchart illustrating interaction between the user terminal 101 and the component management platform 102 in a component rendering method according to an exemplary embodiment. As shown in fig. 5, the method may include S501 to S514.
In S501, in response to the presence of the component of the second application in the current page, the user terminal 101 sends a component profile acquisition request to the component management platform 102.
In S502, the component management platform 102 receives a component profile acquisition request transmitted from the user terminal 101.
In S503, the component management platform 102 transmits the component profile to the user terminal 101.
In S504, the user terminal 101 receives the component profile transmitted by the component management platform 102.
In S505, the user terminal 101 acquires page structure information of the current page.
In S506, the user terminal 101 determines rendering position information matching the position information of the portion to be rendered in the current page from the page structure information in the component profile.
In S507, the user terminal 101 determines a component corresponding to rendering position information that matches the position information of the portion to be rendered in the current page as a target component to be rendered.
In S508, the user terminal 101 transmits a component acquisition request to the component management platform 102.
In S509, the component management platform 102 receives the component acquisition request transmitted from the user terminal 101.
In S510, the component management platform 102 transmits the target component to be rendered to the user terminal 101.
In S511, the user terminal 101 triggers a loading completion event in the case where the target component to be rendered is acquired.
In S512, the user terminal 101 renders the target component to be rendered in the current page in accordance with the rendering opportunity indicated by the component type information of the target component to be rendered in response to the loading completion event.
In S513, the user terminal 101 monitors the rendering condition of the target component to be rendered in the current page.
In S514, the user terminal 101 monitors the running condition of the target component to be rendered in the current page after the rendering of the target component to be rendered is completed.
The specific embodiments of the individual steps shown in fig. 5 have been described in detail above. It should be noted that fig. 5 is only an exemplary, alternative embodiment of the component rendering method provided for the present disclosure.
Based on the same inventive concept, the present disclosure also provides a component rendering apparatus, and fig. 6 is a block diagram of a component rendering apparatus according to an exemplary embodiment, which is applicable to a terminal, such as the user terminal 101 shown in fig. 1, and as shown in fig. 6, the apparatus 600 may include:
A first sending module 601, configured to send a component configuration file obtaining request to a component management platform in response to a component of a second application existing in a current page, where 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 a plurality of components;
A first determining module 602, configured to receive the component configuration file sent by the component management platform, and determine, according to the component configuration information, a target component to be rendered of the second application in the current page;
A rendering module 603, 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.
By adopting the device, the terminal can respond to the components of the second application in the current page, and send the component configuration file acquisition request to the component management platform, wherein the second application is different from the first application corresponding to the current page, the component configuration file can be constructed according to the component configuration information of a plurality of components, compared with the plurality of components released to the component management platform, the space occupied by the component configuration file is relatively smaller, the target components to be rendered of the second application are determined based on the component configuration file, and the target components to be rendered in the current page are not required to be loaded to the terminal locally, but only the determined target components to be rendered in the current page are required to be loaded. Because the number of the loaded components is greatly reduced, the influence of irrelevant components on the loading speed can be reduced, the loading speed of the components can be increased, the overall rendering efficiency of the page can be improved, and the experience of a user for browsing the page can be improved. And after the development work of the components is completed, the component developers can issue the components to the component management platform, the development parties of different components cannot be influenced, and the independent development of the components can be realized. By publishing the components to the component management platform, each application can acquire the components of other applications to be loaded from the component management platform, multiplexing of the components can be effectively realized, development efficiency is improved, and coupling dependence among the components of different applications is reduced. Therefore, through the scheme, the assembly loading speed can be improved, the overall page rendering efficiency is improved, the effective multiplexing of the assemblies can be realized, and the assembly development efficiency is improved.
Optionally, the apparatus 600 may further include: the second determining module is configured to determine, when the rendering of the component of the first application in the current page is completed before the first sending module 601 sends a component configuration file acquisition request to the component management platform in response to the component of the second application existing in the current page, that the component of the second application exists in the current page if the component to be rendered exists in the current page.
Optionally, the component configuration information includes rendering location information of the component; the first determining module 602 includes: the acquisition sub-module is configured to acquire page structure information of the current page; a first determining submodule configured to determine rendering position information matched with position information of a part to be rendered in the current page according to the page structure information in the component configuration file; and a second determining sub-module configured to determine a component corresponding to rendering position information matching position information of a portion to be rendered in the current page as the target component to be rendered.
Optionally, the rendering module 603 includes: a sending sub-module configured to send a component acquisition request to the component management platform, where the component acquisition request is used to request acquisition of the target component to be rendered; a triggering sub-module configured to trigger a loading completion event, in case the target component to be rendered is acquired, the loading completion event being used to characterize that the target component to be rendered has been loaded; and the rendering sub-module is configured to respond to the loading completion event and render the target component to be rendered in the current page according to the rendering occasion indicated by the component type information of the target component to be rendered.
Optionally, the apparatus 600 may further include: the first monitoring module is configured to monitor the rendering condition of the target component to be rendered in the current page; and/or a second monitoring module configured to monitor the running condition of the target component to be rendered in the current page after the target component to be rendered is rendered.
With respect to the apparatus in the above embodiments, the specific implementation of each module has been described in detail in the embodiments of the method on the terminal side, and will not be described in detail here.
FIG. 7 is a block diagram of a component rendering apparatus, which may be applied to a component management platform, such as component management platform 102 shown in FIG. 1, as shown in FIG. 7, according to another exemplary embodiment, the apparatus 700 may include:
A receiving module 701, configured to receive a component configuration file acquisition request sent by a terminal in response to the presence of a component of a second application in a current page, where 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 a plurality of components;
The second sending module 702 is configured to send the component configuration file to the terminal, so that the terminal determines, according to the component configuration information, a target component to be rendered of the second application in the current page 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.
By adopting the device, the terminal can respond to the components of the second application in the current page, and send the component configuration file acquisition request to the component management platform, wherein the second application is different from the first application corresponding to the current page, the component configuration file can be constructed according to the component configuration information of a plurality of components, compared with the plurality of components released to the component management platform, the space occupied by the component configuration file is relatively smaller, the target components to be rendered of the second application are determined based on the component configuration file, and the target components to be rendered in the current page are not required to be loaded to the terminal locally, but only the determined target components to be rendered in the current page are required to be loaded. Because the number of the loaded components is greatly reduced, the influence of irrelevant components on the loading speed can be reduced, the loading speed of the components can be increased, the overall rendering efficiency of the page can be improved, and the experience of a user for browsing the page can be improved. And after the development work of the components is completed, the component developers can issue the components to the component management platform, the development parties of different components cannot be influenced, and the independent development of the components can be realized. By publishing the components to the component management platform, each application can acquire the components of other applications to be loaded from the component management platform, multiplexing of the components can be effectively realized, development efficiency is improved, and coupling dependence among the components of different applications is reduced. Therefore, through the scheme, the assembly loading speed can be improved, the overall page rendering efficiency is improved, the effective multiplexing of the assemblies can be realized, and the assembly development efficiency is improved.
Optionally, the component profile is constructed by the following modules: the analysis module is configured to respond to the received component issued to the component management platform and analyze the received component code of the component to obtain the component configuration information of the component; a building module configured to build the component configuration information of a plurality of components into the component configuration file.
Optionally, the building module includes: a first construction sub-module configured to construct component configuration information of a component having a version state of a visible state or a gray state as the component configuration file; or a second construction sub-module configured to construct, as the component configuration file, component configuration information of a component of which version state is a visible state or a gray state and to which the first application is subscribed in advance.
With respect to the apparatus in the above embodiments, the specific implementation of each module has been described in detail in the embodiments related to the method on the component management platform side, and will not be described in detail herein.
Referring now to fig. 8, a schematic diagram of an architecture of an electronic device (e.g., a user terminal or component management platform of fig. 1) 800 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are 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), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 800 may include a processing means (e.g., a central processor, a graphics processor, etc.) 801, which may 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 means 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 by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, etc.; storage 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 shows an electronic device 800 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 801.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some embodiments, the clients, servers 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"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: responding to the existence of a component of a second application in a current page, and 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 a plurality of 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 according to the component configuration information; and acquiring the target component to be rendered from the component management platform, and rendering the target component to be rendered in the current page.
Or the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a component configuration file acquisition request sent by a terminal in response to the existence of 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 a plurality of components; and 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 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.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of the module is not limited to the module itself in some cases, and for example, the first sending module may also be described as "component profile acquisition request sending module".
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: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In accordance with one or more embodiments of the present disclosure, example 1 provides a component rendering method, the method comprising: responding to the existence of a component of a second application in a current page, and 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 a plurality of 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 according to the component configuration information; and acquiring the target component to be rendered from the component management platform, and rendering the target component to be rendered in the current page.
In accordance with one or more embodiments of the present disclosure, example 2 provides the method of example 1, before the sending the component profile acquisition request to the component management platform in response to the presence of the component of the second application in the current page, the method further comprising: and under the condition that the component rendering of the first application in the current page is completed, if the component to be rendered exists in the current page, determining that the component of the second application exists in the current page.
Example 3 provides the method of example 1, the component configuration information including rendering location information of the component, in accordance with one or more embodiments of the present disclosure; the determining, according to the component configuration information, a target component to be rendered of the second application in the current page includes: acquiring page structure information of the current page; determining rendering position information matched with the position information of the part to be rendered in the current page according to the page structure information in the component configuration file; and determining a component corresponding to rendering position information matched with the position information of the part to be rendered in the current page as the target component to be rendered.
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 state is a visible state or a gray state published to the component management platform, or the component configuration file includes component configuration information of a component whose version state is a visible state or a gray state published to the component management platform and to which the first application subscribes in advance.
According to one or more embodiments of the present disclosure, example 5 provides the method of example 1, the obtaining the target component to be rendered from the component management platform, and rendering the target component to be rendered in the current page, including: sending a component acquisition request to the component management platform, wherein the component acquisition request is used for requesting to acquire the target component to be rendered; triggering a loading completion event under the condition that the target component to be rendered is acquired, wherein the loading completion event is used for representing that the target component to be rendered is loaded; and responding to the loading completion event, and rendering the target component to be rendered in the current page according to the rendering time indicated by the component type information of the target component to be rendered.
Example 6 provides the method of example 1, according to one or more embodiments of the present disclosure, the method further comprising: monitoring the rendering condition 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 condition of the target component to be rendered in the current page.
Example 7 provides a component rendering method according to one or more embodiments of the present disclosure, the method comprising: receiving a component configuration file acquisition request sent by a terminal in response to the existence of 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 a plurality of components; and 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 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.
Example 8 provides the method of example 7, according to one or more embodiments of the present disclosure, the component profile being constructed by: responding to the received component issued to the component management platform, and analyzing the received component code of the component to obtain the component configuration information of the component; the component configuration information of a plurality of components is constructed as the component configuration file.
Example 9 provides the method of example 8, the building the component configuration information for a plurality of components as the component configuration file, comprising: constructing component configuration information of a component with a version state being a visible state or a gray state as the component configuration file; or the component configuration information of the component, of which the version state is a visible state or a gray state and the first application is subscribed in advance, is constructed as the component configuration file.
In accordance with one or more embodiments of the present disclosure, example 10 provides a component rendering apparatus, the apparatus comprising: the device comprises a first sending module, a component management platform and a second sending module, wherein the first sending module is configured to respond to the existence of a component of a second application in a current page, 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 a plurality of components; the first determining module is 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 according to the component configuration information; and the rendering module is configured to acquire the target component to be rendered from the component management platform and render the target component to be rendered in the current page.
Example 11 provides a component rendering apparatus according to one or more embodiments of the present disclosure, the apparatus comprising: the receiving module is configured to receive a component configuration file acquisition request sent by a terminal in response to the existence of 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 a plurality of components; the second sending module is configured to send 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 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.
According to one or more embodiments of the present disclosure, example 12 provides a computer-readable medium having stored thereon a computer program which, when executed by a processing device, implements the steps of the method of any of examples 1-9.
Example 13 provides an electronic device, according to one or more embodiments of the present disclosure, comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the method of any one of examples 1-6.
Example 14 provides an electronic device according to one or more embodiments of the present disclosure, comprising: a storage device having a computer program stored thereon; processing means for executing the computer program in the storage means to implement the steps of the method of any one of examples 7-9.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims. The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Claims (13)
1. A component rendering method, the method comprising:
Responding to the existence of a component of a second application in a current page, and 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 a plurality of 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 according to 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;
wherein the component configuration information includes rendering location information of the component; the determining, according to the component configuration information, a target component to be rendered of the second application in the current page includes:
Acquiring page structure information of the current page;
determining rendering position information matched with the position information of the part to be rendered in the current page according to the page structure information in the component configuration file;
And determining a component corresponding to rendering position information matched with the position information of the part to be rendered in the current page as the target component to be rendered.
2. The method of claim 1, wherein prior to the sending the component profile acquisition request to the component management platform in response to the presence of the component of the second application in the current page, the method further comprises:
And under the condition that the component rendering of the first application in the current page is completed, if the component to be rendered exists in the current page, determining that the component of the second application exists in the current page.
3. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The component configuration file comprises component configuration information of a component with a visible state or gray state of a version state released to the component management platform, or the component configuration file comprises component configuration information of a component with a visible state or gray state of a version state released to the component management platform and subscribed by the first application in advance.
4. The method of claim 1, wherein the obtaining the target component to be rendered from the component management platform and rendering the target component to be rendered in the current page comprises:
Sending a component acquisition request to the component management platform, wherein the component acquisition request is used for requesting to acquire the target component to be rendered;
Triggering a loading completion event under the condition that the target component to be rendered is acquired, wherein the loading completion event is used for representing that the target component to be rendered is loaded;
And responding to the loading completion event, and rendering the target component to be rendered in the current page according to the rendering time indicated by the component type information of the target component to be rendered.
5. The method according to claim 1, wherein the method further comprises:
Monitoring the rendering condition of the target component to be rendered in the current page; and/or
And after the rendering of the target component to be rendered is completed, monitoring the running condition of the target component to be rendered in the current page.
6. A component rendering method, the method comprising:
receiving a component configuration file acquisition request sent by a terminal in response to the existence of 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 a plurality of components;
The component configuration file is sent to the terminal, so that the terminal determines a 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;
Wherein the component configuration information includes rendering location information of the component; the terminal determines a target component to be rendered of the second application in the current page according to the component configuration information in the following manner:
Acquiring page structure information of the current page; determining rendering position information matched with the position information of the part to be rendered in the current page according to the page structure information in the component configuration file; and determining a component corresponding to rendering position information matched with the position information of the part to be rendered in the current page as the target component to be rendered.
7. The method of claim 6, wherein the component profile is constructed by:
Responding to the received component issued to the component management platform, and analyzing the received component code of the component to obtain the component configuration information of the component;
the component configuration information of a plurality of components is constructed as the component configuration file.
8. The method of claim 7, wherein said building the component configuration information of a plurality of components as the component configuration file comprises:
constructing component configuration information of a component with a version state being a visible state or a gray state as the component configuration file; or alternatively
And constructing the component configuration information of the component, which is in the visible state or gray state and subscribed by the first application in advance, as the component configuration file.
9. A component rendering apparatus, the apparatus comprising:
The device comprises a first sending module, a component management platform and a second sending module, wherein the first sending module is configured to respond to the existence of a component of a second application in a current page, 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 a plurality of components;
The first determining module is 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 according to the component configuration information;
The rendering module is configured to acquire the target component to be rendered from the component management platform and render the target component to be rendered in the current page;
Wherein the first determining module comprises: the acquisition sub-module is configured to acquire page structure information of the current page; a first determining submodule configured to determine rendering position information matched with position information of a part to be rendered in the current page according to the page structure information in the component configuration file; and a second determining sub-module configured to determine a component corresponding to rendering position information matching position information of a portion to be rendered in the current page as the target component to be rendered.
10. A component rendering apparatus, the apparatus comprising:
The receiving module is configured to receive a component configuration file acquisition request sent by a terminal in response to the existence of 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 a plurality of components;
The second sending module is configured to send 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 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;
Wherein the component configuration information includes rendering location information of the component; the terminal determines a target component to be rendered of the second application in the current page according to the component configuration information in the following manner:
Acquiring page structure information of the current page; determining rendering position information matched with the position information of the part to be rendered in the current page according to the page structure information in the component configuration file; and determining a component corresponding to rendering position information matched with the position information of the part to be rendered in the current page as the target component to be rendered.
11. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processing device, implements the steps of the method according to any one of claims 1-5, or the program, when being executed by a processing device, implements the steps of the method according to any one of claims 6-8.
12. An electronic device, comprising:
A storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 1-5.
13. An electronic device, comprising:
A storage device having a computer program stored thereon;
processing means for executing said computer program in said storage means to carry out the steps of the method according to any one of claims 6-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011448989.4A CN112558933B (en) | 2020-12-09 | 2020-12-09 | Component rendering method and device, readable medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011448989.4A CN112558933B (en) | 2020-12-09 | 2020-12-09 | Component rendering method and device, readable medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112558933A CN112558933A (en) | 2021-03-26 |
CN112558933B true CN112558933B (en) | 2024-09-17 |
Family
ID=75061533
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011448989.4A Active CN112558933B (en) | 2020-12-09 | 2020-12-09 | Component rendering method and device, readable medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112558933B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113360708B (en) * | 2021-05-31 | 2024-05-10 | 北京达佳互联信息技术有限公司 | Video playing method and device, electronic equipment and storage medium |
CN113434800B (en) * | 2021-06-28 | 2023-06-09 | 青岛海尔科技有限公司 | Data processing method and device |
CN114139076A (en) * | 2021-11-19 | 2022-03-04 | 掌阅科技股份有限公司 | Method for displaying webpage content, electronic device and storage medium |
CN114969591A (en) * | 2022-05-26 | 2022-08-30 | 北京百度网讯科技有限公司 | Page rendering method and device, electronic equipment and readable storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111045655A (en) * | 2019-12-18 | 2020-04-21 | 广州市百果园信息技术有限公司 | Page rendering method and device, rendering server and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8700691B2 (en) * | 2011-12-05 | 2014-04-15 | Microsoft Corporation | Minimal download and simulated page navigation features |
CN111782210B (en) * | 2019-04-04 | 2024-10-18 | 阿里巴巴集团控股有限公司 | Page management method, device, electronic equipment and computer readable medium |
CN110727869A (en) * | 2019-10-18 | 2020-01-24 | 北京字节跳动网络技术有限公司 | Page construction method and device |
CN111581555B (en) * | 2020-04-27 | 2023-09-15 | 北京字节跳动网络技术有限公司 | Document loading method, device, equipment and storage medium |
CN111581563B (en) * | 2020-04-30 | 2023-04-28 | 北京字节跳动网络技术有限公司 | Page response method and device, storage medium and electronic equipment |
CN112015420A (en) * | 2020-09-16 | 2020-12-01 | 广东广宇科技发展有限公司 | Form rendering method and device, computer equipment and storage medium |
-
2020
- 2020-12-09 CN CN202011448989.4A patent/CN112558933B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111045655A (en) * | 2019-12-18 | 2020-04-21 | 广州市百果园信息技术有限公司 | Page rendering method and device, rendering server and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112558933A (en) | 2021-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112558933B (en) | Component rendering method and device, readable medium and electronic equipment | |
CN111338623B (en) | Method, device, medium and electronic equipment for developing user interface | |
CN111581555B (en) | Document loading method, device, equipment and storage medium | |
CN110263287A (en) | Page rendering method and apparatus | |
CN111309304B (en) | Method, device, medium and electronic equipment for generating IDL file | |
CN110619100B (en) | Method and apparatus for acquiring data | |
CN113157365B (en) | Program running method, program running device, electronic equipment and computer readable medium | |
CN113126985B (en) | Method, apparatus, electronic device and computer readable medium for page rendering | |
CN113050942A (en) | Page generation method and device, readable medium and electronic equipment | |
CN111754600B (en) | Poster image generation method and device and electronic equipment | |
CN110781437A (en) | Method and device for acquiring webpage image loading duration and electronic equipment | |
CN111783010B (en) | Webpage blank page monitoring method, device, terminal and storage medium | |
CN110377273B (en) | Data processing method, device, medium and electronic equipment | |
CN111984888A (en) | Page rendering method and device, electronic equipment and computer readable medium | |
CN112767036B (en) | Business processing method and equipment | |
CN111596992B (en) | Navigation bar display method and device and electronic equipment | |
CN110619101A (en) | Method and apparatus for processing information | |
CN113515328B (en) | Page rendering method, device, electronic equipment and storage medium | |
CN112835671A (en) | Application page scene switching method, device and device | |
CN113296771B (en) | Page display method, device, equipment and computer readable medium | |
CN113590985B (en) | Page jump configuration method and device, electronic equipment and computer readable medium | |
CN111460020B (en) | Method, device, electronic equipment and medium for resolving message | |
CN112468849B (en) | Method, apparatus, electronic device and medium for video information transmission | |
CN111444457B (en) | Data release method and device, storage medium and electronic equipment | |
CN112732457A (en) | Image transmission method, image transmission device, electronic equipment and computer readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |