Component loading method, user equipment and computer readable storage medium

By analyzing the correspondence between functions and components, dynamically adjusting the component loading order and delay, the problem of poor flexibility caused by solidification of component loading strategies in code logic is solved, and the flexibility and fluency of component loading is improved.

CN120508332APending Publication Date: 2025-08-19BYTEDANCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510641728.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

In the prior art, component loading strategies are solidified in code logic, resulting in poor component loading flexibility and the loading order cannot be adjusted without modifying the code logic or updating the version.

Method used

By receiving the correspondence between functions and components, analyzing the function loading configuration information, dynamically adjusting the loading order and delay of components, and establishing a flexible component loading framework.

Benefits of technology

Improves the flexibility and fluency of component loading, reduces the verification cost and time cost of loading strategies, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508332A_ABST
    Figure CN120508332A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, in particular to a component loading method, user equipment and a computer readable storage medium. The component loading method comprises the following steps: receiving first configuration information, wherein the first configuration information comprises a loading time sequence of a function to be loaded; second configuration information is determined according to the corresponding relation between the function and the component and the first configuration information, and the second configuration information comprises the loading time sequence of the component corresponding to the function; and loading the component according to the second configuration information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a component loading method, user equipment, a computer-readable storage medium, and a computer program product. Background Art

[0002] With the development of technology, users have increasingly higher requirements for smooth loading when using devices such as mobile phones and computers. Especially in video playback scenarios such as live broadcasts, the loading speed of video content has a significant impact on the user experience. To improve loading speed, different loading strategies may be required in different situations.

[0003] However, in the related art, during the component loading process, the component loading strategy is usually solidified in the code logic. Whenever the component loading order needs to be adjusted, the code logic needs to be modified and the version updated, resulting in poor flexibility in component loading. Summary of the Invention

[0004] In view of this, the embodiments of the present disclosure provide a component loading method, a user device, a computer-readable storage medium, and a computer program product, which can allow the user device to parse the received function loading configuration information through the correspondence between functions and components, thereby obtaining specific component loading configuration information, and loading according to the component loading configuration information.

[0005] When receiving different function loading configuration information, the corresponding component loading configuration information can be determined by parsing the function loading configuration information, so as to directly adjust the loading order of the components without modifying the code logic or updating the version, thereby improving the flexibility of component loading.

[0006] According to some embodiments of the present disclosure, a component loading method is provided, including: receiving first configuration information, the first configuration information including a loading timing of a function to be loaded; determining second configuration information based on a correspondence between a function and a component and the first configuration information, wherein the second configuration information includes a loading timing of a component corresponding to the function; and loading the component based on the second configuration information.

[0007] According to other embodiments of the present disclosure, a user device is provided, including: a receiving module configured to receive first configuration information, wherein the first configuration information includes a loading timing of a function to be loaded; a determining module configured to determine second configuration information based on a correspondence between functions and components and the first configuration information, wherein the second configuration information includes a loading timing of a component corresponding to the function; and a loading module configured to load the component according to the second configuration information.

[0008] According to some further embodiments of the present disclosure, a user device is provided, comprising: at least one memory; and at least one processor coupled to the memory, wherein the at least one processor is configured to execute the component loading method of any embodiment described in the present disclosure based on instructions stored in the memory.

[0009] According to some further embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the component loading method of any embodiment described in the present disclosure is performed.

[0010] According to some further embodiments of the present disclosure, a computer program product is provided. When the computer program product is run on a computer, the computer is enabled to implement the component loading method according to any one of the embodiments described in the present disclosure.

[0011] Other features, aspects and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The following describes embodiments of the present disclosure with reference to the accompanying drawings. It should be understood that the drawings described below only relate to some embodiments of the present disclosure and do not constitute a limitation to the present disclosure. In the accompanying drawings:

[0013] Figure 1 A flowchart showing a component loading method according to some embodiments of the present disclosure is shown;

[0014] Figure 2 is a flowchart illustrating determining second configuration information according to some embodiments of the present disclosure;

[0015] Figure 3 is a flowchart illustrating component loading according to some embodiments of the present disclosure;

[0016] Figure 4 is a flowchart illustrating a component loading method according to other embodiments of the present disclosure;

[0017] Figure 5 is a schematic diagram illustrating component loading according to some embodiments of the present disclosure;

[0018] Figure 6 is a schematic diagram illustrating loading a live broadcast component according to some embodiments of the present disclosure;

[0019] Figure 7 A block diagram illustrating a user equipment according to some embodiments of the present disclosure;

[0020] Figure 8 A block diagram illustrating a user equipment according to some other embodiments of the present disclosure;

[0021] Figure 9 A block diagram of an electronic device according to some embodiments of the present disclosure is shown.

[0022] It should be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not necessarily drawn to scale. The same or similar reference numerals are used throughout the drawings to indicate the same or similar parts. Therefore, once an item is defined in one drawing, it may not be discussed further in subsequent drawings. DETAILED DESCRIPTION

[0023] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. It should be understood that the present disclosure can be implemented in various forms and should not be interpreted as being limited to the embodiments described herein.

[0024] It should be understood that the various steps described in the method embodiments of the present disclosure can be performed in different orders and / or performed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect. Unless otherwise specifically stated, the relative arrangement and numerical values of the components and steps set forth in these embodiments should be interpreted as being merely exemplary and do not limit the scope of the present disclosure.

[0025] The term “including” and its variations used in the present disclosure are open terms that include at least the following elements / features but do not exclude other elements / features, that is, “including but not limited to.” The term “based on” means “at least in part based on.”

