Component loading method and apparatus, and device and storage medium

By obtaining component configuration information of the target scenario, determining the correspondence relationship and loading order between the components and the scene running nodes, the problem of component loading logic coupling in the existing technology is solved, and the flexibility and efficiency of component loading is improved, and the user experience is improved. .

WO2024245311A1PCT designated stage expired Publication Date: 2024-12-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/096181
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-31
Filing Date
2024-05-29
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

In the prior art, component loading logic is coupled to application code, resulting in the need to adjust the code to adjust the component loading or loading order, which is very labor-intensive and costly, making it difficult to achieve flexible component loading management.

Method used

By obtaining component configuration information of the target scenario, determining the correspondence and loading order between the components and the scene running nodes, realizing configurable loading of components, avoiding performance waste caused by loading irrelevant components, and optimizing component loading order.

Benefits of technology

It realizes the flexibility and efficiency of component loading, reduces component loading time, improves user experience, and avoids frequent adjustments to application code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024096181_05122024_PF_FP_ABST
    Figure CN2024096181_05122024_PF_FP_ABST
Patent Text Reader

Abstract

A component loading method and apparatus, and a device and a storage medium. The method comprises: after a component loading request for a target scene is received, first acquiring component configuration information corresponding to the target scene, wherein the component configuration information comprises the correlation between a first component corresponding to the target scene and a scene operation node, and there is an execution sequence relationship between different scene operation nodes; and after a first scene operation node in a target service scene is entered, on the basis of the component configuration information, loading the first component corresponding to the first scene operation node. The correlation between a first component and a scene operation node is configured by using component configuration information, thereby realizing configurable loading for a component loading sequence. Since the component loading sequence can be adjusted by means of updating the component configuration information, there is no need to adjust a code of an application program, thereby facilitating the adjustment to the component loading sequence, etc.
Need to check novelty before this filing date? Find Prior Art

Description

Component loading method, device, equipment and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on May 31, 2023, with application number 202310637190.7 and invention name “A component loading method, device, equipment and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present disclosure relates to the field of data processing, and in particular to a component loading method, apparatus, device, and storage medium. Background Art

[0003] With the continuous development of computer technology, application functionality and features are becoming increasingly diverse. At the same time, the number of components required to run an application is also increasing. A component is the smallest unit used to implement a specific function. For example, in the live streaming industry, the process of entering a live broadcast room typically requires the loading of a large number of different components.

[0004] Currently, the logic for loading components is coupled with the application code. If you want to remove the loading of certain components or adjust the loading order of certain components, you need to adjust the application code, which is a lot of work and requires re-releasing the application, which is costly.

[0005] Therefore, how to load components so as to facilitate adjustment of the loading order of components is a technical problem that urgently needs to be solved.

[0006] Summary of the Invention

[0007] In order to solve the above technical problems, an embodiment of the present disclosure provides a component loading method.

[0008] In a first aspect, the present disclosure provides a component loading method, the method comprising:

[0009] In response to a component loading request for a target scene, obtaining component configuration information corresponding to the target scene; wherein the component configuration information includes a correspondence between a first component in the target scene and a scene execution node, the scene execution node being obtained by dividing the life cycle of the target scene, and different scene execution nodes having an execution order relationship;

[0010] After entering the first scenario running node under the target scenario, the first component corresponding to the first scenario running node is loaded based on the component configuration information.

[0011] In an optional implementation, after entering the first scenario running node, the method further includes:

[0012] Based on the original corresponding relationship of the components corresponding to the target scenario and the component configuration information, the second component corresponding to the first scenario running node is loaded.

[0013] In an optional implementation, the loading of the second component corresponding to the first scenario running node based on the original correspondence relationship of the components corresponding to the target scenario and the component configuration information includes:

[0014] Determine the original component to be loaded corresponding to the first scenario running node based on the original corresponding relationship of the components corresponding to the target scenario;

[0015] Determining a second component corresponding to the first scenario execution node according to the to-be-loaded component corresponding to the first scenario execution node and the first component corresponding to the target scenario;

[0016] The second component corresponding to the first scenario running node is loaded.

[0017] In an optional implementation, before loading the second component corresponding to the first scenario execution node, the method further includes:

