APP starting event dynamic loading method, device and equipment
By receiving service status and terminal information when APP is started, the server generates a startup configuration suitable for the terminal and dynamically selects the startup item, solving the problem of slow APP startup speed and improving compatibility and startup speed.
Patent Information
- Application Number
- CN202510432895.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-08-15
AI Technical Summary
With the increase in APP functional requirements, the APP startup speed has slowed down, and the prior art is difficult to improve the startup speed while meeting functional requirements.
When the APP is started, by receiving the user's business status and terminal information, the server dynamically selects the start item matching the user, and generates a startup configuration suitable for the terminal information. The APP loads the corresponding startup item according to the configuration.
It realizes dynamic loading of startup items, improves the startup speed of the APP, and ensures that the startup items are compatible with the terminal, avoiding crashes during terminal loading.
Smart Images

Figure CN120492048A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and more particularly to a method, apparatus, and device for dynamically loading an APP startup event. Background Art
[0002] With the development of the mobile internet, in addition to increasing demands for application (APP) functionality, the demand for APP startup speed is also increasing. Higher functional requirements lead to an app referencing more third-party service SDKs and related startup items, which in turn slows down startup speeds. These two requirements are clearly contradictory.
[0003] How to improve the startup speed of APP while meeting the functional requirements of APP is a technical problem that needs to be solved urgently. Summary of the Invention
[0004] In order to solve the problems existing in the prior art, the embodiments of this specification provide a method, device and equipment for dynamically loading APP startup events. When the APP is started, the APP reports the user status and terminal information to the server. The server selects multiple startup items that match the user based on the user's business status, business needs, terminal information, etc., and then intelligently streamlines and configures the startup items based on the number of startup items, equipment and other comprehensive conditions to form a startup configuration, which is then sent to the APP. The APP loads the corresponding startup items according to the startup configuration, thereby improving the startup speed of the APP.
[0005] The specific technical solutions of the embodiments of this specification are as follows:
[0006] On the one hand, an embodiment of this specification provides a method for dynamically loading an APP startup event, the method comprising:
[0007] Receive the user's service status and terminal information reported by the terminal APP when it is opened;
[0008] determining at least one business requirement according to the business status;
[0009] Determine the startup items corresponding to the business requirements and obtain a startup item list;
[0010] Adjusting the startup items in the startup item list to be suitable for the terminal information to generate a startup configuration;
[0011] The startup configuration is sent to the APP so that the APP can load the corresponding startup items according to the startup configuration.
[0012] Furthermore, adjusting the startup items in the startup item list to be suitable for the terminal information to generate the startup configuration further includes:
[0013] Determining startup items in the startup item list that have dependency relationships, and sorting the startup items in order of the dependency relationships to obtain a unified startup item sequence;
[0014] determining whether at least one startup item in the unified startup item sequence does not match the terminal information; if so, removing each startup item in the unified startup item sequence from the startup item list; if not, retaining each startup item in the unified startup item sequence in the startup item list;
[0015] Sorting the startup items in the startup item list in descending order of their startup priorities. Before sorting, if the unified startup item sequence exists in the startup item list, treating the unified startup item sequence as a whole startup item, and the priority of the whole startup item is the priority of the startup item that ranks first in the unified startup item sequence.
[0016] According to the target startup item number corresponding to the terminal information, multiple startup items ranked at the top are selected from the sorted startup item list as target startup items, and the startup configuration is generated according to the target startup item. Before selecting the target startup item, if the unified startup item sequence exists in the startup item list, the sum of the number of startup items before the unified startup item sequence and the number of startup items in the unified startup item sequence is calculated and it is determined whether the calculation result exceeds the target startup item number. If it exceeds, the unified startup item sequence is removed from the startup item list to facilitate the selection of the target startup item from the startup item list after removing the unified startup item sequence. If it does not exceed, each startup item in the unified startup item sequence is treated as an independent startup item for the selection of the target startup item.
[0017] Furthermore, determining startup items in the startup item list that have dependency relationships, and sorting the startup items in the order of the dependency relationships to obtain a unified startup item sequence further includes:
[0018] Parsing the tag information of each startup item to obtain dependency information of each startup item, wherein the dependency information includes whether there is no dependency relationship or the name of the dependent startup item;
[0019] For each startup item with a dependency relationship, sort the startup item corresponding to the startup item's dependent startup item name before the startup item;
[0020] After all startup items with dependencies are sorted, at least one unified startup item sequence is obtained.
[0021] Furthermore, the terminal information includes a terminal version;
[0022] Determining whether there is at least one startup item in the unified startup item sequence that does not match the terminal information further includes:
[0023] Parse the tag information of each startup item and determine the version information supported by each startup item;
[0024] For each startup item, it is determined whether the terminal version exists in the version information supported by the startup item. If so, it indicates that the startup item is consistent with the terminal information; if not, it indicates that the startup item is inconsistent with the terminal information.
[0025] Furthermore, the terminal information also includes remaining power;
[0026] Determining whether there is at least one startup item in the unified startup item sequence that does not match the terminal information further includes:
[0027] Analyze the label information of each startup item and determine the power consumption level of each startup item;
[0028] For each startup item, it is determined whether the power consumption level of the startup item is consistent with the remaining power. If so, it indicates that the startup item is consistent with the terminal information; if not, it indicates that the startup item is inconsistent with the terminal information.
[0029] Furthermore, the terminal information also includes network performance;
[0030] Determining whether there is at least one startup item in the unified startup item sequence that does not match the terminal information further includes:
[0031] Determining whether the network performance exceeds a threshold;
[0032] If it exceeds, then each startup item is consistent with the terminal information;
[0033] If not, the tag information of each startup item is parsed to determine whether each startup item is a core startup item. If the startup item is a core startup item, the startup item is consistent with the terminal information. If the startup item is not a core startup item, it means that the startup item is inconsistent with the terminal information.
[0034] Furthermore, generating the startup configuration according to the target startup item further includes:
[0035] Parse the tag information of each target startup item to obtain the execution thread information of each target startup item, wherein the execution thread information includes main thread execution or sub-thread execution;
[0036] The startup configuration is generated according to the execution thread information of each target startup item.
[0037] Furthermore, generating the startup configuration according to the target startup item further includes:
[0038] Parsing the tag information of each target startup item to obtain the loading phase of each target startup item, wherein the loading phase includes a startup phase, a page display phase, or a program idle phase;
[0039] The startup configuration is generated according to the loading stage of each target startup item.
[0040] On the other hand, an embodiment of this specification further provides a device for dynamically loading an APP startup event, the device comprising:
[0041] APP reporting information receiving unit, used to receive the user's service status and terminal information reported by the terminal APP when it is opened;
[0042] a service requirement determining unit, configured to determine at least one service requirement according to the service status;
[0043] A startup item determination unit, configured to determine startup items corresponding to the business requirements and obtain a startup item list;
[0044] a startup configuration generating unit, configured to adjust the startup items in the startup item list to be suitable for the terminal information and generate a startup configuration;
[0045] The startup configuration sending unit is used to send the startup configuration to the APP so that the APP loads the corresponding startup item according to the startup configuration.
[0046] On the other hand, an embodiment of this specification further provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor implements the above method when executing the computer program.
[0047] Using the embodiment of this specification, when the terminal APP is opened, the APP reports the user's business status and terminal information, determines the business needs corresponding to the user's opening of the APP based on the business status, and then determines the startup items based on the business needs to obtain a startup item list. The startup item list is a collection of startup items that the APP may need to load when the user opens the APP to handle business this time. However, due to different terminals, there may be startup items in the startup item set that do not match the terminal information. Therefore, the startup items in the startup item list are adjusted to suit the terminal information, and a startup configuration is generated. Finally, the startup configuration is sent to the APP. The APP can load the corresponding startup items according to the startup configuration. The loaded startup items are the startup items that the user is most likely to use when opening the APP to handle business this time, rather than all the startup items of the APP, thereby realizing dynamic loading of startup items and improving the startup speed of the APP. Moreover, these startup items are adjusted to suit the terminal information, so these startup items are compatible with the terminal, avoiding the situation where the terminal crashes when loading startup items. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0049] Figure 1 The figure shows a flow chart of a method for dynamically loading an APP startup event in an embodiment of this specification;
[0050] Figure 2 FIG2 is a flow chart showing how to adjust the startup items in the startup item list to be suitable for the terminal information and generate a startup configuration according to an embodiment of this specification;
[0051] Figure 3 FIG2 is a flow chart showing a method of determining startup items with dependencies in the startup item list and sorting the startup items in the order of the dependencies to obtain a unified startup item sequence according to an embodiment of the present specification;
[0052] Figure 4 FIG2 is a schematic diagram of a first process of generating the startup configuration according to the target startup item in an embodiment of this specification;
[0053] Figure 5 FIG2 is a schematic diagram of a second process for generating the startup configuration according to the target startup item in an embodiment of this specification;
[0054] Figure 61 is a schematic diagram of a first process for determining whether there is at least one startup item in the unified startup item sequence that does not match the terminal information in an embodiment of this specification;
[0055] Figure 7 1. A second flow chart showing a process for determining whether at least one startup item in the unified startup item sequence is inconsistent with the terminal information in an embodiment of this specification;
[0056] Figure 8 FIG2 is a schematic diagram of a third process for determining whether there is at least one startup item in the unified startup item sequence that does not match the terminal information in an embodiment of this specification;
[0057] Figure 9 The figure shows a structural diagram of a dynamic loading device for an APP startup event in an embodiment of this specification;
[0058] Figure 10 The figure shows a schematic diagram of the structure of a computer device in an embodiment of this specification.
[0059]
Description of the accompanying drawings
[0060] 901, APP reporting information receiving unit;
[0061] 902. Business requirements determination unit;
[0062] 903. Startup item determination unit;
[0063] 904. Start the configuration generation unit;
[0064] 905. Start the configuration sending unit;
[0065] 1002. Computer equipment;
[0066] 1004. Processing equipment;
[0067] 1006. Storage resources;
[0068] 1008, driving mechanism;
[0069] 1010, input / output module;
[0070] 1012. Input device;
[0071] 1014. Output device;
[0072] 1016. Presentation equipment;
[0073] 1018. Graphical user interface;
[0074] 1020, network interface;
[0075] 1022, communication link;
[0076] 1024. Communication bus. DETAILED DESCRIPTION
[0077] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the embodiments described are only part of the embodiments of this specification, not all of them. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the embodiments of this specification.
[0078] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of this specification and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0079] It should be noted that the acquisition, storage, use, and processing of data in the technical solutions of the embodiments of this specification comply with the relevant provisions of national laws and regulations.
[0080] It should be noted that in the embodiments of this specification, certain software, components, models and other existing solutions in the industry may be mentioned. They should be regarded as exemplary and their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use the solution.
[0081] In order to solve the problem in the prior art that the APP startup speed slows down as the APP function requirements increase, the embodiment of this specification provides a method for dynamically loading APP startup events, such as Figure 1 As shown, the method includes:
[0082] Step 101: Receive the user's service status and terminal information reported by the terminal APP when it is opened;
[0083] Step 102: determining at least one service requirement according to the service status;
[0084] Step 103: Determine the startup items corresponding to the business requirements and obtain a startup item list;
[0085] Step 104: adjusting the startup items in the startup item list to be suitable for the terminal information to generate a startup configuration;
[0086] Step 105: Send the startup configuration to the APP so that the APP loads the corresponding startup item according to the startup configuration.
[0087] Using the embodiment of this specification, when the terminal APP is opened, the APP reports the user's business status and terminal information, determines the business needs corresponding to the user's opening of the APP based on the business status, and then determines the startup items based on the business needs to obtain a startup item list. The startup item list is a collection of startup items that the APP may need to load when the user opens the APP to handle business this time. However, due to different terminals, there may be startup items in the startup item set that do not match the terminal information. Therefore, the startup items in the startup item list are adjusted to suit the terminal information, and a startup configuration is generated. Finally, the startup configuration is sent to the APP. The APP can load the corresponding startup items according to the startup configuration. The loaded startup items are the startup items that the user is most likely to use when opening the APP to handle business this time, rather than all the startup items of the APP, thereby realizing dynamic loading of startup items and improving the startup speed of the APP. Moreover, these startup items are adjusted to suit the terminal information, so these startup items are compatible with the terminal, avoiding the situation where the terminal crashes when loading startup items.
[0088] In the embodiments of this specification, the terminal can be a mobile device such as a mobile phone. Taking a mobile phone as an example, the user pre-installs an APP on the mobile phone. When the user opens the APP on the terminal (if it is the first time to open the APP, it is also necessary to authorize the system functions that the APP wants to use, such as network connection, etc.), the APP can obtain the user's business status and terminal information. The APP then sends the user's business status and terminal information to the server. The server generates a startup configuration based on the business status and terminal information, and then sends the startup configuration to the APP. The APP then loads the corresponding startup items according to the startup configuration.
[0089] In the embodiments of this specification, the business status may include not logged in, user logout, not submitted for the first time, not submitted for the first time (credit limit expired), re-examination during loan, under review, not signed for the first loan, Haojie-loan processing, Haomai-loan processing, repayment processing (normal repayment), non-circulating credit, overdue, abnormal credit limit (loan > credit, etc.), etc. Among them, when the user opens the APP for the first time, because the user has not logged in, the business status at this time is not logged in. After the user logs in to the APP, the APP can record the user's identity information and login information, etc., and then the APP connects to the server, determines the user's business status based on the user's identity information, and updates the user's business status while the user handles business through the APP. When the user closes the APP (exits the background) and opens the APP again, the APP can send the last recorded business status and the terminal information obtained this time to the server.
[0090] In the embodiment of this specification, after receiving the service status and terminal information sent by the APP, the server determines at least one service requirement corresponding to the service status. Specifically, the correspondence between the service status and the service requirement can be pre-defined by the staff, and the service requirement corresponding to the service status can be determined based on the correspondence.
[0091] For example, business needs may include: identity recognition, face recognition, bank card binding, loans, super membership, credit limit increase, repayment, and general business SDKs, such as data resource caching, performance monitoring, crash monitoring, advertising, APP remote notification, one-click login, authentication and credit limit increase, etc. The actual business needs will be more.
[0092] In the embodiment of this specification, the startup items (SDKs) required for each business requirement are also pre-set. Therefore, after determining the business requirements, the SDKs required for each business requirement can be determined, and then these SDKs can be deduplicated to obtain a startup item list.
[0093] For example, the startup items corresponding to identity recognition, face recognition, and bank card binding are SDK recognition. It should be noted that the SDK required for actual business needs can be set by the APP developer based on experience and will not be listed in detail here.
[0094] It can be understood that the SDKs in the startup item list are determined based on the user's business status, that is, the business that the user is most likely to conduct when opening the app. Therefore, the SDKs required for these businesses are pre-launched, rather than launching all SDKs when the app is opened. For example, if the app is an online shopping app and the user's business status is pending delivery, then the business that the user is most likely to conduct when opening the online shopping app is to check the logistics status. Therefore, the startup item corresponding to the logistics status query is pre-loaded. SDKs corresponding to payment or repayment business needs can be loaded when the user actually triggers the business while using the app, or loaded during the program's idle phase.
[0095] However, there may be an SDK in the startup item list that does not match the terminal information, or the terminal version may be low and still cannot quickly load these filtered SDKs, and the loading order of these SDKs also needs to be determined. Therefore, the embodiments of this specification adjust the startup items in the startup item list to suit the terminal information and generate a startup configuration.
[0096] Specifically, if Figure 2 As shown, adjusting the startup items in the startup item list to be suitable for the terminal information to generate a startup configuration further includes:
[0097] Step 201: determining startup items in the startup item list that have dependency relationships, and sorting the startup items in the order of the dependency relationships to obtain a unified startup item sequence;
[0098] Step 202: Determine whether there is at least one startup item in the unified startup item sequence that does not match the terminal information; if so, remove each startup item in the unified startup item sequence from the startup item list; if not, retain each startup item in the unified startup item sequence in the startup item list;
[0099] Step 203: sorting the startup items in the startup item list in descending order of their startup priority;
[0100] In this step, before sorting, if the unified startup item sequence exists in the startup item list, the unified startup item sequence is regarded as a whole startup item, and the priority of the whole startup item is the priority of the startup item ranked first in the unified startup item sequence:.
[0101] Step 204: selecting a plurality of startup items ranked first from the sorted startup item list as target startup items according to the number of target startup items corresponding to the terminal information, and generating the startup configuration according to the target startup items.
[0102] In this step, before selecting the target startup item, if the unified startup item sequence exists in the startup item list, the sum of the number of startup items before the unified startup item sequence and the number of startup items in the unified startup item sequence is calculated and it is determined whether the calculation result exceeds the target startup item number. If it exceeds, the unified startup item sequence is removed from the startup item list to facilitate the selection of the target startup item from the startup item list after removing the unified startup item sequence. If it does not exceed, each startup item in the unified startup item sequence is treated as an independent startup item for selection of the target startup item.
[0103] In the embodiment of this specification, the SDK is pre-configured with tag information, which records the SDK's dependencies, priority, supported version information, power consumption level, whether it is a core startup item, and the SDK's execution thread information and loading stage.
[0104] Therefore, according to one embodiment of the present specification, Figure 3 As shown, determining startup items in the startup item list that have dependency relationships, and sorting the startup items in the order of the dependency relationships to obtain a unified startup item sequence further includes:
[0105] Step 301: Parse the tag information of each startup item to obtain dependency information of each startup item, wherein the dependency information includes whether there is no dependency relationship or the name of the dependent startup item;
[0106] Step 302: for each startup item with a dependency relationship, sort the startup item corresponding to the startup item's dependent startup item name before the startup item;
[0107] Step 303: After sorting all startup items with dependencies, at least one unified startup item sequence is obtained.
[0108] In the embodiment of this specification, if the dependency information of a certain SDK indicates that there is no dependency relationship, it means that the loading of the SDK does not depend on other SDKs, and the SDK can be loaded independently.
[0109] If the dependency information of an SDK is the name of a dependent startup item, it means that the loading of this SDK depends on the loading of other SDKs. This SDK needs to be loaded after the SDKs it depends on are loaded.
[0110] Therefore, the embodiments of this specification can use dependencies to sort startup items. For example, startup item A depends on startup item B, startup item C depends on startup item A, and startup item D depends on startup item C. Then the sorted unified startup item sequence is startup item B, startup item A, startup item C, and startup item D.
[0111] It should be noted that a certain SDK may depend on multiple other SDKs, or a certain SDK may depend on multiple other SDKs, which will result in multiple unified startup item sequences or multiple branches in the unified startup item sequence. This will not be described in detail here.
[0112] Then, it is determined whether at least one startup item in the unified startup item sequence does not match the terminal information. If so, the unified startup item sequence does not need to be loaded during the current startup, and each startup item in the unified startup item sequence is removed from the startup item list. Otherwise, each startup item in the unified startup item sequence is retained in the startup item list, and the next determination is performed.
[0113] In the implementation of this specification, the system version of the terminal determines the number of SDKs that can be launched in the same batch. For example, if the system version of the terminal is high, the number of SDKs that can be launched in the same batch can be large. If the system version of the terminal is low, the number of SDKs launched in the same batch cannot be too large, otherwise it will cause the APP startup time to be too long or even be forcibly terminated by the system due to startup timeout.
[0114] Therefore, it is possible that the startup items in the startup item list cannot be launched at the same time when the app is opened, so some startup items need to be removed from the startup item list. Specifically, the staff can pre-set the target number of startup items corresponding to the terminal system version and select the target startup items from the startup item list based on the target number of startup items.
[0115] Specifically, in the embodiments of this specification, the startup items in the startup item list are sorted in descending order according to the startup priority of each startup item in the startup item list. Before sorting, if the unified startup item sequence exists in the startup item list, the unified startup item sequence is treated as a whole startup item, and the priority of the whole startup item is the priority of the startup item ranked first in the unified startup item sequence.
[0116] After sorting the startup items according to the priority, multiple startup items ranked at the top can be selected from the sorted startup item list as target startup items according to the number of target startup items corresponding to the terminal information. Before selecting the target startup item, if the unified startup item sequence exists in the startup item list, the sum of the number of startup items before the unified startup item sequence and the number of startup items in the unified startup item sequence is calculated and it is determined whether the calculation result exceeds the number of target startup items. If it exceeds, the unified startup item sequence is removed from the startup item list to facilitate the selection of the target startup item from the startup item list after the unified startup item sequence is removed. If it does not exceed, each startup item in the unified startup item sequence is treated as an independent startup item for the selection of the target startup item.
[0117] It can be understood that if any startup item in the unified startup item sequence does not match the terminal information, then the startup item in this unified startup sequence does not need to be loaded when the APP is opened, and can be loaded when the program is idle or the user subsequently triggers the corresponding function.
[0118] According to one embodiment of this specification, Figure 4 As shown, generating the startup configuration according to the target startup item further includes:
[0119] Step 401: parsing the tag information of each target startup item to obtain the execution thread information of each target startup item, wherein the execution thread information includes the main thread execution or the sub-thread execution;
[0120] Step 402: Generate the startup configuration according to the execution thread information of each target startup item.
[0121] like Figure 5 As shown, generating the startup configuration according to the target startup item further includes:
[0122] Step 501: parsing the tag information of each target startup item to obtain the loading phase of each target startup item, wherein the loading phase includes a startup phase, a page display phase, or a program idle phase;
[0123] Step 502: Generate the startup configuration according to the loading stage of each target startup item.
[0124] It can be understood that the execution thread and loading stage of the target startup item are written in the startup configuration so that the APP can load the target startup item according to the execution thread and loading stage requirements.
[0125] According to one embodiment of this specification, Figure 6 As shown, determining whether there is at least one startup item in the unified startup item sequence that is inconsistent with the terminal information further includes:
[0126] Step 601: Parse the tag information of each startup item to determine the version information supported by each startup item;
[0127] In this step, the staff may determine in advance the version information (which may include multiple versions) supported by the startup item based on experience, and then record the version information in the tag of the startup item.
[0128] Step 602: for each startup item, determine whether the terminal version exists in the version information supported by the startup item. If so, it means that the startup item is consistent with the terminal information; if not, it means that the startup item is inconsistent with the terminal information.
[0129] like Figure 7As shown, determining whether there is at least one startup item in the unified startup item sequence that is inconsistent with the terminal information further includes:
[0130] Step 701: Parse the tag information of each startup item and determine the power consumption level of each startup item;
[0131] In this step, the power consumption level of the startup item can be determined in advance by the staff based on experience, and then the power consumption level can be recorded in the label of the startup item.
[0132] Step 702: for each startup item, determine whether the power consumption level of the startup item is consistent with the remaining power; if so, it indicates that the startup item is consistent with the terminal information; if not, it indicates that the startup item is inconsistent with the terminal information.
[0133] In the embodiments of this specification, the amount of power corresponding to the power consumption level can be pre-set, indicating that loading the startup item of this power consumption level requires the terminal's remaining power to be above this amount of power. Therefore, the embodiments of this specification determine whether the power consumption level of the startup item is consistent with the current remaining power of the terminal. If so, it means that the startup item is consistent with the terminal information and can be loaded under the current remaining power of the terminal. If not, it means that the startup item is inconsistent with the terminal information and cannot be loaded under the current remaining power of the terminal. For example, if the remaining power of the terminal is low, loading the advertising SDK should be abandoned to avoid excessive power loss of the terminal.
[0134] like Figure 8 As shown, determining whether there is at least one startup item in the unified startup item sequence that is inconsistent with the terminal information further includes:
[0135] Step 801: Determine whether the network performance exceeds a threshold;
[0136] In this step, network performance may include network speed and / or signal strength. For example, the app may report the network speed and signal strength to the server, which then performs a weighted calculation on the network speed and signal strength to obtain a network performance value. The server then determines whether the network performance value exceeds a pre-set threshold based on experience.
[0137] Step 802: If it exceeds, then all startup items are consistent with the terminal information;
[0138] In the embodiment of the present specification, if the network performance exceeds the threshold, it means that the network performance is good, and then all startup items in the startup item list can be started in the same batch.
[0139] Step 803: If not, parse the tag information of each startup item to determine whether each startup item is a core startup item. If the startup item is a core startup item, the startup item is consistent with the terminal information. If the startup item is not a core startup item, it means that the startup item is inconsistent with the terminal information.
[0140] In the embodiment of this specification, if the network performance does not exceed the threshold, it means that the network performance is poor, and all startup items cannot be started in the same batch. Therefore, the embodiment of this specification only starts the core startup items to ensure the realization of the basic functions of the APP.
[0141] It can be understood that the embodiments of this specification can select startup items from three dimensions: terminal version, power consumption level and network performance. The startup item selection can be executed from one dimension alone, or the startup item selection can be executed from these three dimensions in a serial manner, so that the selected target startup item can be started under the current status of the terminal, avoiding the APP startup time being too long or the APP crashing.
[0142] In the embodiment of the present specification, after receiving the startup configuration, the terminal may use a pre-written script to parse the startup configuration and convert it into a function executable by the client, and execute the generated function to load the target startup item.
[0143] Based on the same inventive concept, the embodiment of this specification also provides an APP startup event dynamic loading device, such as Figure 9 Shown, including:
[0144] APP reporting information receiving unit 901, used to receive the user's service status and terminal information reported by the terminal APP when it is opened;
[0145] A service requirement determining unit 902 is configured to determine at least one service requirement according to the service status;
[0146] A startup item determining unit 903 is configured to determine startup items corresponding to the business requirements and obtain a startup item list;
[0147] A startup configuration generating unit 904 is configured to adjust the startup items in the startup item list to be suitable for the terminal information and generate a startup configuration;
[0148] The startup configuration sending unit 905 is configured to send the startup configuration to the APP so that the APP loads the corresponding startup item according to the startup configuration.
[0149] The beneficial effects achieved by the above-mentioned device are consistent with the beneficial effects achieved by the above-mentioned method, and will not be described in detail in the embodiments of this specification.
[0150] like Figure 10The diagram shows a schematic diagram of the structure of a computer device according to an embodiment of the present specification. The apparatus in the embodiment of the present specification may be a computer device according to the embodiment, executing the method according to the embodiment of the present specification. Computer device 1002 may include one or more processing devices 1004, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. Computer device 1002 may also include any storage resources 1006 for storing any type of information, such as code, settings, data, etc. For example, and without limitation, storage resources 1006 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any storage resource may use any technology to store information. Furthermore, any storage resource may provide volatile or non-volatile retention of information. Furthermore, any storage resource may represent a fixed or removable component of computer device 1002. In one embodiment, when processing device 1004 executes associated instructions stored in any storage resource or combination of storage resources, computer device 1002 may perform any operation of the associated instructions. The computer device 1002 also includes one or more drive mechanisms 1008 for interacting with any storage resources, such as a hard disk drive mechanism, an optical disk drive mechanism, and the like.
[0151] The computer device 1002 may also include an input / output module 1010 (I / O) for receiving various inputs (via input devices 1012) and for providing various outputs (via output devices 1014). A specific output mechanism may include a presentation device 1016 and an associated graphical user interface (GUI) 1018. In other embodiments, the input / output module 1010 (I / O), input devices 1012, and output devices 1014 may not be included, and the computer device 1002 may simply be a computer device in a network. The computer device 1002 may also include one or more network interfaces 1020 for exchanging data with other devices via one or more communication links 1022. One or more communication buses 1024 couple the components described above together.
[0152] The communication link 1022 may be implemented in any manner, for example, via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 1022 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
[0153] The embodiments of this specification also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0154] The embodiments of this specification also provide a computer-readable instruction, wherein when a processor executes the instruction, the program therein causes the processor to execute the above method.
[0155] It should be understood that in the various embodiments of the present specification, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present specification.
[0156] It should also be understood that in the embodiments of this specification, the term "and / or" is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent three situations: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, in the embodiments of this specification, the character " / " generally indicates that the associated objects are in an "or" relationship.
[0157] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the embodiments of this specification can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of this specification.
[0158] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0159] In the several embodiments provided in the embodiments of this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0160] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this specification.
[0161] In addition, the functional units in each embodiment of the present specification may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0162] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of this specification is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the embodiment of this specification. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0163] The embodiments of this specification use specific embodiments to illustrate the principles and implementation methods of the embodiments of this specification. The description of the above embodiments is only used to help understand the methods and core ideas of the embodiments of this specification. At the same time, for those skilled in the art, based on the ideas of the embodiments of this specification, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of this specification.
Claims
1. A method for dynamically loading an APP startup event, characterized in that: The method comprises: Receive the user's service status and terminal information reported by the terminal APP when it is opened; determining at least one business requirement according to the business status; Determine the startup items corresponding to the business requirements and obtain a startup item list; Adjusting the startup items in the startup item list to be suitable for the terminal information to generate a startup configuration; The startup configuration is sent to the APP so that the APP can load the corresponding startup items according to the startup configuration.
2. The method according to claim 1, characterized in that Adjusting the startup items in the startup item list to be suitable for the terminal information to generate a startup configuration further includes: Determining startup items in the startup item list that have dependency relationships, and sorting the startup items in order of the dependency relationships to obtain a unified startup item sequence; determining whether at least one startup item in the unified startup item sequence does not match the terminal information; if so, removing each startup item in the unified startup item sequence from the startup item list; if not, retaining each startup item in the unified startup item sequence in the startup item list; Sorting the startup items in the startup item list in descending order of their startup priorities. Before sorting, if the unified startup item sequence exists in the startup item list, treating the unified startup item sequence as a whole startup item, and the priority of the whole startup item is the priority of the startup item that ranks first in the unified startup item sequence. According to the target startup item number corresponding to the terminal information, multiple startup items ranked at the top are selected from the sorted startup item list as target startup items, and the startup configuration is generated according to the target startup item. Before selecting the target startup item, if the unified startup item sequence exists in the startup item list, the sum of the number of startup items before the unified startup item sequence and the number of startup items in the unified startup item sequence is calculated and it is determined whether the calculation result exceeds the target startup item number. If it exceeds, the unified startup item sequence is removed from the startup item list to facilitate the selection of the target startup item from the startup item list after removing the unified startup item sequence. If it does not exceed, each startup item in the unified startup item sequence is treated as an independent startup item for the selection of the target startup item.
3. The method according to claim 2, characterized in that Determining startup items in the startup item list that have dependency relationships, and sorting the startup items in order of the dependency relationships to obtain a unified startup item sequence further includes: Parsing the tag information of each startup item to obtain dependency information of each startup item, wherein the dependency information includes whether there is no dependency relationship or the name of the dependent startup item; For each startup item with a dependency relationship, sort the startup item corresponding to the startup item's dependent startup item name before the startup item; After all startup items with dependencies are sorted, at least one unified startup item sequence is obtained.
4. The method according to claim 2, characterized in that The terminal information includes the terminal version; Determining whether there is at least one startup item in the unified startup item sequence that does not match the terminal information further includes: Parse the tag information of each startup item and determine the version information supported by each startup item; For each startup item, it is determined whether the terminal version exists in the version information supported by the startup item. If so, it indicates that the startup item is consistent with the terminal information; if not, it indicates that the startup item is inconsistent with the terminal information.
5. The method according to claim 2, characterized in that The terminal information also includes remaining power; Determining whether there is at least one startup item in the unified startup item sequence that does not match the terminal information further includes: Analyze the label information of each startup item and determine the power consumption level of each startup item; For each startup item, it is determined whether the power consumption level of the startup item is consistent with the remaining power. If so, it indicates that the startup item is consistent with the terminal information; if not, it indicates that the startup item is inconsistent with the terminal information.
6. The method according to claim 2, characterized in that The terminal information also includes network performance; Determining whether there is at least one startup item in the unified startup item sequence that does not match the terminal information further includes: Determining whether the network performance exceeds a threshold; If it exceeds, then each startup item is consistent with the terminal information; If not, the tag information of each startup item is parsed to determine whether each startup item is a core startup item. If the startup item is a core startup item, the startup item is consistent with the terminal information. If the startup item is not a core startup item, it means that the startup item is inconsistent with the terminal information.
7. The method according to claim 2, characterized in that Generating the startup configuration according to the target startup item further includes: Parse the tag information of each target startup item to obtain the execution thread information of each target startup item, wherein the execution thread information includes main thread execution or sub-thread execution; The startup configuration is generated according to the execution thread information of each target startup item.
8. The method according to claim 2, characterized in that Generating the startup configuration according to the target startup item further includes: Parsing the tag information of each target startup item to obtain the loading phase of each target startup item, wherein the loading phase includes a startup phase, a page display phase, or a program idle phase; The startup configuration is generated according to the loading stage of each target startup item.
9. A dynamic loading device for APP startup events, characterized in that: The device comprises: APP reporting information receiving unit, used to receive the user's service status and terminal information reported by the terminal APP when it is opened; a service requirement determining unit, configured to determine at least one service requirement according to the service status; A startup item determination unit, configured to determine startup items corresponding to the business requirements and obtain a startup item list; a startup configuration generating unit, configured to adjust the startup items in the startup item list to be suitable for the terminal information and generate a startup configuration; The startup configuration sending unit is used to send the startup configuration to the APP so that the APP loads the corresponding startup item according to the startup configuration.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.