[0026] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules, or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules, or units. Unless otherwise specified, concepts such as "first" and "second" are not intended to imply that the objects described in such a manner must be in a given order in time, space, ranking, or any other manner.

[0027] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0029] The following detailed description of the embodiments of the present disclosure is provided in conjunction with the accompanying drawings, but the present disclosure is not limited to these specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. In addition, in one or more embodiments, specific features, structures, or characteristics may be combined in any suitable manner that will be apparent to those skilled in the art from this disclosure.

[0030] In related technologies, during the component loading process, the component loading strategy is usually solidified in the code logic. Whenever a different loading strategy is needed for loading, the code logic needs to be modified and the version updated, resulting in poor flexibility in component loading.

[0031] In order to improve the flexibility of component loading, the embodiment of the present disclosure provides a new component loading method, which can allow the user device to parse the received function loading configuration information through the correspondence between functions and components, thereby obtaining specific component loading configuration information and loading according to the component loading configuration information.

[0032] Figure 1 A flowchart of a component loading method according to some embodiments of the present disclosure is shown.

[0033] like Figure 1 As shown, the component loading method includes: step S1, receiving first configuration information, the first configuration information including the loading timing of the function to be loaded; step S3, determining second configuration information based on the correspondence between the function and the component and the first configuration information, wherein the second configuration information includes the loading timing of the component corresponding to the function; step S5, loading the component according to the second configuration information.

[0034] The above-mentioned component loading method can be executed by user devices such as mobile phones and computers, and is used for component loading in video playback scenarios such as live broadcasting.

[0035] The first configuration information may be generated by the cloud or server and sent to the user device. The first configuration information may include the loading sequence of the functions to be loaded, such as the order in which the functions are loaded and / or the batch in which the functions are loaded. The first configuration information may only include relatively general information related to the functions, without including detailed loading information related to the components.

[0036] The second configuration information may be obtained by parsing the first configuration information by the user device based on the correspondence between functions and components. The second configuration information may include the loading sequence of components corresponding to the functions in the first configuration information, such as the component loading order and / or component loading batch. After receiving the relatively rough first configuration information, the user device may parse the first configuration information based on the correspondence to obtain detailed component loading configuration information.

[0037] The correspondence between the functions and components can be stored in the code logic of the user device, so that the second configuration information obtained by parsing is in the form of code logic and can be directly used by the user device to load the component. For example, the correspondence between the functions and components can be stored in the code logic in the form of a function-component mapping table.

[0038] The above-mentioned component loading method can allow the user equipment to parse the received function loading configuration information through the correspondence between functions and components, thereby obtaining specific component loading configuration information and loading according to the component loading configuration information.

[0039] By establishing the above-mentioned basic framework that can support dynamic component loading and configuration, for example, when testing is required or a change in the business scenario of the user device is detected, the cloud can generate different first configuration information. When the user device receives the different first configuration information, it can obtain the corresponding second configuration information through parsing, thereby adjusting the loading order of the components without modifying the code logic or updating the version, thereby improving the flexibility of component loading.

[0040] Combined with the above Figure 1 The component loading method according to some embodiments of the present disclosure is introduced. Figure 2 The following describes how to determine the second configuration information when the loading sequence of the function includes a loading batch of the function.

[0041] Figure 2 FIG. 1 is a flowchart illustrating determining the second configuration information according to some embodiments of the present disclosure. Figure 2 As shown, step S3, determining the second configuration information according to the correspondence between functions and components and the first configuration information may include: step S31, for each loading batch, determining the components corresponding to the functions in the loading batch according to the correspondence between functions and components; step S32, determining the loading timing of the components corresponding to the functions in the loading batch according to the loading priority of the components; step S33, determining the loading timing of all components corresponding to the functions to be loaded according to the loading batch of the functions and the loading timing of the components corresponding to the functions in each loading batch.

[0042] The first configuration information in the above component loading method limits the loading sequence of functions by dividing them into loading batches. For example, if the functions to be loaded include five functions, A to E, they can be divided into three loading batches. The first configuration information can indicate that function A belongs to the first loading batch, functions B and C belong to the second loading batch, and functions D and E belong to the third loading batch. The above loading batches are loaded sequentially during the loading process, that is, function A is loaded first, then functions B and C, and finally functions D and E.

[0043] In some embodiments, the first configuration information is dynamically changed and determined according to at least one of a business scenario and a test requirement.

[0044] The cloud or server side may, for example, generate different first configuration information in different scenarios and send the information to the user device.

[0045] Taking component loading during live streaming as an example, different business scenarios refer to different ways users enter the live studio. For example, users can enter the studio from the preview interface in the video stream, or by triggering the live broadcast control in the display interface. In these different scenarios, by sending different first configuration information for user devices to parse, the corresponding loading strategy can be flexibly applied, thereby improving loading smoothness and enhancing the user experience.

[0046] Furthermore, to explore the impact of different loading strategies on loading speed, user experience, and other aspects, the cloud typically needs to test multiple different loading strategies. In the component loading method disclosed herein, the cloud can perform testing by generating different first configuration information and sending it to the user device, instructing the user device to load components in different orders. During this testing process, there's no need to modify code logic or update versions, reducing the cost of verifying the loading strategy.

[0047] In step S31 , after receiving the first configuration information, the user equipment may respectively determine the components corresponding to the functions in each loading batch.