[0018] In a case where the first scenario running node corresponds to a plurality of the second components, determining a loading order among the plurality of the second components based on a component loading order in the original corresponding relationship of the components;

[0019] In an optional implementation, the loading of the first component corresponding to the first scenario execution node based on the component configuration information includes:

[0020] Determining a loading order among the first components based on the component loading order in the component configuration information;

[0021] Based on the loading order of the first components, the first component corresponding to the first scenario execution node is loaded.

[0022] In an optional implementation, the loading order priority of the first component corresponding to the first scenario execution node is higher than the loading order priority of the second component corresponding to the first scenario execution node.

[0023] In an optional implementation, the method further includes:

[0024] Based on the loading order of the first component and the second component corresponding to the first scenario running node, the first component and the second component corresponding to the first scenario running node are written into the preset queue respectively; wherein the preset queue is used to load the first component and the second component.

[0025] In an optional implementation, after entering the first scenario execution node under the target scenario, loading the first component corresponding to the first scenario execution node based on the component configuration information includes:

[0026] After entering the first scene running node under the target scene, determining whether the component loading timing is currently met; wherein the component loading timing is determined based on the current system performance and / or the current frame rendering time consumption information;

[0027] When it is determined that the component loading opportunity is currently met, the first component corresponding to the first scenario execution node is read from the preset queue and loaded.

[0028] In an optional implementation, the component configuration information further includes a correspondence between the first component and the component group, a loading order between different component groups corresponding to the same scene execution node, and a loading order between different first components corresponding to the same component group, wherein the correspondence between the first component and the component group is determined based on a rendering timing feature of the first component; after entering the first scene execution node under the target scene, loading the first component corresponding to the first scene execution node based on the component configuration information includes:

[0029] After entering the first scenario running node under the target scenario, determining the component group corresponding to the first scenario running node based on the component configuration information;

[0030] The first component corresponding to the component group is loaded.

[0031] In an optional implementation, before responding to the component loading request for the target scene and obtaining the component configuration information corresponding to the target scene, the method further includes:

[0032] Get the differential component configuration file from the configuration platform;

[0033] The full component configuration file is updated using the differential component configuration file to obtain an updated component configuration file; wherein the updated component configuration file includes component configuration information corresponding to the target scenario.

[0034] In an optional embodiment, the differential component configuration file includes editing operation information for the target component, and the use of the differential component configuration file to update the full component configuration file to obtain the updated component configuration file includes:

[0035] Based on the editing operation information for the target component, performing an editing operation on the configuration information of the target component in the full component configuration file to obtain updated configuration information of the target component;

[0036] An updated component configuration file is determined based on the updated configuration information of the target component.

[0037] In a second aspect, the present disclosure provides a component loading device, the device comprising:

[0038] A first acquisition module is configured to, in response to a component loading request for a target scene, acquire component configuration information corresponding to the target scene; wherein the component configuration information includes a correspondence between a first component in the target scene and a scene execution node, wherein the scene execution node is obtained by dividing the life cycle of the target scene, and different scene execution nodes have an execution order relationship;

[0039] The first loading module is configured to load a first component corresponding to a first scenario running node under the target scenario based on the component configuration information after entering the first scenario running node under the target scenario.

[0040] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium. When the instructions are executed on a terminal device, the terminal device implements the above method.

[0041] In a fourth aspect, the present disclosure provides a component loading device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned method when executing the computer program.

[0042] In a fifth aspect, the present disclosure provides a computer program product, which includes a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0044] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0045] FIG1 is a flowchart of a component loading method provided by an embodiment of the present disclosure;

[0046] FIG2 is a schematic diagram of a storage structure of a component configuration file provided by an embodiment of the present disclosure;

[0047] FIG3 is a schematic diagram showing the effect of a component loading method provided by an embodiment of the present disclosure;

[0048] FIG4 is a schematic structural diagram of a component loading device provided by an embodiment of the present disclosure;

[0049] FIG5 is a schematic structural diagram of a component loading device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0050] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0051] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0052] A component is the smallest unit used to implement a specific function. Components primarily function in two ways: the user interface (UI) that presents the business, and the business logic itself. Currently, component loading and management are relatively simple, with component loading logic implemented in the application code. However, removing certain components or adjusting their loading order requires adjusting the application code, which is labor-intensive and requires re-releasing the application, resulting in high costs.

