Component loading method and device, equipment and storage medium

By obtaining the corresponding relationship between components and scene running nodes, the configurable management of component loading order is achieved, which solves the adjustment difficulties and high cost problems caused by component loading logic coupling in the prior art, and improves component loading efficiency and user experience.

CN119065732APending Publication Date: 2024-12-03BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310637190.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the prior art, component loading logic is coupled to application code, resulting in the adjustment of component loading order or removing component loading needs to be adjusted. The workload is high and the cost is high, making it difficult to achieve flexible component loading management.

Method used

By obtaining component configuration information of the target scenario, including the correspondence between the components and the scene running node, component loading is carried out based on this information, and configurable management of component loading order is realized to avoid adjusting application code.

Benefits of technology

It realizes flexible adjustment of component loading order, reduces component loading time, improves user experience, reduces dependence on application code, and simplifies component management process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065732A_ABST
    Figure CN119065732A_ABST
Patent Text Reader

Abstract

The invention provides a component loading method and device, equipment and a storage medium, and the method comprises the steps: firstly obtaining component configuration information corresponding to a target scene when a component loading request for the target scene is received; the component configuration information comprises a corresponding relationship between the first component corresponding to the target scene and the scene operation nodes, and different scene operation nodes have an execution sequence relationship. And after entering a first scene operation node in the target service scene, loading a first component corresponding to the first scene operation node based on the component configuration information. According to the method and the device, the corresponding relation between the first component and the scene operation node can be configured by utilizing the component configuration information, and configurable loading of the component loading sequence is realized. The component loading sequence can be adjusted by updating the component configuration information, and the code of the application program does not need to be adjusted, so that the component loading method provided by the invention is convenient for adjusting the loading sequence and the like of the component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the continuous development of computer technology, the functions and gameplay of applications are becoming more and more abundant. At the same time, the number of components that need to be loaded for the operation of applications is also increasing. Among them, a component refers to the smallest unit used to implement a specific function. For example, in the live broadcast field, a large number of different components usually need to be loaded during the live broadcast room entry process.

[0003] Currently, the logic of loading components is coupled to 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.

[0004] 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. Summary of the invention

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

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

[0007] 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;

[0008] 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.

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

[0010] 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.

[0011] In an optional implementation manner, 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 includes:

[0012] Based on the original corresponding relationship of the components corresponding to the target scene, determine the original to-be-loaded component corresponding to the running node of the first scene;

[0013] 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;

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

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

[0016] 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;

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

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

[0019] Based on the loading order between the first components, the first component corresponding to the first scene running node is loaded.

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

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

[0022] 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.

[0023] 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:

[0024] 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;

[0025] 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.

[0026] 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 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; after entering the first scene running node under the target scene, loading the first component corresponding to the first scene running node based on the component configuration information includes:

[0027] 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;

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

[0029] In an optional implementation manner, before the 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:

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

[0031] 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.

[0032] In an optional implementation, the differential component configuration file includes editing operation information for the target component, and the method of updating the full component configuration file using the differential component configuration file to obtain the updated component configuration file includes:

[0033] 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;

[0034] Based on the updated configuration information of the target component, an updated component configuration file is determined.

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

[0036] 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;

[0037] 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.

[0038] In a third aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a terminal device, the terminal device implements the above method.

[0039] 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 method when executing the computer program.

[0040] In a fifth aspect, the present disclosure provides a computer program product, wherein the computer program product comprises a computer program / instructions, and the computer program / instructions implement the above method when executed by a processor.

[0041] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:

[0042] The disclosed embodiment provides a component loading method, when receiving a component loading request for a target scene, first obtains the component configuration information corresponding to the target scene; 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 disclosed embodiment 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 without adjusting the application code, the component loading method provided by the disclosed embodiment is convenient for adjusting the component loading order, etc. 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 invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Figure 1 A flowchart of a component loading method provided by an embodiment of the present disclosure;

[0046] Figure 2 A schematic diagram of a storage structure of a component configuration file provided in an embodiment of the present disclosure;

[0047] Figure 3 A schematic diagram of the effect of a component loading method provided by an embodiment of the present disclosure;

[0048] Figure 4 A schematic diagram of the structure of a component loading device provided in an embodiment of the present disclosure;

[0049] Figure 5 A schematic diagram of the structure 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 in the embodiments can be combined with each other without 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. The main functions of a component are divided into two parts: the user interface UI for business presentation and the logic of the business itself. Currently, the loading and management of components is relatively simple. The logic of loading components is implemented through 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 the application to be re-released, which is costly.