[0048] Continuing with the example where the functions to be loaded include five functions, A to E, each loading batch can be considered separately. For example, for a first loading batch including function A, the component corresponding to the function in the first loading batch can be determined to be component a1 for implementing function A. For another example, for a second loading batch including functions B and C, the components corresponding to the functions in the second loading batch can be determined to be component b1 for implementing function B and components c1 and c2 for implementing function C.

[0049] In addition to determining the components required to implement a function, the above method can also determine the corresponding relationship between components and loading batches. For example, component a1 belongs to the first loading batch of components, components b1, c1, and c2 belong to the second loading batch of components, and components d1, e1, and e2 belong to the third loading batch of components. This correspondence ensures that the loading batch of components in the parsed second configuration information corresponds to the loading batch of the function in the first configuration information.

[0050] In step S32, after determining the components corresponding to the functions in each loading batch, the loading sequence of the components in the loading batch may be determined according to the loading priorities of the components stored in the user device.

[0051] After determining that components b1, c1, and c2 belong to the second loading batch, the loading sequence of the components in the second loading batch can be determined based on their loading priorities. For example, if component c2 has the highest priority and component b1 has the lowest priority, the loading sequence of the components in the second loading batch can be determined as: component c2, component c1, component b1. Similarly, the loading sequence of the components in the third loading batch can be determined as: component e1, component d1, component e2.

[0052] The loading priority of the components may be stored in the user device in the form of a component loading sequence table. After the components corresponding to the functions of each batch are determined, the loading sequence of these components in the loading batch may be determined according to the loading sequence table.

[0053] In step S33 , the loading sequence of all components may be determined according to the loading batches of functions and the loading sequence of components corresponding to the functions in each loading batch.

[0054] After determining the loading sequence of components in each loading batch, the loading sequence of components in different loading batches can be combined to determine the loading sequence of all components used to implement the functions to be loaded. The loading sequence will be included in the second configuration information and used by the user device for subsequent component loading.

[0055] In the above example, the loading sequence of components in the three loading batches can be combined to determine the loading sequence of all components to realize functions A to E, for example: component a1 of the first loading batch, component c2, component c1, component b1 of the second loading batch, and component e1, component d1, component e2 of the third loading batch.

[0056] In the above process of determining the loading sequence of all components, the loading batch can be set to take precedence over the priority of the component itself. Even if component c2 has a higher priority than component a1 in the above component loading sequence table, component a1 of the first loading batch will still be loaded first, and then component c2 of the second loading batch will be loaded.

[0057] In some embodiments, the second configuration information corresponds to the first configuration information one-to-one. In other words, each first configuration information will correspond to a second configuration information, and after receiving different first configuration information, the user device will also parse different second configuration information. For example, if the loading batch of functions in the first configuration information changes, the loading sequence of components in the second configuration information will also change accordingly to meet the scenario or test requirements.

[0058] Combined with the above Figure 2 This article describes how to determine the component loading sequence based on function loading batches. With this setup, the cloud or server only needs to generate and distribute a rough function loading configuration that only includes the loading batches. After receiving the function loading configuration, the user device can determine the detailed component loading configuration by parsing the correspondence between functions and components and combining component priorities. When receiving a different loading configuration, the new component loading configuration can be used to load components without modifying code logic or updating versions, reducing time costs and increasing component loading flexibility.

[0059] In some embodiments, in addition to the loading batches of functions, the first configuration information may also include the delay interval between loading batches of the functions to be loaded. This delay interval can be understood as the time interval between the start of loading of different loading batches. Correspondingly, the second configuration information obtained by parsing the first configuration information may also include the loading delay of the components corresponding to the functions to be loaded. This loading delay can be understood as the time required to load each component.

[0060] In the above embodiment, step S3, determining the second configuration information based on the correspondence between functions and components and the first configuration information also includes: for each loading batch, determining the loading delay of the components corresponding to the functions in the loading batch based on the delay interval between the loading batch and the next loading batch.

[0061] As described above, for each loading batch, the time delay between the first loading batch and the next loading batch can refer to the time interval between the start of the first loading batch and the start of the next loading batch. In other words, a certain time after a loading batch begins loading, the next loading batch will begin loading. Therefore, in order to avoid overloading or blocking caused by loading multiple loading batches at the same time, it is necessary to complete the loading of the loading batch within the time delay interval.

[0062] After receiving the delay interval, the user device can adjust the loading delays of the components in the loading batch so that the sum of the loading delays of the components in the loading batch is less than or equal to the delay interval. In other words, the user device can adjust the time required to load each component so that the sum of the time required to load all components in the loading batch is less than or equal to the delay interval. This allows the loading of the loading batch to be completed before the next loading batch begins.

[0063] For example, the first configuration information sent from the cloud may include a delay interval of 30 seconds between the first loading batch and the second loading batch. After receiving the first configuration information, the user device can first determine the components corresponding to the functions in the first loading batch. For example, if the first loading batch includes function A, the corresponding components are components a1, a2, and a3. Based on the delay interval in the first configuration information, the user device can determine that the total time for loading components a1, a2, and a3 is 30 seconds, and then specifically determine that the loading delay of component a1 is 5 seconds, the loading delay of component a2 is 15 seconds, and the loading delay of component a3 is 10 seconds.

[0064] By including the above-mentioned delay interval in the first configuration information, the cloud can control the loading delay of each component of the user device, thereby adjusting the speed of the loading process. Compared with using a fixed loading delay, the above-mentioned scheme of the present disclosure improves the flexibility of the loading process.