[0053] Taking live streaming as an example, with the rapid development of live streaming technology, live streaming functionality is becoming increasingly diverse. Based on business scenarios, these can include show live streaming, e-commerce live streaming, program live streaming, and multi-person live streaming. Multi-person live streaming can also be subdivided into various gameplay modes, such as PK and KTV singing challenges, resulting in a richer functionality. Each of these live streaming scenarios requires the client to use one or more different components to support them. For example, the most common show live streaming scenario requires users to load a large number of components when entering a live streaming room. However, some of these components are irrelevant to the current live streaming room type. Because the current component loading logic is coupled to the application code, it is difficult to remove certain components in a timely manner. Consequently, irrelevant components must be loaded during the live streaming process, resulting in a certain performance waste and a longer entry time, affecting the user's experience.

[0054] To this end, an embodiment of the present disclosure provides a component loading method, which avoids performance waste caused by loading irrelevant components during component loading by configuring the components required to be loaded for the target scene as required in the component configuration information corresponding to the target scene, reduces the time consumed in loading components for the target scene, and improves the user experience.

[0055] In addition, in the component loading method provided by the embodiment of the present disclosure, the loading order of the components is determined by configuring the correspondence between the first component and the scene running node in the component configuration information corresponding to the target scene, which can control the priority loading of certain components and realize the management of the loading order of the components.

[0056] Based on this, an embodiment of the present disclosure provides a component loading method. Referring to FIG1 , which is a flow chart of a component loading method provided by an embodiment of the present disclosure, the method specifically includes:

[0057] S101: In response to a component loading request for a target scene, obtaining component configuration information corresponding to the target scene.

[0058] Among them, the component configuration information includes the correspondence between the first component in the target business scenario and the scenario running node. The scenario running node is obtained by dividing the life cycle of the target scenario, and different scenario running nodes have an execution order relationship.

[0059] In the disclosed embodiment, before loading a component, a configuration file is pre-pulled from a configuration platform. The configuration file is a file that stores component configuration information based on a preset storage structure. Specifically, the configuration file stores a correspondence between a business scenario and a first component, where the correspondence indicates that the component corresponding to the business scenario is loaded in the corresponding business scenario.

[0060] In the disclosed embodiment, upon receiving a component loading request for a target scenario, component configuration information corresponding to the target scenario is first obtained from a configuration file. The component configuration information corresponding to the target scenario includes a correspondence between a first component corresponding to the target scenario and a scenario execution node, where the correspondence indicates that the first component is loaded at the scenario execution node corresponding to the first component.

[0061] Since the life cycle of the target business scenario can be divided into multiple scenario running nodes, and the multiple scenario running nodes have an execution order relationship, the first components that have corresponding relationships with different scenario running nodes also have a loading order relationship.

[0062] It is worth noting that the first component in the embodiment of the present disclosure may be a component whose loading order needs to be adjusted in the target scene, and components that do not need to be adjusted in loading order may not be configured in the component configuration information.

[0063] In order to control the loading order relationship between different first components corresponding to the same scenario running node through component configuration information, the embodiment of the present disclosure can also configure the loading order relationship between different first components corresponding to the same scenario running node in the component configuration information.

[0064] In an optional implementation, priorities can be set separately for different first components corresponding to the same scenario execution node in the component configuration information, for example, by configuring a priority attribute for each first component. The loading order relationship of the first components corresponding to the same scenario execution node can be determined based on the priorities corresponding to the first components. For example, assuming that the priorities of component 1 and component 2 corresponding to the same scenario execution node are set to 10 and 9 respectively, component 1 with a priority of 10 will be loaded before component 2 with a priority of 9.

[0065] In another optional implementation, the first components corresponding to the same scene running node can be divided into the same or different component groups, that is, the correspondence between the first components and the component groups is configured in the component configuration information, and the correspondence is determined based on the rendering timing characteristics of the first component. For example, if component A needs to be rendered at a certain rendering timing, then component A is added to the component group corresponding to the rendering timing, that is, each component in the component group needs to be loaded at the rendering timing. In addition, the component configuration information can also be configured with the loading order relationship between different component groups corresponding to the same scene running node, and the loading order relationship between different first components corresponding to the same component group.