[0053] Taking the live broadcast field as an example, with the rapid development of live broadcast technology, live broadcast functions are becoming more and more abundant. According to the business scenario, live broadcast business scenarios can include show live broadcast, e-commerce live broadcast, program live broadcast, multi-person live broadcast and other business scenarios. In the multi-person live broadcast scenario, it is also possible to subdivide various gameplays, such as PK, KTV singing challenge, etc., with very rich functions. For the above live broadcast business scenarios, the client needs to use one or more different components to support them. Taking the most common show live broadcast scenario as an example, the viewing user needs to load a large number of components during the live broadcast room entry process, but some of these components are irrelevant to the current live broadcast room type. Since the current component loading logic is coupled with the application code, it is not convenient to remove the loading of certain components in time. Therefore, in the live broadcast room entry process, some irrelevant components have to be loaded, which has a certain degree of performance waste, and also causes the live broadcast room entry process to take a long time, affecting the live broadcast room entry experience of the viewing user.

[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, reduces the component loading time of the target scene, and improves user experience by configuring the components required to be loaded for the target scene as required in the component configuration information corresponding to the target scene.

[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, and the priority loading of certain components can be controlled, thereby realizing the management of the loading order of the components.

[0056] Based on this, the present disclosure provides a component loading method, referring to Figure 1 , is a flow chart of a component loading method provided by an embodiment of the present disclosure, the method specifically comprising:

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

[0058] Among them, the component configuration information includes the corresponding relationship 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 there is an execution order relationship between different scenario running nodes.

[0059] In the embodiment of the present disclosure, before loading the component, a configuration file is pulled from the configuration platform in advance; wherein 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, wherein the correspondence is used to characterize loading the component corresponding to the business scenario in the corresponding business scenario.

[0060] In the embodiment of the present disclosure, when a component loading request for a target scene is received, component configuration information corresponding to the target scene is first obtained from a configuration file. The component configuration information corresponding to the target scene includes a correspondence between a first component corresponding to the target scene and a scene running node, and the correspondence is used to indicate that the corresponding first component is loaded at the scene running 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 a corresponding relationship 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 whose loading order does not need to be adjusted 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 may be set for different first components corresponding to the same scenario running 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 running node may 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 running node are set to 10 and 9 respectively, component 1 with a priority of 10 is 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 corresponding relationship between the first components and the component groups is configured in the component configuration information, and the corresponding relationship is determined based on the rendering timing characteristics of the first components. 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 corresponding to the component groups, the first components corresponding to the same component group can be loaded in a sequentially adjacent order. For example, component 3 and component 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 component 3 and component 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 time of the first components corresponding to the same component group is not much different, the corresponding component group can be determined based on the rendering timing characteristics of the first components. Optionally, the same component group can be used to correspond to different first components that need to be rendered in the same frame, so that different first components that need to be rendered in the same frame can be displayed on the page at the same time for the user's vision, thereby improving the user experience.

[0069] The present disclosure provides a schematic diagram of a storage structure of a component configuration file. Figure 2 , wherein the component configuration file is divided into a four-level structure, and the first-level structure 201 corresponds to business scenarios, 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 four-level structure component configuration file can be used to configure the loading order of components in different business scenarios.

[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 running node under the target scenario, loading a first component corresponding to the first scenario running 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 implementation, 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, which 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 by the embodiment of the present disclosure, the corresponding relationship between the first component and the scene running node is configured using the component configuration information to realize configurable loading of the component loading order. Since the adjustment of the component loading order can be realized 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 facilitates the adjustment of the component loading order, etc.

[0078] In actual applications, after entering the first scene running node, not only the first component corresponding to the first scene running node is loaded based on the component configuration information, but also the second component corresponding to the first scene 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 component 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 manner, 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 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, according to 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; then, the second component corresponding to the first scene running node is loaded.

[0082] Wherein, determining the 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 includes:

[0083] The other components among the 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 an optional implementation, the loading order priority of the first component corresponding to the first scenario running node configured in the component configuration information is higher than the second component corresponding to the first scenario running node. That is, after entering the first scenario running node, the first component corresponding to the first scenario running node is loaded first, and then the second component corresponding to the first scenario running node is loaded.

[0085] In another optional implementation, when the first scenario running 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 corresponding relationship, and then the second component corresponding to the first scenario running node is loaded based on the loading order among the multiple second components. That is, the components that do not belong to the component configuration information are loaded according to the component loading order in the original component corresponding relationship.

[0086] In an optional implementation, component loading can be implemented using a queue. 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 a 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] In order to facilitate understanding of this solution, the present disclosure provides a schematic diagram of the effect of a component loading method, such as Figure 3 The original corresponding relationship of the components corresponding to the target scene includes the original corresponding 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, such as Figure 3 The component configuration information shown 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 embodiment of the present disclosure, based on the component configuration information of the target scene and the original correspondence relationship of the components, the loading order information of each component is determined, which may include: the correspondence between the scene running node p0 and the components D, B and C, and the components D and B are loaded before the component C. The correspondence between other scene running 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 (i.e., the second component) that are not configured in the component configuration information unchanged. For example, for component C, the original loading order is in a corresponding relationship with 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 components is determined based on the component configuration information configured for the business scenario and the original correspondence of the components. The component loading order in the original correspondence can be adjusted by configuring the component configuration information, thereby realizing configurable loading of the component loading order. Since the adjustment of the loading order of components, etc. can be achieved 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 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 the differential component configuration file from the configuration platform, the differential component configuration file can be used to update the full component configuration file of the client. The full component configuration file and the differential component configuration file can store the configuration information of the component based on the same storage structure, and the storage structure can be the above Figure 2 The storage structure of the four-level structure is shown.

[0095] In an optional implementation, editing operation information may be set for the first component to be updated in the differential component configuration file, and 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 may be edited based on the editing operation information of the target component in the differential component configuration file. The editing operation information may include adding operations, deleting operations, modifying operations, etc. for 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, etc. 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 edit object, and inserting the configuration information for the target edit 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 edit object in the full component configuration file. replace is used to indicate the replacement of the configuration information for the target edit object in the full component configuration file with the configuration information for the target edit object in the differential component configuration file. clear is used to indicate the deletion of the configuration information for the target edit object in the full component configuration file. modify is used to indicate the modification of the configuration information for the target edit object in the full component configuration file.

[0098] In the disclosed embodiment, 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 also provides a component loading device, referring to Figure 4 , is a schematic diagram of a component loading device provided in an embodiment of the present disclosure, the device comprising:

[0100] The first acquisition module 401 is used to respond to a component loading request for a target scene and 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 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;

[0101] The first loading module 402 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.

[0102] In an optional implementation, 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 determination submodule, 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 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;

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

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

[0109] A third determination submodule is used to determine the loading order among the plurality of second components based on the component loading order in the original corresponding relationship of the components when the first scenario running node corresponds to a plurality of the second 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 manner, the first loading module includes:

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

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

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

[0115] In an optional implementation, 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 manner, the first loading module includes:

[0118] A fifth determination submodule, used to determine whether the component loading timing is currently met after entering the first scene running node under the target scene;

[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 implementation manner, 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 a rendering timing feature of the first component; the first loading module includes:

[0121] A sixth determination submodule, configured to determine, after entering the first scenario running node under the target scenario, 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 implementation, 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 manner, 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, so as to obtain updated configuration information of the target component;

[0128] The seventh determination submodule is used to determine the 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 without adjusting the application code, the component loading method provided by the embodiment of the present disclosure facilitates the adjustment of 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, in which instructions are stored. 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 present disclosure also provides a component loading device, see Figure 5 As shown, this may include:

[0133] Processor 501, memory 502, input device 503 and output device 504. The number of processors 501 in the component loading device can be one or more. Figure 5 In some embodiments of the present disclosure, the processor 501, the memory 502, the input device 503 and the output device 504 may be connected via a bus or other means, wherein: Figure 5 The example of connecting through bus is taken in the following.

[0134] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing of the component loading device by running the software programs and modules stored in the memory 502. The memory 502 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory 502 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. The input device 503 can 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 article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0137] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be 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 will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A component loading method, characterized in that: The method comprises: 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, characterized in that After entering the first scenario running node, the method further includes: 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, characterized in that 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 includes: Based on the original correspondence 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, characterized in that The loading of the second component corresponding to the first scenario running node includes: 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, characterized in that The loading of the first component corresponding to the first scenario running node based on the component configuration information includes: 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, characterized in that: 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, characterized in that: The method further comprises: 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, characterized in that 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, 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, characterized in that: The component configuration information also 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; 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 scenario running node under the target scenario, determining the component group corresponding to the first scenario running node based on the component configuration information; The first component corresponding to the component group is loaded.

10. The method according to claim 1, characterized in that 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 includes: 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, characterized in that The differential component configuration file includes editing operation information for the target component, and the method of updating the full component configuration file using the differential component configuration file to obtain an updated component configuration file includes: 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, characterized in that: The device comprises: 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, characterized in that: The computer-readable storage medium stores instructions, 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, characterized in that: include: 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.