[0065] Furthermore, determining the loading delay of the component corresponding to the function in the loading batch based on the delay interval between the loading batch and the next loading batch may include: determining the loading delay based on the delay interval and the status of the user device, wherein the status of the user device includes at least one of resource usage status and network status.

[0066] In addition to the cloud adjusting the loading delay of components by sending delay intervals, the user device can also make adjustments based on its own status when determining the loading delay. In the above example, when the user device determines that the total time to load components a1, a2, and a3 is 30 seconds, it can specifically determine the loading delay of each component based on its own resource usage. For example, when memory resources are low, the loading delay of components loaded using memory can be increased, and the loading delay of other components can be reduced. For another example, when processor resources are high, the loading delay of components loaded using the processor can be reduced, and the loading delay of other components can be increased.

[0067] Based on the aforementioned basic framework, the above configuration is expanded to enable user devices to autonomously adjust the loading delay. User devices can dynamically schedule the loading delay of components based on the current performance status, further improving the flexibility of the loading process.

[0068] It can be seen that the above-mentioned basic framework proposed in the present disclosure has high scalability. Through different parsing settings, the user device can achieve different purposes without changing the code logic.

[0069] The above describes how to determine the loading delay of a component based on the delay interval in the first configuration information when the first configuration information includes a loading batch. Figure 3 This section describes how to load components based on the second configuration information after determining the second configuration information.

[0070] Figure 3 FIG. 1 is a flowchart illustrating component loading according to some embodiments of the present disclosure. Figure 3 As shown, step S5, loading the component according to the second configuration information may include: step S51A, according to the second configuration information, respectively encapsulating the loading of the components corresponding to the functions in each loading batch into loading tasks; step S52A, generating a task queue according to the loading tasks corresponding to each loading batch; step S53A, loading the component according to the task queue.

[0071] In step S51A, the components of each loading batch are respectively packaged into loading tasks according to the loading sequence and loading delay indicated in the second configuration information.

[0072] Each load batch corresponds to a separate load task. When the load task is executed, the components are loaded according to the specified load sequence and load delay. The user device can load components according to the specified load delay by allocating processor and memory resources.

[0073] For example, for a certain component, when the determined loading delay is 5 seconds, it is necessary to complete the loading within 5 seconds by using 30% of the processor resources, and when the determined loading delay is 3 seconds, it is necessary to complete the loading within 3 seconds by using 50% of the processor resources.

[0074] In step S52A, the loading tasks may be arranged in the order of loading batches to generate a task queue.

[0075] In addition, when the first configuration information includes a delay interval, in order to ensure that the loading process complies with the requirements of the first configuration information, in the process of generating the task queue, the interval between the start time of each loading task in the task queue can be set to correspond to the delay interval between the loading batches.

[0076] In step S53A, the component loading tasks may be executed sequentially according to the task queue.

[0077] During the loading process of the task queue, other operations can be inserted between different loading tasks based on the individual settings of the loading tasks. For example, if the loading task corresponding to the first loading batch is completed ahead of schedule, other operations can be performed until a preset interval has passed, and then the loading task corresponding to the second loading batch can be started.

[0078] Compared with the related art in which all components are loaded at once, the above steps of the present disclosure improve resource utilization and flexibility and component loading performance by setting loading tasks separately.

[0079] In addition to including the delay intervals between different loading batches, the first configuration information may also include a first identifier corresponding to each loading batch, the first identifier indicating whether the loading batch supports loading before the specified interface is completed. Figure 4 Describes how to load components based on the first identifier.

[0080] Figure 4 1 is a flow chart showing a component loading method according to other embodiments of the present disclosure. Figure 4 As shown, in Figure 1 On the basis of, the component loading method also includes: step S4, according to the loading batch of the function and the first identifier corresponding to each loading batch, dividing all the components into a first component set loaded before the specified interface is completed and a second component set loaded after the specified interface is completed.

[0081] The loading of user equipment is usually not carried out alone, but together with other processes. For example, during the loading process, some components may need to call the parameters of other interfaces successfully before they can be loaded. Therefore, the corresponding identifier can be additionally carried in the first configuration information to indicate whether each loading batch supports loading before the specified interface is completed, so as to distinguish them during subsequent loading.

[0082] Based on the above identification, starting from the first loading batch, whether loading before the specified interface is supported can be confirmed in sequence until a loading batch does not support loading before the specified interface. At this time, the components corresponding to the loading batch before the loading batch can be determined as the first component set, and the components corresponding to the loading batch and the loading batch after the loading batch can be determined as the second component set.

[0083] Taking the loading of components when watching live broadcasts as an example, the designated interface is, for example, the interface for entering the live broadcast room. Components such as the interface layout of the live broadcast room can be loaded before the callback of the interface for entering the room, while components such as room data and the audio and video stream of the live broadcast can only be loaded after the callback of the interface for entering the room.

[0084] The first loading configuration may include, for example, five loading batches, wherein the first identifiers corresponding to the first loading batch, the second loading batch, and the fourth loading batch indicate that these loading batches support loading before the room entry interface is called back, while the first identifiers corresponding to the third loading batch and the fifth loading batch indicate that these loading batches do not support loading before the room entry interface is called back.

[0085] In the above situation, the judgment can be made starting from the first loading batch until the third loading batch does not support loading before the room entry interface callback. Although the fourth loading batch supports loading before the room entry interface callback, since the fourth loading batch needs to be loaded after the third loading batch, and the third loading batch does not support loading before the room entry interface callback. Therefore, the components corresponding to the first loading batch and the second loading batch can be determined as the first component set loaded before the room entry interface callback, and the components corresponding to the third to fifth loading batches can be determined as the second component set loaded after the room entry interface callback.