[0066] Specifically, the loading order between different component groups corresponding to the same scenario running node can be configured by setting priorities for different component groups corresponding to the same scenario running node. Based on the priorities of the component groups, the first components corresponding to the same component group can be loaded in a sequential order. For example, components 3 and 4 corresponding to the same component group can trigger the loading of component 4 after component 3 is loaded, and there is no loading of other first components between components 3 and 4.

[0067] The loading order of different first components corresponding to the same component group may also be configured in the component configuration information. Specifically, priorities are set for different first components corresponding to the same component group in the component configuration information.

[0068] Since the loading times of the first components corresponding to the same component group are similar, the corresponding component group can be determined based on the rendering timing characteristics of the first components. Optionally, different first components that need to be rendered in the same frame can be assigned to the same component group so that the different first components that need to be rendered in the same frame can be displayed on the page at the same time, thereby improving the user experience.

[0069] An embodiment of the present disclosure provides a schematic diagram of the storage structure of a component configuration file, with reference to Figure 2, wherein the component configuration file is divided into a four-level structure, and the first-level structure 201 corresponds to a business scenario, such as business scenario 1 and business scenario 2. In each business scenario, it can also be divided into a scenario runtime, corresponding to the second-level structure 202, such as scenario runtime 1 and scenario runtime 2 under business scenario 1. In addition, the scenario runtime corresponds to one or more component groups, wherein the component group corresponds to the third-level structure 203, such as component group 1 and component group 2 under scenario runtime 1. The component group corresponds to one or more first components, and the first component corresponds to the fourth-level structure 204, such as component 1 and component 2 corresponding to component group 1. Based on the above storage structure, the configuration of the loading order of components in different business scenarios can be achieved by using the component configuration file of the four-level structure.

[0070] In addition, priority attributes can be set for the component groups corresponding to the third-level structure, and the loading order of the first components corresponding to each component group can be determined through the priority attributes; priority attributes can also be set for the components corresponding to the fourth-level structure, and the loading order between different first components corresponding to the same component group can be determined through the priority attributes.

[0071] S102: After entering the first scenario execution node under the target scenario, loading the first component corresponding to the first scenario execution node based on the component configuration information.

[0072] In an embodiment of the present disclosure, after entering the first scene running node under the target scene, the loading order between the first components corresponding to the first scene running node is determined based on the component loading order in the component configuration information, and then the first component corresponding to the first scene running node is loaded based on the loading order between the first components.

[0073] In an optional embodiment, after entering the first scene running node under the target scene, if a loading trigger event for the first component corresponding to the first scene running node is received (for example, a rendering trigger operation for the page where the first component is located), the current system performance status and / or the current frame rendering time information is first obtained; then, based on the current system performance status and / or the current frame rendering time information, it is determined whether the component loading timing of the first component is currently met, and specifically whether the first component is loaded in the current frame of the first scene running node.

[0074] Among them, the current system performance status is used to reflect whether the current system performance can support the loading of the first component, and the current frame rendering time information is used to reflect whether the time for loading the component in the current frame exceeds the preset time. The preset time can be the standard time for rendering the current frame.

[0075] When it is determined that the component loading opportunity for the first component is currently met, the first component is loaded.

[0076] In an optional implementation, the component configuration information includes the correspondence between the first component and the scene running node, the correspondence between the first component and the component group, the loading order relationship between different component groups corresponding to the same scene running node, and the loading order relationship between different first components corresponding to the same component group. Based on the above correspondence, the loading order of the first component corresponding to the target scene can be determined, and then after entering the first scene running node under the target scene, the first component can be loaded based on the loading order.

[0077] In the component loading method provided in the embodiments of the present disclosure, component configuration information is used to configure the correspondence between the first component and the scenario execution node, thereby achieving configurable loading of the component loading order. Because the component loading order can be adjusted by updating the component configuration information without adjusting the application code, the component loading method provided in the embodiments of the present disclosure facilitates adjustment of the component loading order, etc.

[0078] In actual applications, after entering the first scenario running node, not only the first component corresponding to the first scenario running node is loaded based on the component configuration information, but also the second component corresponding to the first scenario running node is loaded based on the original correspondence relationship of the components corresponding to the target scene and the component configuration information.