[0086] Compared with the related art of setting fixed loading batches before and after the completion of the specified interface, in the above-mentioned embodiment of the present disclosure, the number of loading batches before and after the completion of the specified interface can be flexibly set, and it is possible to distinguish whether each component is loaded before the completion of the specified interface, so as to subsequently load these components, thereby improving the flexibility of the loading process.

[0087] Figure 5 is a schematic diagram illustrating component loading according to some embodiments of the present disclosure. Figure 5 As shown, after determining the first component set and the second component set, loading the components according to the second configuration information may include: step S51B, sending a call request to the specified interface; step S52B, loading the first component set according to the second configuration information; step S53B, in response to receiving a response to the call request, determining whether the first component set has been loaded; step S54B, in the case that the first component set has been loaded, loading the second component set according to the second configuration information; step S55B, in the case that the first component set has not been loaded, waiting for the first component set to be loaded before loading the second component set.

[0088] In step S51B, for subsequent use, a call request to a designated interface may be sent so that the corresponding component can be loaded after receiving a reply.

[0089] In step S52B, since the first component set can be loaded before the specified interface is completed, the first component set can be loaded directly according to the second configuration information. After the first component set is loaded, if no response to the call request is received, it can be placed in a waiting state or other operations can be performed asynchronously.

[0090] like Figure 5 As shown, steps S51B and S52B can be performed asynchronously. In other words, there is no dependency between loading the first component set and sending the call request of the specified interface. The first component set can be loaded in advance without waiting for the specified interface to complete, which improves loading efficiency, reduces resource consumption of loading after the specified interface is completed, and makes the loading process more balanced.

[0091] In step S53B, after receiving the response to the call request, that is, after the specified interface is completed, it can be determined whether the first component set is loaded.

[0092] When the first component set is loaded, step S54B is executed to load the second component set according to the second configuration information.

[0093] If the first component set is not loaded completely, step S55B is executed to wait for the first configuration information to be loaded completely before loading the second component set.

[0094] The above process sets the component loading before the completion of the specified interface and the sending of the call request of the specified interface as two branches of asynchronous execution, so that the loading of the first component set does not need to wait for the feedback of the specified interface, thereby improving the smoothness and flexibility of loading.

[0095] Combined with the above Figure 4 and Figure 5 This article introduces how to load components when the first configuration information also includes a first identifier indicating whether each loading batch supports loading before the specified interface is completed.

[0096] In addition to the first identifier, the first configuration information may also include a second identifier corresponding to each loading batch, wherein the second identifier indicates whether the functions in the loading batch are displayed simultaneously. Figure 3 In step S32, how to determine the loading sequence of the components corresponding to the functions in the loading batch according to the second identifier and the loading priority of the component.

[0097] Taking component loading when watching live broadcast as an example, for example, the first loading batch includes multiple functions to be loaded, such as displaying the anchor's avatar and displaying the live broadcast name. The second identifier corresponding to the first loading batch can be used to indicate that these functions need to be displayed at the same time, thereby avoiding a decline in user experience due to the fact that functions with higher relevance are not displayed at the same time.

[0098] In the above embodiment, the second identifier can further control the loading process by indicating whether the functions in the loading batch are displayed simultaneously. Based on the second identifier, determining the loading sequence of the components corresponding to the functions in the loading batch according to the loading priority of the components includes: for each loading batch, determining whether the loading sequence of the components corresponding to the functions in the loading batch is parallel loading according to the second identifier corresponding to the loading batch; in response to the loading sequence of the components corresponding to the functions in the loading batch not being parallel loading, determining the loading sequence of the components corresponding to the functions in the loading batch according to the loading priority of the components.

[0099] In other words, for each loading batch, when determining the loading sequence of components, the second identifier can be used to first determine whether the components in the loading batch need to be loaded simultaneously. If simultaneous loading is not required, the loading sequence of the components can be determined based on the loading priorities described above.

[0100] For example, if the user device has sufficient resources, in order to avoid the waiting caused by loading components one by one, the components in the loading batch can be loaded in parallel and displayed on the screen at the same time, thereby increasing the loading speed and improving the user experience. For another example, if the real-time performance requirements of the components in the loading batch are high, in order to display these components simultaneously, the components in the loading batch can be loaded in parallel.

[0101] Through the above settings, it can be ensured that the components that need to be displayed on the screen at the same time during the loading process can be loaded at the same time, thereby improving the user experience.

[0102] Combined with the above Figures 1 to 5 The component loading method proposed in this disclosure is described. Figure 6 , which introduces the component loading method in the live broadcast scenario.

[0103] Figure 6 Schematic diagram showing the loading of live broadcast components according to some embodiments of the present disclosure. Figure 6 As shown, the method for loading the live broadcast component may include steps 601 to 624.

[0104] In steps 601 to 605 , in response to the user device starting the application, the component loading configuration, ie, the second configuration information, may be parsed.

[0105] Specifically, in step 601, the function loading configuration sent by the cloud, that is, the first configuration information, is received. As mentioned above, the first configuration information can be generated by the cloud based on at least one of the business scenario and the test requirement. Step 601 corresponds to Figure 1 Step S1 in .