[0079] The second component refers to a component in the target scene whose loading order is not configured in the component configuration information. The original corresponding relationship of the components corresponding to the target scene includes the original corresponding relationship between each component in the target scene and the scene running node.

[0080] In an optional implementation, the loading of the second component corresponding to the first scenario running node based on the original correspondence relationship of the components corresponding to the target scenario and the component configuration information includes:

[0081] First, based on the original correspondence between the components corresponding to the target scene, the component to be loaded corresponding to the first scene running node is determined; then, based on the component to be loaded corresponding to the first scene running node and the first component corresponding to the target scene, the second component corresponding to the first scene running node is determined; and then, the second component corresponding to the first scene running node is loaded.

[0082] Wherein, determining the second component corresponding to the first scenario execution node according to the to-be-loaded component corresponding to the first scenario execution node and the first component corresponding to the target scenario includes:

[0083] The other components to be loaded corresponding to the first scenario running node, except the first component corresponding to the first scenario running node, are determined as the second components corresponding to the first scenario running node.

[0084] In one optional embodiment, the first component corresponding to the first scenario execution node configured in the component configuration information has a higher loading order priority than the second component corresponding to the first scenario execution node. In other words, after entering the first scenario execution node, the first component corresponding to the first scenario execution node is loaded first, and then the second component corresponding to the first scenario execution node is loaded.

[0085] In another optional embodiment, when a first scenario execution node corresponds to multiple second components, the loading order among the multiple second components is determined based on the component loading order in the original component correspondence relationship, and then the second component corresponding to the first scenario execution node is loaded based on the loading order among the multiple second components. In other words, components that are not included in the component configuration information are loaded according to the component loading order in the original component correspondence relationship.

[0086] In an optional implementation, a queue can be used to implement component loading. Specifically, after determining the loading order of the first component and the second component corresponding to the first scenario running node, the first component and the second component corresponding to the first scenario running node are written into the preset queue in sequence based on the loading order. After the first component and the second component corresponding to the first scenario running node are written into the preset queue, they wait to be loaded.

[0087] In actual applications, after entering the first scene running node under the target scene, it is determined whether the component loading timing is currently met. If it is determined that the component loading timing is currently met, the first component and the second component corresponding to the first scene running node are read and loaded from the preset queue. Since the first component and the second component corresponding to the first scene running node are written into the preset queue based on the loading order, and based on the first-in-first-out principle of the queue, when it is determined that the component loading timing is currently met, the first component and the second component corresponding to the first scene running node are also read and loaded from the preset queue based on the loading order to complete the component loading.

[0088] To facilitate understanding of this solution, an embodiment of the present disclosure provides a schematic diagram of the effect of a component loading method, as shown in Figure 3. The original correspondence relationship of the components corresponding to the target scene includes the original correspondence relationship between components A to L and the scene running nodes of the target scene, that is, the original loading order of each component.

[0089] The component configuration information of the target scene is provided with a correspondence between the first component and the scene running node. The component configuration information shown in FIG3 includes: the correspondence between the scene running node p0 and components D and B, and component D is loaded before component B. The correspondence between other scene running nodes and the first component can be understood by reference.

[0090] In the disclosed embodiment, based on the component configuration information of the target scene and the original correspondence between the components, the loading order information of each component is determined, which may include: the correspondence between the scene execution node p0 and components D, B, and C, with components D and B loading before component C. The correspondence between other scene execution nodes and the first component can be understood by reference.

[0091] It is worth noting that the method for loading components based on component configuration information provided by the embodiment of the present disclosure can adjust the original loading order of each component by adjusting the component configuration information, and keep the loading order of the components not configured in the component configuration information (i.e., the second component) unchanged. For example, the original loading order of component C is corresponding to the scene running node p0. In the re-determined loading order information, component C still has a corresponding relationship with the scene running node p0. After the first component corresponding to the scene running node p0 is loaded, component C is loaded.

[0092] In the component loading method provided by the embodiment of the present disclosure, the loading order of the components is determined based on the component configuration information configured for the business scenario and the original corresponding relationship of the components. By configuring the component configuration information, the loading order of the components in the original corresponding relationship of the components can be adjusted, thereby realizing configurable loading of the component loading order. Since the loading order of the components can be adjusted by updating the component configuration information without adjusting the application code, the component loading method provided by the embodiment of the present disclosure facilitates the adjustment of the loading order of the components, etc.

[0093] Since the component configuration file is pulled from the configuration platform, in order to reduce the overhead of network transmission, the embodiment of the present disclosure can use the differential component configuration file to update the full component configuration file to obtain the updated component configuration file.

[0094] Specifically, a full component configuration file is stored on the client. After obtaining a differential component configuration file from the configuration platform, the differential component configuration file can be used to update the full component configuration file on the client. The full component configuration file and the differential component configuration file can store component configuration information based on the same storage structure, which can be the four-level storage structure shown in Figure 2 above.

[0095] In an optional implementation, edit operation information can be set in the differential component configuration file for the first component that needs to be updated. When the full component configuration file is updated using the differential component configuration file, the configuration information of the target component in the full component configuration file can be edited based on the edit operation information of the target component in the differential component configuration file. The edit operation information can include operations such as adding, deleting, and modifying the target component.

[0096] In an optional implementation, an operator may be added to the first component that needs to be updated in the differential component configuration file, an operator may be added to the component group that needs to be updated in the differential component configuration file, or an operator may be added to the business scenario that needs to be updated in the differential component configuration file. Specifically, the operator is used to identify the editing operation information for the target editing object. The target editing object may include the first component, component group, or business scenario in the full component configuration file.

[0097] Among them, the operators may include one of add, remove, replace, clear, and modify. add is used to indicate the accumulation of the differential component configuration file and the full component configuration file for the target editing object, and inserting the configuration information for the target editing object in the differential component configuration file into the full component configuration file. remove is used to indicate the removal of the configuration information for the target editing object in the full component configuration file. replace is used to indicate the replacement of the configuration information for the target editing object in the full component configuration file with the configuration information for the target editing object in the differential component configuration file. clear is used to indicate the deletion of the configuration information for the target editing object in the full component configuration file. modify is used to indicate the modification of the configuration information for the target editing object in the full component configuration file.

[0098] In the embodiment of the present disclosure, after the full component configuration file is updated using the differential component configuration file to obtain the updated component configuration file, the components corresponding to each business scenario can be loaded based on the updated component configuration file.

[0099] Based on the above method embodiment, the present disclosure further provides a component loading device. Referring to FIG4 , which is a schematic structural diagram of a component loading device provided in an embodiment of the present disclosure, the device includes:

[0100] A first acquisition module 401 is configured to, in response to a component loading request for a target scene, acquire component configuration information corresponding to the target scene; wherein the component configuration information includes a correspondence between a first component in the target scene and a scene execution node, wherein the scene execution node is obtained by dividing the life cycle of the target scene, and different scene execution nodes have an execution order relationship;

[0101] The first loading module 402 is configured to load a first component corresponding to a first scenario execution node under the target scenario based on the component configuration information after entering the first scenario execution node under the target scenario.

[0102] In an optional embodiment, the device further includes:

[0103] The second loading module is used to load the second component corresponding to the first scenario running node based on the original corresponding relationship of the components corresponding to the target scenario and the component configuration information after entering the first scenario running node.

[0104] In an optional implementation manner, the second loading module includes:

[0105] A first determining submodule is configured to determine the component to be loaded corresponding to the first scenario running node based on the original corresponding relationship of the components corresponding to the target scenario;

[0106] A second determining submodule, configured to determine a second component corresponding to the first scenario execution node according to the to-be-loaded component corresponding to the first scenario execution node and the first component corresponding to the target scenario;

[0107] The first loading submodule is used to load the second component corresponding to the first scenario running node.

[0108] In an optional implementation, the first loading submodule includes:

[0109] A third determining submodule is configured to determine, when the first scenario running node corresponds to a plurality of the second components, a loading order among the plurality of the second components based on the component loading order in the original corresponding relationship of the components;

[0110] The second loading submodule is used to load the second component corresponding to the first scenario running node based on the loading order among the multiple second components.

[0111] In an optional implementation, the first loading module includes:

[0112] a fourth determining submodule, configured to determine a loading order among the first components based on the component loading order in the component configuration information;

[0113] The third loading submodule is used to load the first component corresponding to the first scenario execution node based on the loading order between the first components.