[0106] In step 602, the function loading configuration is parsed according to the function mapping table. The function mapping table is the correspondence between functions and components and can be stored locally on the user device so that the user device can parse the function loading configuration.

[0107] In step 603, it is determined whether the above analysis is successful.

[0108] If the parsing is successful, go directly to step 604 to generate a component loading configuration that is globally unique to the function loading configuration. This component loading configuration can be used to load live components when entering each live broadcast room. Step 602 corresponds to step 604. Figure 1 Step S3 in .

[0109] In the case of parsing failure, the process proceeds to step 605 , where a backup configuration stored locally on the user device is loaded, and a component loading configuration is generated using the backup configuration, and the process proceeds to step 604 .

[0110] from Figure 6 As can be seen in the figure, the process of parsing the component loading configuration and the process of loading the component can be performed asynchronously. In other words, even if the user does not want to enter the live broadcast room, the component loading configuration can be parsed after the application is started, without having to wait for the user to issue the instruction to enter the live broadcast room before parsing the component loading configuration, thus shortening the component loading time.

[0111] In steps 606 to 624, the live broadcast component can be loaded, corresponding to Figure 1 Step S5 in .

[0112] In step 606, when the user issues an instruction to enter the live broadcast room, as mentioned above, the process can be divided into two branches: steps 607 to 613 and steps 614 to 624, depending on whether the component is loaded before the live broadcast room entry interface is called back. Figure 6 As shown, these two branches can also be performed asynchronously.

[0113] In step 607, since the process of parsing the component loading configuration and the process of loading the component are performed asynchronously, when loading the component, it is necessary to first determine whether the loading configuration has been parsed. If the parsing is not complete, wait until steps 601 to 605 are completed before performing subsequent loading.

[0114] When the parsing is complete, the process proceeds to step 608 , in which it is determined whether it is necessary to load the component before the room entry interface callback according to the relevant identifier in the configuration information.

[0115] If loading is not required, the process proceeds to step 609, where the user device is placed in a waiting state, waiting for the room entry interface to be called back. After the user device is placed in the waiting state, other operations other than component loading can be performed, thereby improving resource utilization and loading fluency.

[0116] If loading is required, the process proceeds to step 610 to load the components in the first loading batch by reading the obtained component loading configuration.

[0117] In step 611, after the components in the first loading batch are loaded, it can be determined whether the components in the next loading batch need to be loaded before the room entry interface callback.

[0118] If loading is required, the process proceeds to step 612 to sequentially load the components in the next loading batch until the components required before the room entry interface callback are loaded. The process proceeds to step 613 to enter a waiting state and wait for the room entry interface callback.

[0119] If loading is not required, the process may directly proceed to step 613 and wait for the room entry interface to be called back.

[0120] Through the above steps 607 to 613, the component loading before the room entry interface callback can be completed, the loading efficiency is improved, and thus the user experience is improved. The following describes how to load the component after the room entry interface callback in another process branch 614 to 624.

[0121] In step 614, a request to call the room entry interface may be sent.

[0122] In step 615, it can be determined that the room entry interface request is completed, that is, the room entry interface callback is received.

[0123] In step 616, since the process of loading components before the room entry interface callback and the process of loading components after the room entry interface callback are performed asynchronously, when loading components, it is necessary to first determine whether the components need to be loaded before the room entry interface callback based on the relevant identifier in the configuration information.

[0124] If loading is required, the process proceeds to step 617 to determine whether the components that need to be loaded before the room entry interface callback are completed.

[0125] If the loading is not completed, the process proceeds to step 618 and enters a waiting state, waiting for the components that need to be loaded before the room entry interface callback to be loaded to be completed.

[0126] Step 612 will also monitor the waiting state of step 618. When it is detected that the user device enters the waiting state of step 618 and the components that need to be loaded before the room entry interface callback in step 612 are loaded, step 619 can be entered to send a notification that the components that need to be loaded before the room entry interface callback are loaded.

[0127] Returning to step 617, when loading is complete, proceed to step 620 to start loading the first batch of components after the room entry interface callback.

[0128] In step 621, after the first batch of components is loaded after the room entry interface is called back, the next batch of components can be loaded in sequence until the live broadcast component is loaded, and then step 622 is entered to complete the loading of the live broadcast component.

[0129] Returning to step 616 , if loading is not required, proceed to step 623 to start loading the components of the first loading batch.

[0130] In step 624 , after the components in the first loading batch are loaded, the components in the next loading batch are loaded in sequence until the live broadcast component is loaded, and then step 622 is entered.

[0131] Combined with the above Figure 6 , introduces a component loading method for live broadcast scenarios. The above component loading method allows the user device to parse different received function loading configuration information based on the correspondence between functions and components, thereby obtaining the corresponding component loading configuration information and loading the component according to the component loading configuration information.

[0132] For example, when testing is required or a change in the business scenario of the user device is detected, the cloud can generate different first configuration information. When the user device receives the different first configuration information, it can obtain the corresponding second configuration information through parsing, thereby adjusting the loading order of the components without modifying the code logic or updating the version.

[0133] The above is the component loading method provided by the embodiment of the present disclosure, which can improve the flexibility of component loading.

[0134] Reference below Figure 7 and Figure 8 A user device according to an embodiment of the present disclosure is described, which is used to execute any embodiment of the above-mentioned component loading method. Figure 7 A block diagram of a user equipment according to some embodiments of the present disclosure is shown.

[0135] like Figure 7As shown, the user device 7 includes: a receiving module 71, configured to receive first configuration information, wherein the first configuration information includes the loading timing of the function to be loaded; a determining module 72, configured to determine second configuration information based on the correspondence between the function and the component and the first configuration information, wherein the second configuration information includes the loading timing of the component corresponding to the function; and a loading module 73, configured to load the component according to the second configuration information.

[0136] The receiving module 71 of the user equipment 7 can be used to perform Figure 1 The determination module 72 of the user equipment 7 can be used to perform, for example, Figure 1 Step S3. The loading module 73 of the user device 7 can be used to perform Figure 1 Step S5.

[0137] The above-mentioned user equipment disclosed in the present invention can allow the user equipment to parse the received function loading configuration information through the correspondence between functions and components, obtain specific component loading configuration information and load according to the component loading configuration information, thereby improving the flexibility of component loading.

[0138] Figure 8 A block diagram of a user equipment according to some other embodiments of the present disclosure is shown.

[0139] like Figure 8 As shown, the user device 8 includes: at least one memory 81; and at least one processor 82 coupled to the at least one memory 81, and the at least one processor 82 is configured to execute the component loading method as described in any of the foregoing embodiments based on instructions stored in the at least one memory 81.

[0140] Memory 81 is used to store one or more computer-readable instructions. Memory 81 may include any combination of various forms of computer-readable storage media, such as volatile and / or non-volatile memory, including but not limited to random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), and flash memory. Memory 111 may store, for example, an operating system, applications, a boot loader, databases, and other programs, as well as various applications and data.

[0141] The processor 82 is used to run computer-readable instructions to implement the component loading method described in any of the above embodiments. The specific implementation of each step of the method can refer to the above embodiments, for example Figures 1 to 6 The steps in , which are repeated, are not repeated here.

[0142] The above-mentioned user equipment disclosed in the present invention can allow the user equipment to parse the received function loading configuration information through the correspondence between functions and components, obtain specific component loading configuration information and load according to the component loading configuration information, thereby improving the flexibility of component loading.

[0143] The processor 82 may be embodied as various processing devices, such as a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The central processing unit (CPU) may be of X86 or ARM architecture, etc.

[0144] The processor 82 and the memory 81 can communicate with each other directly or indirectly. For example, the processor 82 and the memory 81 can communicate via a network. The network can include a wireless network, a wired network, and / or any combination of wireless and wired networks. The processor 82 and the memory 81 can also communicate with each other via a system bus, which is not limited in this disclosure.

[0145] It should be noted that Figure 8 The components of the user device 8 shown are merely exemplary and non-limiting. The user device 8 may also have other components according to actual application requirements. The processor 82 may control other components in the user device 8 to perform desired functions.

[0146] The user equipment 8 may be implemented in software, firmware and / or hardware, and may be integrated into a device installed with relevant application programs.

[0147] Figure 9 A block diagram of an electronic device according to some embodiments of the present disclosure is shown.

[0148] Figure 9 The electronic device 9 shown may be a computer system with a dedicated hardware structure, which can execute corresponding functions when a relevant application program is installed.

[0149] Electronic devices include, but are not limited to, mobile terminals such as smartphones, laptops, personal digital assistants (PDAs), tablet personal computers (Tablet PCs), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable devices, etc., as well as fixed terminals such as digital televisions and desktop computers, etc.

[0150] like Figure 9As shown, the central processing unit (CPU) 91 executes various processes according to the program stored in the read-only memory (ROM) 92 or the program loaded from the storage unit 98 to the random access memory (RAM) 93. In the RAM 93, data required when the CPU 91 executes various processes is stored as needed. The central processing unit is merely an example, and it may also be other types of processors, such as the various processors described above. The ROM 92, RAM 93 and the storage unit 98 may be various forms of computer-readable storage media. It should be noted that although Figure 9 ROM 92, RAM 93 and storage section 98 are shown separately in FIG, but one or more of them may be combined or located in the same or different memory or storage modules.

[0151] The CPU 91, the ROM 92, and the RAM 93 are connected to one another via a bus 94. To the bus 94, an input / output interface 95 is also connected.

[0152] The following components are connected to the input / output interface 95: an input section 96 such as a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output section 97 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage section 98 including a hard disk, a magnetic tape, etc.; and a communication section 99 including a network interface card such as a LAN card, a modem, etc. The communication section 99 allows communication processing to be performed via a network such as the Internet. As will be readily understood, although Figure 9 Parts of the electronic device 9 are shown to communicate via a bus 94, but they may also communicate via a network or other means, wherein the network may include a wireless network, a wired network, and / or any combination of a wireless network and a wired network.

[0153] A drive 910 is also connected to the input / output interface 95 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 910 as needed so that a computer program read therefrom is installed in the storage section 98 as needed.

[0154] When the above-described series of processing is implemented by software, a program constituting the software can be installed from a network such as the Internet or a storage medium such as the removable medium 911 .

[0155] According to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which, when running on a computer, enables the computer to implement the component loading method described in any of the aforementioned embodiments. The computer program product includes computer instructions carried on a computer-readable medium, containing program code for executing the method shown in the flowchart. In such an embodiment, the computer instructions can be downloaded and installed from the network through the communication part 99, or installed from the storage part 98, or installed from the ROM 92. When the computer program is executed by the CPU 91, the method of the embodiment of the present disclosure is executed.

[0156] The above component loading method can allow the user equipment to parse the received function loading configuration information through the correspondence between functions and components, obtain specific component loading configuration information and load according to the component loading configuration information, thereby improving the flexibility of component loading.