[0114] In an optional implementation, the loading order priority of the first component corresponding to the first scenario execution node is higher than the loading order priority of the second component corresponding to the first scenario execution node.

[0115] In an optional embodiment, the device further includes:

[0116] A writing module is used to write the first component and the second component corresponding to the first scenario running node into a preset queue in sequence based on the loading order of the first component and the second component corresponding to the first scenario running node; wherein the preset queue is used to load the first component and the second component.

[0117] In an optional implementation, the first loading module includes:

[0118] A fifth determination submodule, configured to determine whether a component loading opportunity is currently met after entering the first scenario execution node under the target scenario;

[0119] The reading submodule is used to read and load the first component corresponding to the first scenario running node from the preset queue when it is determined that the component loading opportunity is currently met.

[0120] In an optional embodiment, the component configuration information further includes a correspondence between the first component and the component group, a loading order between different component groups corresponding to the same scene running node, and a loading order between different first components corresponding to the same component group, wherein the correspondence between the first component and the component group is determined based on a rendering timing feature of the first component; the first loading module includes:

[0121] a sixth determining submodule, configured to, after entering a first scenario running node under the target scenario, determine a component group corresponding to the first scenario running node based on the component configuration information;

[0122] The fourth loading submodule is used to load the first component corresponding to the component group.

[0123] In an optional embodiment, the device further includes:

[0124] The second acquisition module is used to obtain the differential component configuration file from the configuration platform;

[0125] An update module is used to update the full component configuration file using the differential component configuration file to obtain an updated component configuration file; wherein the updated component configuration file includes component configuration information corresponding to the target scenario.

[0126] In an optional implementation, the differential component configuration file includes editing operation information for the target component, and the update module includes:

[0127] An editing submodule, configured to perform an editing operation on the configuration information of the target component in the full component configuration file based on the editing operation information for the target component, to obtain updated configuration information of the target component;

[0128] The seventh determining submodule is configured to determine an updated component configuration file based on the updated configuration information of the target component.

[0129] In the component loading device provided by the embodiment of the present disclosure, when a component loading request for a target scene is received, the component configuration information corresponding to the target scene is first obtained; wherein the component configuration information includes the correspondence between the first component corresponding to the target scene and the scene running node, and different scene running nodes have an execution order relationship. After entering the first scene running node under the target business scenario, the first component corresponding to the first scene running node is loaded based on the component configuration information. The embodiment of the present disclosure can use the component configuration information to configure the correspondence between the first component and the scene running node, and realize configurable loading of the component loading order. Since the adjustment of the component loading order can be achieved by updating the component configuration information, there is no need to adjust the application code. Therefore, the component loading method provided by the embodiment of the present disclosure is convenient for adjusting the component loading order, etc.

[0130] In addition to the above-mentioned method and apparatus, the embodiment of the present disclosure further provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal device, the terminal device implements the component loading method described in the embodiment of the present disclosure.

[0131] The embodiment of the present disclosure further provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, the component loading method described in the embodiment of the present disclosure is implemented.

[0132] In addition, the embodiment of the present disclosure further provides a component loading device, as shown in FIG5 , which may include:

[0133] Processor 501, memory 502, input device 503, and output device 504. The component loading device may include one or more processors 501, with one processor being used as an example in FIG5 . In some embodiments of the present disclosure, processor 501, memory 502, input device 503, and output device 504 may be connected via a bus or other means, with FIG5 using a bus as an example.

[0134] Memory 502 can be used to store software programs and modules. Processor 501 executes the various functional applications and data processing of the component loading device by running the software programs and modules stored in memory 502. Memory 502 may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, and the like. Memory 502 may also include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Input device 503 may be used to receive input digital or character information and generate signal input related to user settings and function control of the component loading device.

[0135] Specifically in this embodiment, the processor 501 will load the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 will run the applications stored in the memory 502, thereby realizing the various functions of the above-mentioned component loading device.

[0136] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0137] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. A component loading method, the method comprising: In response to a component loading request for a target scene, component configuration information corresponding to the target scene is obtained; wherein the component configuration information includes a correspondence between a first component in the target scene and a scene running node, the scene running node is obtained by dividing the life cycle of the target scene, and different scene running nodes have an execution order relationship; After entering the first scenario running node under the target scenario, the first component corresponding to the first scenario running node is loaded based on the component configuration information.