[0157] It should be noted that, in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by an instruction execution system, apparatus, or device or for use in conjunction with an instruction execution system, apparatus, or device.

[0158] The computer readable medium may be a computer readable storage medium, or a computer readable signal medium, or any combination of the two.

[0159] Computer-readable storage media include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device. Computer instructions are stored on the computer-readable storage medium, and when the instructions are executed by the processor, the component loading method described in any of the aforementioned embodiments is implemented.

[0160] The above component loading method can allow the user equipment to parse the received function loading configuration information through the correspondence between functions and components, obtain specific component loading configuration information and load according to the component loading configuration information, thereby improving the flexibility of component loading.

[0161] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0162] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0163] In some embodiments, a computer program is further provided, comprising: instructions, which, when executed by a processor, cause the processor to perform the method described in any of the aforementioned embodiments. For example, the instructions may be embodied as computer program codes.

[0164] In embodiments of the present disclosure, computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

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

[0166] The functions described above may be performed at least in part by one or more hardware logic components. For example, and without limitation, exemplary hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0167] Although some specific embodiments of the present disclosure have been described in detail by way of examples, those skilled in the art will appreciate that the above examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Those skilled in the art will appreciate that modifications may be made to the above embodiments without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A component loading method, comprising: receiving first configuration information, where the first configuration information includes a loading sequence of a function to be loaded; Determining second configuration information according to the correspondence between functions and components and the first configuration information, wherein the second configuration information includes a loading sequence of components corresponding to the functions; The component is loaded according to the second configuration information.

2. The component loading method according to claim 1, wherein: The loading sequence of the function includes a loading batch of the function, and determining the second configuration information according to the correspondence between the function and the component and the first configuration information includes: For each loading batch, determining the component corresponding to the function in the loading batch according to the correspondence between the function and the component; Determine the loading sequence of components corresponding to the functions in the loading batch according to the loading priority of the components; The loading sequence of all components corresponding to the functions to be loaded is determined according to the loading batches of the functions and the loading sequence of the components corresponding to the functions in each loading batch.

3. The component loading method according to claim 2, wherein: The first configuration information further includes a delay interval between loading batches of the function to be loaded, and the second configuration information further includes a loading delay of a component corresponding to the function to be loaded. Based on the correspondence between the function and the component and the first configuration information, it is determined that the second configuration information further includes: For each loading batch, the loading delay of the components corresponding to the functions in the loading batch is determined according to the delay interval between the loading batch and the next loading batch.

4. The component loading method according to claim 3, wherein: Determining the loading delay of the components corresponding to the functions in the loading batch according to the delay interval between the loading batch and the next loading batch includes: The loading delay is determined according to the delay interval and a status of the user equipment, wherein the status of the user equipment includes at least one of a resource usage status and a network status.

5. The component loading method according to claim 2, wherein: Loading the component according to the second configuration information includes: encapsulating the loading of components corresponding to the functions in each loading batch into loading tasks according to the second configuration information; Generate a task queue based on the loading tasks corresponding to each loading batch; The component is loaded according to the task queue.

6. The component loading method according to claim 2, wherein: The first configuration information further includes a first identifier corresponding to each loading batch, the first identifier indicating whether the loading batch supports loading before the specified interface is completed. The component loading method further includes: According to the loading batches of the functions and the first identifier corresponding to each loading batch, all the components are divided into a first component set loaded before the designated interface is completed and a second component set loaded after the designated interface is completed.

7. The component loading method according to claim 6, wherein: Loading the component according to the second configuration information includes: Sending a call request to the specified interface; Loading the first component set according to the second configuration information; In response to receiving a response to the call request, determining whether the first component set has been loaded; When the first component set is loaded, loading the second component set according to the second configuration information; If the first component set is not loaded completely, the second component set is loaded after the first component set is loaded completely.

8. The component loading method according to claim 2, wherein: The first configuration information further includes a second identifier corresponding to each loading batch, wherein the second identifier indicates whether functions in the loading batch are displayed simultaneously.

9. The component loading method according to claim 8, wherein: Determining the loading sequence of components corresponding to functions in the loading batch according to the loading priorities of the components includes: For each loading batch, determining, based on the second identifier corresponding to the loading batch, whether the loading sequence of the components corresponding to the functions in the loading batch is parallel loading; In response to the loading sequence of the components corresponding to the functions in the loading batch not being loaded in parallel, the loading sequence of the components corresponding to the functions in the loading batch is determined according to the loading priorities of the components.

10. The component loading method according to claim 1, wherein: The first configuration information is dynamically changing and is determined according to at least one of a business scenario and a test requirement; and / or The second configuration information corresponds one-to-one to the first configuration information.

11. A user equipment, comprising: A receiving module is configured to receive first configuration information, where the first configuration information includes a loading sequence of a function to be loaded; a determining module configured to determine second configuration information according to a correspondence between functions and components and the first configuration information, wherein the second configuration information includes a loading sequence of components corresponding to the functions; The loading module is configured to load the component according to the second configuration information.

12. A user equipment comprising: at least one memory; as well as At least one processor coupled to the at least one memory, the at least one processor being configured to execute the component loading method according to any one of claims 1 to 10 based on instructions stored in the at least one memory.

13. A computer-readable storage medium storing computer instructions, wherein when the instructions are executed by a processor, the component loading method according to any one of claims 1 to 10 is implemented.

14. A computer program product, which, when running on a computer, enables the computer to implement the component loading method according to any one of claims 1 to 10.