2. The method according to claim 1, wherein after entering the first scenario running node, the method further comprises: Based on the original corresponding relationship of the components corresponding to the target scene and the component configuration information, the second component corresponding to the first scene running node is loaded.

3. The method according to claim 2, wherein the loading of the second component corresponding to the first scenario running node based on the original corresponding relationship of the components corresponding to the target scenario and the component configuration information comprises: Based on the original corresponding relationship of the components corresponding to the target scene, determining the component to be loaded corresponding to the running node of the first scene; Determine a second component corresponding to the first scenario running node according to the to-be-loaded component corresponding to the first scenario running node and the first component corresponding to the target scenario; The second component corresponding to the first scenario running node is loaded.

4. The method according to claim 3, wherein the loading of the second component corresponding to the first scenario running node comprises: In the case where the first scenario running node corresponds to a plurality of the second components, determining a loading order among the plurality of the second components based on a component loading order in an original corresponding relationship of the components; Based on the loading order among the multiple second components, the second component corresponding to the first scenario execution node is loaded.

5. The method according to claim 1, wherein the loading of the first component corresponding to the first scenario running node based on the component configuration information comprises: Determining a loading order among the first components based on the component loading order in the component configuration information; Based on the loading order of the first components, the first component corresponding to the first scenario running node is loaded.

6. The method according to any one of claims 2 to 5, wherein: The loading order priority of the first component corresponding to the first scenario execution node is higher than that of the second component corresponding to the first scenario execution node.

7. The method according to claim 2, further comprising: Based on the loading order of the first component and the second component corresponding to the first scenario running node, the first component and the second component corresponding to the first scenario running node are written into a preset queue in turn; wherein the preset queue is used to load the first component and the second component.

8. The method according to claim 7, wherein after entering the first scenario running node under the target scenario, loading the first component corresponding to the first scenario running node based on the component configuration information comprises: After entering the first scene running node under the target scene, determining whether the component loading timing is currently met; When it is determined that the component loading opportunity is currently met, the first component corresponding to the first scenario running node is read from the preset queue and loaded.

9. The method according to claim 1, wherein the component configuration information further includes a correspondence between the first component and the component group, a loading order between different component groups corresponding to the same scene running node, and a loading order between different first components corresponding to the same component group, and the correspondence between the first component and the component group is determined based on the rendering timing feature of the first component; After entering the first scenario running node under the target scenario, loading the first component corresponding to the first scenario running node based on the component configuration information includes: After entering the first scene running node under the target scene, based on the component Configuration information, determining the component group corresponding to the running node of the first scenario; The first component corresponding to the component group is loaded.

10. The method according to claim 1, wherein before the component loading request for the target scene is responded to and the component configuration information corresponding to the target scene is obtained, the method further comprises: Get the differential component configuration file from the configuration platform; The full component configuration file is updated using the differential component configuration file to obtain an updated component configuration file; wherein the updated component configuration file includes component configuration information corresponding to the target scenario.

11. The method according to claim 10, wherein the differential component configuration file includes editing operation information for the target component, and the updating of the full component configuration file using the differential component configuration file to obtain the updated component configuration file comprises: Based on the editing operation information for the target component, perform an editing operation on the configuration information of the target component in the full component configuration file to obtain updated configuration information of the target component; Based on the updated configuration information of the target component, an updated component configuration file is determined.

12. A component loading device, comprising: A first acquisition module, configured to acquire component configuration information corresponding to a target scene in response to a component loading request for the target scene; wherein the component configuration information includes a correspondence between a first component in the target scene and a scene running node, wherein the scene running node is obtained by dividing the life cycle of the target scene, and different scene running nodes have an execution order relationship; The first loading module is used to load the first component corresponding to the first scenario running node based on the component configuration information after entering the first scenario running node under the target scenario.

13. A computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the instructions are executed on a terminal device, the terminal device implements the method according to any one of claims 1 to 11.

14. A component loading device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Data processing method, apparatus and system of live broadcast page

    CN106792188A

  • Service information push method and apparatus

    CN106911757A

  • Business processing component calling method and system, electronic equipment and storage medium

    CN112540837A

  • Service request processing method and device

    CN113326030A

  • Submodule loading method and device, computer equipment and storage medium

    CN115454529A