Application management method and device, equipment, and storage medium
By dividing the application into a two-layer tree-like organizational structure and utilizing the mounting method of the first base and the second base, the problem of high management cost in micro-frontend technology is solved, and more efficient application system management is achieved.
Patent Information
- Application Number
- CN202211430157.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-15
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2042-11-15
AI Technical Summary
Existing micro-frontend technologies result in high management costs for application systems when managing multiple micro-applications, especially when there are a large number of micro-applications, making efficient management difficult.
Multiple applications are aggregated into a tree-like organizational structure with at least two layers. By mounting applications on the first and second bases, a hierarchical management system is formed, reducing the number of applications managed by each base and thus lowering management costs.
By implementing hierarchical management, the management time for each base station is reduced, the management cost of the application system is saved, and management efficiency is improved.
Smart Images

Figure CN116776023B_ABST
Abstract
Description
Technical Field
[0001] This application relates to computer technology, including but not limited to application management methods, devices, equipment, and storage media. Background Technology
[0002] Ultra-large front-end applications, including ultra-large World Wide Web (WWAN) front-end applications, refer to web front-end applications that are large in size or highly complex. Existing micro-front-end technologies decompose ultra-large web front-end applications into multiple micro-applications, managing these micro-applications to maintain the large front-end application system. However, when there are many micro-applications, the management cost of the application system becomes high. Summary of the Invention
[0003] In view of this, the application management method, apparatus, device, and storage medium provided in this application can aggregate multiple applications into at least two-layer tree-like organizational structures for hierarchical management of applications when there are many applications, thereby saving the management cost of the application system where the application resides.
[0004] According to one aspect of the embodiments of this application, an application management method is provided, comprising: mounting an application to a first base; mounting a second base to the first base when the number of applications mounted on the first base meets a first condition; and mounting at least one unmounted application to the second base.
[0005] According to one aspect of the embodiments of this application, an application management device is provided, comprising: a mounting module for mounting an application to a first base; the mounting module is further configured to mount a second base to the first base when the number of applications mounted on the first base meets a first condition; the mounting module is further configured to mount at least one unmounted application to the second base.
[0006] According to one aspect of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the program to implement the method described in the embodiments of the present application.
[0007] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the methods provided in the embodiments of this application.
[0008] In this embodiment, applications are first mounted on a first base. When the number of applications is large, a second base is mounted on the first base so that unmounted applications can be mounted on the second base. This increases the number of applications that can be aggregated on the first base, including those mounted on the first base and those mounted on the second base. Furthermore, the first base, the applications mounted on the first base, the second base, and the applications mounted on the second base constitute at least two layers of a tree-like organizational structure, allowing for hierarchical management of applications. That is, applications under the first base and the second base can be managed through the first base, and applications under the second base can be managed through the second base, rather than a single base managing all applications. This reduces the number of applications managed by each base, saving management time for each base and thus reducing the management cost of the application system.
[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0010] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application. Obviously, the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0011] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0012] Figure 1 A schematic diagram illustrating the implementation process of the application management method provided in this application embodiment;
[0013] Figure 2 This is a schematic diagram of the process for generating a tree-like organizational structure provided in an embodiment of this application;
[0014] Figure 3 This is a schematic diagram illustrating the decomposition of a large application into sub-application units, provided as an embodiment of this application.
[0015] Figure 4 This is a schematic diagram illustrating the setting of base identification information provided in the embodiments of this application;
[0016] Figure 5A schematic diagram illustrating the implementation flow of another application management method provided in this application embodiment;
[0017] Figure 6 This application provides a schematic diagram of a process for generating a tree-like organizational structure.
[0018] Figure 7 This is a schematic diagram of a tree-like organizational structure provided in an embodiment of this application;
[0019] Figure 8 A schematic diagram illustrating the implementation process of another application management method provided in this application embodiment;
[0020] Figure 9 This is a schematic diagram of a B+ tree structure provided in an embodiment of this application;
[0021] Figure 10 A schematic diagram illustrating the implementation process of another application management method provided in this application embodiment;
[0022] Figure 11 This is a schematic diagram of the micro-application modification and loading logic provided in the embodiments of this application;
[0023] Figure 12 This is a schematic diagram of the organizational structure after application registration is completed, provided in an embodiment of this application.
[0024] Figure 13 A schematic diagram illustrating the implementation process of the page loading method provided in this application embodiment;
[0025] Figure 14 This is a schematic diagram of the structure of an application management device provided in an embodiment of this application;
[0026] Figure 15 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0029] In the following description, references to "some embodiments," "this embodiment," "this application embodiment," and examples, etc., describe a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subset of all possible embodiments and may be combined with each other without conflict.
[0030] This application provides an application management method that can be applied to electronic devices, software systems installed on electronic devices, or application management platforms. The electronic device can be any type of device with information processing capabilities, such as a mobile phone or computer. The functions implemented by this method can be achieved by a processor in the electronic device calling program code. The program code can be stored in a computer storage medium. Therefore, the electronic device includes at least a processor and a storage medium.
[0031] Figure 1 This is a schematic diagram illustrating the implementation process of the application management method provided in the embodiments of this application, such as... Figure 1 As shown, the method may include the following steps 101 to 103:
[0032] Step 101: Mount the application to the first base;
[0033] Step 102: If the number of applications mounted on the first base meets the first condition, mount the second base on the first base;
[0034] Step 103: Mount at least one unmounted application to the second base.
[0035] In some embodiments, the application management method described in steps 101 to 103 is implemented based on a Single-Single Page Application (Single-SPA) framework, which is a micro-frontend framework that can aggregate multiple applications into a single application.
[0036] In this embodiment of the application, by executing steps 101 to 103, multiple applications are sequentially mounted on the first base and the second base to generate a tree-like organizational structure of the applications, thereby realizing the aggregation of multiple applications. Figure 2 This is a schematic diagram of the process for generating a tree-like organizational structure provided in an embodiment of this application, such as... Figure 2 As shown, after the number of applications mounted on the first base reaches a certain number, the second base is mounted on the first base, and the remaining unmounted applications are mounted on the second base.
[0037] Understandably, in this embodiment, applications are first mounted on a first base. When the number of applications is large, a second base is created and mounted on the first base so that unmounted applications can be mounted on the second base. Thus, on the one hand, the applications aggregated on the first base include not only those mounted on the first base but also those mounted on the second base, increasing the number of applications that the first base can aggregate. On the other hand, the first base, the applications mounted on the first base, the second base, and the applications mounted on the second base constitute at least two layers of a tree-like organizational structure, enabling hierarchical management of applications. That is, applications under the first base and the second base can be managed through the first base, and applications under the second base can be managed through the second base, rather than one base managing all applications. This reduces the number of applications managed by each base, saving management time for each base and thus reducing the management cost of the application management system.
[0038] In some embodiments, the application may be a sub-application unit in a page to be loaded, and the first base may be a base application used to manage applications mounted on the first base.
[0039] Understandably, when loading a page, the page to be loaded can be viewed as a large application or a large system. Figure 3 This is a schematic diagram illustrating the decomposition of a large application into sub-application units, as provided in an embodiment of this application. Figure 3 As shown, large applications can be broken down into multiple applications; that is, the page to be loaded is loaded by loading multiple applications corresponding to the page to be loaded, thereby presenting the page to the user.
[0040] In some embodiments, a Single-SPA framework can be used to load pages. When using a Single-SPA framework to load pages, the application can be a sub-application unit in the Single-SPA framework, and the first base can be a parent base application or a sub-base application in the Single-SPA framework. The parent base can listen for changes in the Universal Resource Locator (URL) in the browser to load the sub-bases and / or sub-applications that need to be loaded, so as to load the page to be loaded. Steps 1301 to 1308 in the following embodiments describe the detailed process of page loading for reference, and will not be repeated here.
[0041] In some embodiments, the tree-like organizational structure generated after mounting can be understood as the Document Object Model (DOM) tree required for page loading.
[0042] In some embodiments, after generating a tree-like organizational structure, the applications to be loaded in the tree-like organizational structure are determined, and the applications to be rendered are rendered by loading a base that mounts the applications to be rendered.
[0043] In some embodiments, the application to be loaded or rendered can be determined based on the URL mapping route in the browser address bar and the activation route of each application.
[0044] In some embodiments, when the base on which the application to be rendered is mounted is a parent base, the application to be rendered is rendered by loading the base on which the application to be rendered is mounted.
[0045] In some embodiments, the mother base is the root node.
[0046] In some embodiments, when the base on which the application to be rendered is mounted is not the parent base, the application is rendered by sequentially loading the parent base onto each base along the path of the application to be rendered.
[0047] In some embodiments, the application may be application software (App); the App includes at least a login App, a menu App, and a configuration center App, etc.
[0048] In the embodiments of this application, the application may also be described as a sub-application or a sub-application unit, etc. The name of the application in the embodiments of this application is not limited.
[0049] In this application embodiment, the base can be described as a base application, and the name of the base is not limited in this application embodiment.
[0050] In some embodiments, the first base may be the root node of the tree-like organizational structure or any child node of the tree-like organizational structure.
[0051] In some embodiments, the second base is a child node of the first base.
[0052] In some embodiments, the application is the leaf node of the tree-like organizational structure.
[0053] In some embodiments, each base on the path from the parent base to the application to be rendered can also be understood as each child node on the path from the root node to the leaf node corresponding to the application to be rendered in a tree-like organizational structure.
[0054] In some embodiments, the base and the applications mounted on the base can constitute a subtree of the base, and the applications in each subtree have the same business type.
[0055] It should be noted that, Figure 2The content described herein is merely an example of a tree-like organizational structure. Since the first base can be a root node or any child node, theoretically, the tree structure can have an infinite number of levels.
[0056] In some embodiments, the tree-like organizational structure has N levels; N is greater than or equal to 2.
[0057] In some embodiments, the number of layers in the tree structure is counted from the layer below the root node, that is, the first layer child node is the child node attached to the root node; the tree structure has N levels, that is, the (N-1)th layer child node of the tree structure has leaf nodes and / or the Nth layer child node attached to it.
[0058] In some embodiments, an application can be mounted on the base by registering the application under the base.
[0059] In step 101, the prerequisite for mounting the application onto the first base is to first create the first base.
[0060] In step 102, if the number of applications mounted on the first base meets the first condition, a second base is mounted on the first base. That is, if the number of applications mounted on the first base meets the first condition, a second base is first created under the first base, and then the second base is mounted on the first base.
[0061] In some embodiments, a second base may be mounted on the first base even if the first quantity does not meet the first condition; for example, if the first condition is that the number of applications mounted on the first base is greater than 8, then a second base may be mounted on the first base even if the number of applications mounted on the first base is less than or equal to 8.
[0062] In some embodiments, any application is provided with identification information to characterize the location of the application; any base is provided with identification information to characterize the location of the base.
[0063] In some embodiments, the identification information of any application is determined at least according to the hierarchy of the application; the identification information of any base is determined at least according to the hierarchy of the base.
[0064] In some embodiments, the application hierarchy can be understood as the number of layers of the leaf node corresponding to the application in the tree structure; the base hierarchy can be understood as the number of layers of the child node corresponding to the base in the tree structure.
[0065] In some embodiments, the identification information of any application is determined based on the hierarchy of any application and the identification information of the base on which the application is mounted; the identification information of any base is determined based on the hierarchy of any base and the identification information of the base on which the base is mounted.
[0066] Understandably, when mounting any of the aforementioned base stations or applications, it is necessary to set an identification information for them. Furthermore, after mounting is complete, the base station mounting either the base station or the application will also transmit its own identification information to the respective base station and application. The identification information of the base station serving as the root node is pre-set and fixed according to actual needs.
[0067] In some embodiments, the identification information may be a string. The string consists of at least numbers, letters, and symbols.
[0068] In some embodiments, the string is a hash string.
[0069] In some embodiments, the numbers in the identification information of nodes at the same layer are different, and the numbers in the identification information of nodes at the same layer can be set according to the mounting order of the nodes. The nodes include leaf nodes and child nodes.
[0070] In some embodiments, the string length of the identification information of the k-th layer child node is greater than the string length of the (k-1)-th layer child node it is attached to; the string of the identification information of the k-th layer child node includes the content of the string of the (k-1)-th layer child node it is attached to. k is greater than 1 and less than N.
[0071] For example, Figure 4 This is a schematic diagram illustrating the setting of base identification information provided in an embodiment of this application; as shown. Figure 4 As shown, the identification information CLUSTER_MICRO_IDENTIFY of the base at the root node is master_key. Three first-level child nodes are mounted on the root node. The identification information of the three first-level child nodes are app1_key, app2_key and app3_key respectively. The identification information of the second-level child nodes mounted on app1_key are app11_key, app12_key and app13_key respectively. Figure 4 The global variable IS_CLUSTER_MICRO_APP is set to true to indicate that identification information has been detected.
[0072] Understandably, the identification information of any application is determined based on the application's hierarchy and the identification information of the base on which the application is mounted; the identification information of any base is determined based on the base's hierarchy and the base's identification information. In other words, the identification information of any node is determined based on the identification information of the node on which it is mounted, i.e., the parent node of any node, and the number of layers of any node. Thus, it is easier to locate applications in the organizational structure when loading leaf nodes or applications.
[0073] In some embodiments, a base on which any base is mounted may be called the parent base of any base, and correspondingly, any base is the child base of the base; a node on which any node is mounted may be called the parent node of any node, and correspondingly, the any node is the child node of the node.
[0074] This application embodiment further provides an application management method. Figure 5 This is a schematic diagram illustrating the implementation process of the application management method provided in the embodiments of this application, such as... Figure 5 As shown, the method may include the following steps 501 to 509:
[0075] Step 501: Mount the application to the first base;
[0076] Step 502: If the number of applications mounted on the first base meets the first condition, output a reminder message, wherein the reminder message is used to prompt the mounting of the second base on the first base.
[0077] In some embodiments, the reminder information is used to prompt the creation of the second base to mount the second base on the first base.
[0078] In some embodiments, the first condition includes the number of applications mounted on the first base being greater than or equal to a first threshold.
[0079] In some embodiments, the first threshold may be preset according to actual needs.
[0080] In some embodiments, the first threshold includes a cognitive recommendation threshold determined at least according to the Sperling memory capacity theory.
[0081] In some embodiments, the cognitive suggestion threshold is determined by a first value and at least one second value based on the Sperling memory capacity theory; the second value may be a subjective suggestion value determined by managers of the hierarchical organizational structure or application based on historical experience and / or the Sperling memory capacity theory. The managers include key technical personnel from R&D and operations teams.
[0082] Understandably, a tree-like organizational structure allows managers to conserve mental energy when managing applications. Sperling's partial report method in psychology, based on memory capacity theory, suggests that a tree structure with nine items per layer has a greater optimization capacity for memory and comprehension. However, the readability and maintainability of the tree structure gradually deteriorate when there are more than ten sub-items in a directory, more than ten shared data variables in a file, or more than ten parameters in a method. Based on this memory capacity theory, the first value is set to a value greater than or equal to nine; for example, the first value is 12.
[0083] In some embodiments, the method for determining the cognitive suggestion threshold includes steps 5021 to 5024 (not shown in the figures):
[0084] Step 5021: Obtain j second values; j is greater than 1.
[0085] In some embodiments, the j second values are the subjective suggestion values of j managers in a hierarchical organizational structure, and the j second values are X1, X2, ..., X... j .
[0086] Step 5022: Calculate the deviation between each of the j second values and the first value, and calculate the sum of the deviations between each second value and the first value.
[0087] In some embodiments, the deviation RSDX between the m-th second value and the first value m =X m -Y; m is greater than 0 and not greater than j. The sum of deviations and RSD = RSDX1 + RSDX2 + ... + RSDX j .
[0088] Step 5023: Calculate the deviation weight of each of the j second values.
[0089] In some embodiments, the deviation weight of the m-th second value is PX. m PX m The calculation method is shown in the following formula (1):
[0090]
[0091] Step 5024: Determine the cognitive suggestion threshold based on each second value and the deviation weight corresponding to each second value.
[0092] In some embodiments, the cognitive suggestion threshold T is determined as shown in equation (2):
[0093] T = (X1 * PX1) + (X2 * PX2) + ... + (X j *PX j (2);
[0094] Step 503: Receive a first instruction, the first instruction being used to instruct the second base to be mounted on the first base;
[0095] Step 504: In response to the first instruction, mount the second base on the first base.
[0096] In some embodiments, mounting the second base on the first base can be done by directly mounting the second base on the first base, or by uninstalling one or more applications mounted on the first base before mounting the second base on the first base.
[0097] Step 505: Mount at least one unmounted application to the second base.
[0098] In some embodiments, the at least one unmounted application includes one or more applications that were uninstalled in the previous step.
[0099] In some embodiments, the identification information of any base is stored in the base mounted on any base, and the identification information of any base is also stored in the application mounted on any base.
[0100] In some embodiments, when all the bases mounted on any base and the applications mounted on any base are uninstalled, the base can be identified based on the identification information of the base stored in the bases mounted on the base; or, the base can be identified based on the identification information of the base stored in the applications mounted on the base; then the base mounted on any base or the applications mounted on any base send an uninstallation notification to the base so that the base destroys itself.
[0101] In some embodiments, after an application is uninstalled, the leaf node corresponding to the application is empty, and the leaf node will notify its parent node to delete the leaf node's identification information on the Windows object; correspondingly, when a new leaf node is mounted, new identification information will also be set for the new leaf node.
[0102] In some embodiments, after all the bases mounted on any base and the applications mounted on any base are uninstalled, and the nodes under any base are empty, the nodes under any base will destroy themselves through any base and delete the identification information of any base on the Windows object.
[0103] Step 506: If the number of applications mounted on the second base meets the second condition, mount the third base on the first base.
[0104] In some embodiments, if any base station has a number of applications mounted on it that is greater than or equal to a first threshold, it will output a reminder message to prompt that a base station be mounted on the base station. Accordingly, any base station will receive an instruction to mount a base station on the base station, or receive an instruction to continue mounting applications on the base station, and thus perform corresponding operations according to the received instructions.
[0105] It should be noted that, unless otherwise specified, any base involved in the embodiments of this application includes, but is not limited to, a first base, any base mounted on the first base, a second base, any base mounted on the second base, a third base, any base mounted on the third base, a fourth base, any base mounted on the fourth base, and any base mounted on any base; any application involved in the embodiments of this application includes, but is not limited to, any application mounted on any base.
[0106] In some embodiments, the second condition includes the number of applications mounted on the second base being equal to the full load capacity of the second base.
[0107] In some embodiments, the full load capacity refers to the maximum number of applications that the second base can support under normal operating conditions; it is understood that if the number of applications supported on the second base exceeds the full load capacity, the second base may fail to operate.
[0108] In some embodiments, when the number of applications mounted on the second base is equal to the full load capacity of the second base, one application mounted on the first base can be unmounted first, and then the third base can be mounted on the first base before at least one unmounted application is mounted on the third base; wherein, at least one unmounted application includes the unmounted application.
[0109] Figure 6 This application provides a schematic diagram of a process for generating a tree-like organizational structure, as shown in the embodiments of this application. Figure 6 As shown, after the number of applications mounted on the second base reaches the first threshold or the full load, another application app11 on the first base is uninstalled, and the third base is mounted on the first base so that the unmounted applications app11 to app34 can be mounted on the third base.
[0110] In some embodiments, after the number of applications on the third base reaches the first threshold or the full load, another application on the first base can be unloaded, and another base can be mounted on the first base to mount the unmounted application on the other base. This process continues until the number of bases mounted on the first base meets the third condition, and then step 507 is executed.
[0111] Step 507: If the number of bases mounted on the first base meets the third condition, unload one application from one of the bases mounted on the first base.
[0112] In some embodiments, the third condition includes the number of bases mounted on the first base being a third threshold.
[0113] In some embodiments, the number of third thresholds is not limited. For example, the third threshold is less than or equal to the first threshold; or, the third threshold is less than or equal to the second threshold; or, the third threshold is less than or equal to the full load number of the first base.
[0114] In some embodiments, the login app, the menu app, and the configuration center app used to set identification information for the base and applications are attached to the root node or the parent base and cannot be uninstalled.
[0115] In some embodiments, when the first base is the root node, the third threshold is less than the first threshold, or the third threshold is less than the full load quantity; when the first base is a child node, the third threshold may be equal to the first threshold or less than the full load quantity.
[0116] Step 508: Mount the fourth base onto the first base.
[0117] In some embodiments, one of the bases in step 508 may be any one of the bases mounted on the fourth base.
[0118] Step 509: Mount at least one unmounted application to the fourth base.
[0119] This application provides a schematic diagram of a tree-like organizational structure. Figure 7 This is a schematic diagram of the tree-like organizational structure provided in the embodiments of this application, such as... Figure 7 As shown, when the number of bases mounted on the first base meets the third condition, after unloading an application from the second base mounted on the first base, the fourth base is mounted on the second base to mount the unmounted application.
[0120] This application provides an application management method. Figure 8 This is a schematic diagram illustrating the implementation process of the application management method provided in the embodiments of this application, such as... Figure 8 As shown, the method may include the following steps 801 to 808:
[0121] Step 801: Mount the application to the first base;
[0122] Step 802: If the number of applications mounted on the first base meets the first condition, output a reminder message, wherein the reminder message is used to prompt the mounting of the second base on the first base;
[0123] Step 803, receive a second instruction; the second instruction is used to indicate that the second base should not be mounted on the first base;
[0124] Step 804: In response to the second instruction, at least one unmounted application is continued to be mounted to the first base;
[0125] Step 805: When the number of applications mounted on the first base is greater than or equal to the second threshold, mount the second base on the first base; wherein the second threshold is greater than the first threshold.
[0126] In some embodiments, the second threshold is equal to the full load quantity;
[0127] In some embodiments, the second threshold and the first threshold are less than the full load quantity;
[0128] In some embodiments, the second threshold may be preset according to actual needs. For example, the second threshold includes an upper limit mandatory threshold, the ratio of which to the cognitive suggestion threshold is the golden ratio of 1.618.
[0129] In some embodiments, the first threshold, the second threshold, and the number of fully loaded bases are all integers.
[0130] Step 806: If the number of applications mounted on the second base satisfies the second condition and the sum of the number of applications mounted on the first base and the number of bases is equal to the full load of the first base, unload one application mounted on the first base.
[0131] Step 807: Mount the third base on the first base;
[0132] Step 808: Mount at least one unmounted application to the third base.
[0133] This application relates to the field of computer application technology and web front-end development, and relates to a self-governing web front-end framework method, system, device and storage medium for addressing the architecture, development and governance of ultra-large web front-end applications (an example of a large application).
[0134] In some embodiments, in ultra-large front-end applications, "ultra-large" includes two dimensions: one is large size, and the other is high complexity, which may result in a large "cognitive load".
[0135] In some embodiments, when dealing with very large-scale web front-end applications, the architecture design aims to address the issue of leveraging technology to increase the manageability, stability, and scalability of the project, while also maximizing output efficiency and, if possible, assisting in the measurement of output results.
[0136] In some embodiments, the architecture evolves as requirements change. When faced with an unknown application, if the scale of the problem is uncertain, it is not very meaningful to do a detailed architectural design from the beginning.
[0137] The ultra-large web application provided in this application refers to an application that is ultra-large in size.
[0138] In some embodiments, a monolithic application refers to an application whose front-end code is maintained in a single repository and ultimately released uniformly.
[0139] In some embodiments, the conventional approach to the evolution of large systems is to assemble multiple subsystems, thereby reducing the coupling between the management personnel and business functions of the system through various means.
[0140] In some embodiments, micro-frontend technology is implemented based on frameworks such as Single-SPA and Qiankun.
[0141] In some embodiments, iterative development and maintenance of monolithic applications are difficult, and version control of module functions is not easy.
[0142] In some embodiments, complex large systems are composed of many subsystems pieced together, which leads to chaotic management, difficulty in forming standards, or a lack of integrity. The way these systems are "pieced together" also reduces the user experience.
[0143] In some embodiments, certain micro-frontend implementations become difficult to manage once they reach a certain scale. On the one hand, once the project stabilizes, developer input decreases, while management personnel have limited cognitive abilities, making it difficult to cope with the complex application structure with limited resources. On the other hand, some micro-frontend configuration centers follow a "one base, multiple micro-applications" model, where the granularity of micro-application splitting is small, and the number of micro-applications has a significant impact on the management results. During the development and later maintenance phases, micro-applications are arbitrarily added to the application system, making management difficult.
[0144] The application management method provided in this application, when dealing with ultra-large front-end applications, adopts a micro-frontend approach to optimize the management of micro-applications, optimize the traditional configuration center, and reasonably suggest micro-application registration methods based on the cognitive abilities of management personnel. On the one hand, it reduces the "cognitive load" of management personnel, enabling them to quickly understand the application system architecture with limited resources; on the other hand, it optimizes the configuration registration method, making micro-application registration more "orderly" and improving governance during the development and later maintenance phases.
[0145] This application provides an architecture for ultra-large front-end applications, which is used to reasonably split and organize sub-applications, so that developers have a better experience during the development and maintenance phases.
[0146] In some embodiments, "ultra-large" in ultra-large front-end applications encompasses two dimensions: large size and high complexity. Large size necessitates breaking down the ultra-large front-end application; high complexity requires reasonable breakdown to reduce the cognitive load on developers. After breakdown, the resulting structures are aggregated and ultimately presented to the user as a whole.
[0147] In some embodiments, microservices and micro-frontend architectures follow a base + micro-application model. Based on the pyramid principle's description of "vertical: top-down, categorized and grouped" and "horizontal: no repetition, no omission," a tree-like structure is used to construct cognitive goals, summarizing the logical connections of the system, which is more conducive to memory and understanding. Most knowledge is organized in a tree structure, which can save energy consumed by memory. For memory and understanding, a tree structure is essentially the processing of visual memory (or sensory memory).
[0148] In some embodiments, according to Sperling’s partial reporting method, the capacity of the image memory is at least 9 items or more. Compared with disorganized content, it has a greater optimization for memory and comprehension. When designing systems or developing applications, a good hierarchical structure is more conducive to understanding. For example, if a code repository has a large number of files, more than 10 sub-items in a certain directory, more than 10 shared data variables in a certain file, and more than 10 parameters in a certain method, the readability and maintainability will be poor.
[0149] In some embodiments, a large number of sub-goals can negatively impact cognitive efficiency. Therefore, these sub-goals should be further layered to form a subtree. This process essentially transforms disordered and chaotic content into a tree-like organizational structure suitable for cognition. Figure 9 This application provides a schematic diagram of a B+ tree structure. The human brain's information processing is not the same as a computer's, and memory and comprehension involve deletion and distortion; the larger and more chaotic the information, the more detrimental it is to memory and comprehension. To facilitate brain memory and comprehension, the information structure should not be too wide horizontally or too deep vertically.Figure 9 The B+ tree shown conforms to this structure.
[0150] In some embodiments, the depth of the B+ tree is 3 (excluding the root node), which can maintain 9*9*9=729 records, that is, it can maintain 729 sub-applications, which is at the level of tens of millions of lines of code, enough to maintain the vast majority of application systems.
[0151] In some embodiments, 9 is the number of image memory capacity items discovered by Sperling using the partial report method, which varies depending on individual cognitive abilities. This value will be referred to as the "cognitive threshold" in the following text.
[0152] In some embodiments, micro-frontend technology is used, and the frontend architecture is organized using a tree structure.
[0153] In some embodiments, each front-end application (an example of an application) is treated as a unit with three main lifecycles: mounting, starting, and unmounting, and each application can be started independently; the ultra-large application is reasonably decomposed into multiple sub-application units, and the code size of a single sub-application corresponding to a business module is 10,000 to 50,000 lines.
[0154] In some embodiments, all applications decomposed from a large application (an example of a large application) can be set as a base application and a regular application (an example of an application), and the base application can mount the base application and the regular application.
[0155] In some embodiments, all applications decomposed from a large application (an example of a large application) have their lifecycles exported as micro-applications. The main lifecycles are initialization, mounting, and unmounting, and other lifecycles can be exported as needed.
[0156] In some embodiments, the base is a base application that acts as a parent base to aggregate the entire application system. By mounting the base application and regular applications, a tree-like organizational structure is ultimately formed (an example of a tree-like organizational structure). The parent base application serves as the mounting entry point for the application system and is also the root node of the application organizational structure tree (an example of a tree-like organizational structure).
[0157] In some embodiments, the root node of each subtree is a base application with its own unique identifier (an example of identification information) for the identification of the sub-applications attached to it. Each subtree corresponds to a type of subsystem, which facilitates understanding, cognition and later maintenance.
[0158] In some embodiments, a cognitive threshold recommendation is set to suggest limits on the number of applications managed by each base application. Based on the memory capacity conclusion of the Sperling partial reporting method (memory capacity is at least 9 items, with 12 as a baseline value; on the one hand, 12 means "a dozen," and on the other hand, applications can be categorized and grouped according to specific business needs; for example, a system divided into 9 or more modules obviously exceeds 9 memory capacity), and combined with the suggestions of approximately 3 core members of the project team, a corresponding threshold is set (an example of a second value): Based on three sets of subjective suggestion values (an example of a second value), the deviation and sum of deviations are calculated based on 12 (an example of a first value). Then, the weights are determined according to the deviations (the larger the deviation, the smaller the weight). Finally, the final suggested threshold is calculated based on the weights (an example of a cognitive suggestion threshold). The mandatory threshold (an example of an upper limit mandatory threshold) is determined using the golden ratio as a coefficient, rounded to the nearest integer. Based on the project and personnel (an example of management personnel), an upper limit suggested value T (an example of a cognitive suggestion threshold) and an upper limit mandatory value H (an example of an upper limit mandatory threshold) are set for the number of sub-applications mounted on each base application.
[0159] In some embodiments, a unified and aggregated configuration center is used to register and manage the relationships between the parent base (an example of a root node), ordinary bases (an example of child nodes), and ordinary applications (an example of applications);
[0160] In some embodiments, the created registration configuration center (an example of a configuration center) is used to register and mount the sub-application units of the solution onto the parent base one by one.
[0161] In some embodiments, if the number of applications mounted on the parent base does not exceed the upper limit suggested value T (an example of an upper limit mandatory threshold) during the registration process, the applications will be mounted normally on the parent base.
[0162] In some embodiments, if the number of applications mounted on the parent base exceeds the upper limit recommended value T (an example of an upper limit mandatory threshold), feedback is given to the user (an example of sending a reminder message to the administrator), prompting the user to adjust the organizational structure and suggesting that the base be mounted under the parent base first, and then new applications be mounted based on the mounted base.
[0163] In some embodiments, if the number of applications mounted on the mother base exceeds the upper limit forced value H, the applications will be mounted on the bases mounted on the mother base.
[0164] In some embodiments, the bases mounted on the mother base form a subtree structure, with the base being the root of the subtree;
[0165] In some embodiments, the remaining decomposed sub-applications continue to be mounted. The total number of bases and sub-applications mounted on each base must not exceed the corresponding threshold (an example of a first threshold or a second threshold). Otherwise, new bases need to be created to form a subtree. The newly created bases are automatically completed and started by the system. Until all sub-applications are mounted, the system's applications form a complete tree (an example of a tree-like organizational structure).
[0166] In some embodiments, as the system is updated and iterated, the tree-like organizational structure can be adjusted accordingly. If a new sub-application is added, the mounting process can continue.
[0167] In some embodiments, when registering relationships between applications, suggestions are made based on a set cognitive threshold. If the cognitive threshold is exceeded, feedback is given to the user (an example of an administrator), and the final decision rests with the user (an example of an administrator), but the mandatory upper limit threshold must not be exceeded.
[0168] In some embodiments, an aggregated menu registration module is established according to the actual needs of the system to manage the menu structure of the entire system and the access control of the menu. Each menu needs to specify its sub-application and parent menu, and finally realize the presentation layer presented to the user (the menu presentation structure is different from the logical structure of the application organization).
[0169] In some embodiments, after completing application registration and menu registration management, the organizational structure and presentation layer framework of the entire system are basically determined.
[0170] In some embodiments, as requirements evolve, new sub-applications are added to the system. If a sub-application is deleted and a subtree does not have a leaf node, the leaf node is removed from the registration information and the base corresponding to the leaf node is stopped.
[0171] The methods, systems, and frameworks provided in this application are based on the Single SPA framework. They incorporate cognitive theories and cognitive threshold suggestions from management personnel to balance the cognitive complexity of the software development and maintenance phases. They decompose ultra-large applications into dozens or even hundreds of sub-applications and structure them into a tree structure, enabling management personnel to complete development iterations and maintenance work as efficiently as possible while ensuring that they can cope with cognitive complexity.
[0172] This application provides an application management method. Figure 10 This is a schematic diagram illustrating the implementation process of the application management method provided in the embodiments of this application, such as... Figure 10 As shown, the method may include the following steps 1001 to 1007:
[0173] Step 1001: Decompose the large application (an example of a large application) into multiple sub-application units.
[0174] In some embodiments, the login (an example of a login app) and menu module (an example of a menu app) can be set as separate sub-applications, while other specific business modules are divided according to the actual situation.
[0175] Step 1002: Export the lifecycle of all sub-applications as micro-applications.
[0176] In some embodiments, the lifecycle includes at least: bootstrap, mounted, and unmounted. When an application detects that it is accessing as a micro-application, it performs initialization, mounting, and unmounting according to the instructions of the base application; if it is not detected, the initialization and loading logic runs independently. Figure 11 This is a schematic diagram of the micro-application modification and loading logic provided in the embodiments of this application.
[0177] In some embodiments, the application loading logic can be implemented through steps 1101 to 1105 of the following embodiments.
[0178] Step 1003: Design a base template for easy creation of base applications, which are used to mount base applications and regular micro-applications (an example of an application).
[0179] In some embodiments, each base application has a unique identifier (an example of identification information) (a fixed hash string unique identifier) for being identified by its attached child nodes, and this identifier is used for routing and navigation interactions.
[0180] In some embodiments, the hash string identifier of the parent base is manually generated and remains unchanged.
[0181] In some embodiments, when a base application mounts a child node (base or child application), it passes a hash string as an identifier to the child node as a parameter.
[0182] In some embodiments, the child node needs to make a judgment. If it is loaded and run independently, it will execute the loading and rendering logic itself. If it is detected that it is loaded using a base, the global variable IS_CLUSTER_MICRO_APP is marked as true on the window. In addition, the CLUSTER_MICRO_IDENTIFY field is assigned a value on the window object, starting from the parent base and assigning values in sequence according to the hierarchy. For example, the unique identifier of the parent base is placed on the root of CLUSTER_MICRO_IDENTIFY. The unique identifier of the child base attached to the parent base needs to create a CHILDREN field on CLUSTER_MICRO_IDENTIFY. Before storing the child base identifier, it needs to be looked up according to the identifier of the parent node, and then set after it is located.
[0183] In some embodiments, when a child application is uninstalled, the corresponding value is updated by the base where its parent node is located after the uninstallation is detected.
[0184] In some embodiments, when all sub-applications under a certain base are uninstalled, the base executes its own uninstallation method and destroys itself, and the parent of the base (an example of a base that mounts the base) performs the corresponding listening process.
[0185] Step 1004: Create a parent base application using the base template, which serves as the entry point for the entire system (an example of the system in which the application resides);
[0186] Step 1005: Create a sub-application as a configuration center to manage the organizational structure of the sub-applications (an example of a tree-like organizational structure);
[0187] Step 1006: Apply the final creation cognitive threshold configuration function in the configuration center to configure the cognitive threshold.
[0188] Assuming the second values are 12, 15, and 20, and the first value is 12, the upper limit recommended value for the number of nodes mounted on each base application (an example of a cognitive recommendation threshold) is calculated to be T = 14, and the upper limit mandatory threshold is H = 23.
[0189] Step 1007: Using the configuration function, manage sub-applications and register them one by one to mount the sub-application (an example of at least one unmounted application) onto the parent base application.
[0190] In some embodiments, the mounting of each sub-application can be achieved through the following steps 1071 to 1078 (not shown in the figure):
[0191] Step 1071: Under the mother base (an example of the first base), register the application;
[0192] Step 1702: Without exceeding the upper limit of the recommended value (the cognitive recommended threshold), mount the login sub-application, configuration center sub-application, menu sub-application, and sub-applications APP1 to APP11 respectively;
[0193] Step 1703: When registering APP12, the upper limit (an example of a cognitive suggestion threshold) is reached, and the administrator is prompted to mount the remaining unloaded applications using a base.
[0194] Step 1704: If the administrator chooses to continue mounting the base and does not adopt the system's suggestion, the maximum number of registered applications is APP21. The remaining sub-applications cannot be mounted and a new base must be created (an example of a second base). Then proceed to step 1705.
[0195] Step 1705: Create Subbase 1 (an example of a second base). At this point, you are prompted that you can reorganize APP1 to APP11 (an example of an application mounted on the first base) and mount them under Subbase 1 (an example of a second base). You can set it up according to your needs. Subbase 1 (an example of a second base) and its mounted nodes (an example of an application mounted on the second base) form a subtree.
[0196] Step 1706: Register the remaining sub-applications one by one. Within the threshold range, the organizational structure is automatically adjusted according to the suggested values, and finally a complete tree is generated.
[0197] Step 1708: Maintain the menu structure within the menu sub-application. This menu structure, as the business structure presented to the user, can differ from the application's overall logical structure. The final result will then be the displayed presentation. Figure 12 This is a schematic diagram of the organizational structure after application registration is completed, as provided in the embodiments of this application.
[0198] like Figure 11 As shown, the application loading logic flow can be implemented through steps 1101 and 1105 of the following embodiments.
[0199] Step 1101, Begin;
[0200] Step 1102: Determine whether the application is loaded as a micro-frontend; if yes, proceed to step 1103; otherwise, proceed to step 1105.
[0201] Step 1103: The base application (the base of the mounted application) calls the mounted method;
[0202] Step 1104: The mounted method calls its own defined render method to load the data.
[0203] Step 1105: The application executes the render method and runs independently.
[0204] This application provides a page loading method. Figure 13 This is a schematic diagram illustrating the implementation process of the page loading method provided in the embodiments of this application, as follows: Figure 13 As shown, the method may include the following steps 1301 to 1310:
[0205] Step 1301: The parent base listens for URL changes;
[0206] Step 1302: The parent base obtains the application registry and menu registry;
[0207] Step 1303: The parent base determines whether the sub-application to be routed is mounted on the parent base based on the application registry and menu registry. If yes, proceed to step 1304; otherwise, proceed to step 1306.
[0208] Step 1304: The parent base performs route distribution based on the application registry and locates the specified sub-application (an example of a sub-application to be routed).
[0209] Understandably, the application registry contains distribution rules or activation routes for each node in the tree-like organizational structure. These distribution rules are matched against routes mapped to browser URLs. If a match is found, the matching node is loaded. If this node is a base node, the registry for that level is passed on to the next node until a sub-application is located.
[0210] Step 1305: The sub-application loads and renders according to the instructions of the base application; then step 1308 is executed.
[0211] Step 1306: Locate the specified sub-application by locating the corresponding sub-base (an example of mounting a specified sub-application);
[0212] Step 1307: Render the sub-application by sequentially loading each base on the path from the parent base to the sub-application.
[0213] In some embodiments, when a base loads another base or application mounted on the base, it needs to pass its own identifier to the other base or application.
[0214] Step 1308, Sub-application rendering;
[0215] Step 1309: The child application sends a destruction notification to the parent base.
[0216] Step 1310: The child base sends a destruction notification to the parent base.
[0217] This application uses a tree-like organizational structure to aggregate sub-applications; implements a base template to ensure the uniqueness of each subtree's identification and loading; and sets cognitive threshold suggestions to avoid governance difficulties caused by iterative requirements.
[0218] The application management method provided in this application includes the implementation logic of a base template, which can be used to mount base applications and ordinary sub-applications; new bases can be automatically generated and launched as needed for hierarchical mounting of sub-applications; cognitive threshold suggestions are introduced to guide managers to optimize the overall organizational structure; the tree structure is more conducive to dealing with the complexity of the architecture, and the hierarchical structure solves the governance problems of large systems.
[0219] The embodiments of this application use a tree structure to organize and aggregate multiple sub-applications, and limit the number of each group of sub-applications with a cognitive threshold, which is more in line with the manager's understanding of the complexity of the architecture and solves the problem of maintenance and governance of ultra-large application systems.
[0220] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0221] It should be noted that although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps; or steps from different embodiments may be combined into a new technical solution.
[0222] Based on the foregoing embodiments, this application provides an application management device, which includes various modules and units included in each module, and can be implemented by a processor; of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), microprocessor (MPU), digital signal processor (DSP) or field programmable gate array (FPGA), etc.
[0223] Figure 14 This is a schematic diagram of the structure of the application management device provided in the embodiments of this application, such as... Figure 14 As shown, the application management device 140 includes a mounting module 1401, wherein:
[0224] Mounting module 1401 is used to mount the application to the first base;
[0225] Mounting module 1401 is also used to mount a second base on the first base when the number of applications mounted on the first base meets a first condition;
[0226] Mounting module 1401 is also used to mount at least one unmounted application to the second base.
[0227] In some embodiments, the mounting module 1401 is further configured to mount a third base on the first base when the number of applications mounted on the second base meets a second condition; and to mount at least one unmounted application to the third base.
[0228] In some embodiments, the application management device 140 further includes an unloading module, which is used to unload an application mounted on the first base when the sum of the number of applications mounted on the first base and the number of bases is equal to the full load of the first base; the mounting module 1401 is used to mount the third base on the first base; and mount at least one unmounted application to the third base.
[0229] In some embodiments, the unloading module is further configured to unload one application from any of the bases mounted on the first base when the number of bases mounted on the first base meets a third condition; the mounting module 1401 is further configured to mount a fourth base on any of the bases; and mount at least one unmounted application on the fourth base.
[0230] In some embodiments, the first condition includes the number of applications mounted on the first base being greater than or equal to a first threshold; the application management device 140 further includes an output module and a receiving module, the output module being configured to output a reminder message when the number of applications mounted on the first base meets the first condition; wherein the reminder message is used to prompt the mounting of the second base on the first base; the receiving module being configured to receive a first instruction; the first instruction is used to instruct the mounting of the second base on the first base; the mounting module 1401 is configured to mount the second base on the first base in response to the first instruction.
[0231] In some embodiments, the receiving module is further configured to receive a second instruction; the second instruction is configured to indicate that the second base should not be mounted on the first base; the mounting module 1401 is configured to, in response to the second instruction, continue to mount at least one unmounted application to the first base; and mount the second base on the first base when the number of applications mounted on the first base is greater than or equal to a second threshold; wherein the second threshold is greater than the first threshold.
[0232] In some embodiments, the first threshold includes a cognitive suggestion threshold determined at least according to the Sperling memory capacity theory; the second threshold includes an upper limit mandatory threshold, the ratio of the upper limit mandatory threshold to the cognitive suggestion threshold being the golden ratio.
[0233] In some embodiments, the first base is a root node; or, the first base is a child node.
[0234] In some embodiments, any application is provided with identification information for characterizing the location of the application; any base is provided with identification information for characterizing the location of the base; wherein, the identification information of the application is determined at least according to the hierarchy of the application; and the identification information of the base is determined at least according to the hierarchy of the base.
[0235] In some embodiments, the base mounted on any base and the application mounted on any base store identification information of any base; the mounting device 140 further includes a determining module and a sending module; the determining module is used to determine any base based on the identification information of any base stored in the base mounted on any base when all the base mounted on any base and the application mounted on any base are uninstalled; or, to determine any base based on the identification information of any base stored in the application mounted on any base; the sending module is used to send an uninstallation notification to any base so that any base destroys itself.
[0236] In some embodiments, the determining module is further configured to determine the application to be rendered; the application management device 140 further includes a rendering module, which is configured to render and present the application to be rendered.
[0237] In some embodiments, the rendering module is configured to render the application to be rendered by loading the base on which the application to be rendered is mounted, when the base on which the application to be rendered is mounted is a parent base.
[0238] When the base on which the application to be rendered is mounted is not the parent base, the application is rendered by sequentially loading the parent base onto each base along the path of the application to be rendered.
[0239] The descriptions of the above device embodiments are similar to those of the above method embodiments, and have similar beneficial effects. For technical details not disclosed in the device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0240] It should be noted that, in the embodiments of this application... Figure 14The module division shown in the application management device is illustrative and represents only one logical functional division; in actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, exist as separate physical units, or be integrated into one unit by two or more units. The integrated units can be implemented in hardware, as software functional units, or a combination of both.
[0241] It should be noted that, in the embodiments of this application, if the above-described application management method is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a magnetic disk, or an optical disk. Thus, the embodiments of this application are not limited to any specific hardware and software combination.
[0242] This application provides an electronic device. Figure 15 This is a schematic diagram of the hardware entity of the electronic device according to an embodiment of this application, such as... Figure 15 As shown, the electronic device 150 includes a memory 1501 and a processor 1502. The memory 1501 stores a computer program that can run on the processor 1502. When the processor 1502 executes the program, it implements the steps in the method provided in the above embodiments.
[0243] It should be noted that the memory 1501 is configured to store instructions and applications executable by the processor 1502, and can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data, and video communication data) in the processor 1502 and various modules in the electronic device 150. It can be implemented by flash memory or random access memory (RAM).
[0244] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps in the application management method provided in the above embodiments.
[0245] This application provides a computer program product containing instructions that, when run on a computer, causes the computer to execute the steps in the application management method provided in the above-described method embodiments.
[0246] It should be noted that the descriptions of the storage medium and device embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage medium, storage medium, and device embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0247] It should be understood that the phrases "one embodiment," "an embodiment," or "some embodiments" mentioned throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above-described processes do not imply a sequential 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 this application. The sequence numbers of the above-described embodiments are merely for descriptive purposes and do not represent the superiority or inferiority of the embodiments. The descriptions of the various embodiments above tend to emphasize the differences between the various embodiments; their similarities or commonalities can be referred to mutually, and for the sake of brevity, they will not be repeated here.
[0248] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three kinds of relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist simultaneously, and object B exists alone.
[0249] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0250] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple modules or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or modules can be electrical, mechanical, or other forms.
[0251] The modules described above as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules. They may be located in one place or distributed across multiple network units. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.
[0252] In addition, each functional module in the various embodiments of this application can be integrated into one processing unit, or each module can be a separate unit, or two or more modules can be integrated into one unit; the integrated modules can be implemented in hardware or in the form of hardware plus software functional units.
[0253] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0254] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an electronic device to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0255] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0256] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0257] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.
[0258] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An application management method, characterized in that, The method includes: Mount the application to the first base; If the number of applications mounted on the first base meets the first condition, then mount the second base on the first base; Mount at least one unmounted application to the second base; The first condition includes the number of applications mounted on the first base being greater than or equal to a first threshold; the first threshold includes at least a cognitive suggestion threshold determined according to the Sperling memory capacity theory; When the number of applications mounted on the first base meets the first condition, mounting the second base on the first base includes: If the number of applications mounted on the first base meets the first condition, a reminder message is output; wherein, the reminder message is used to prompt the mounting of the second base on the first base; Receive a first instruction; the first instruction is used to instruct the mounting of the second base on the first base; In response to the first instruction, the second base is mounted on the first base.
2. The method according to claim 1, characterized in that, The method further includes: If the number of applications mounted on the second base meets the second condition, then a third base is mounted on the first base; Mount at least one unmounted application to the third base.
3. The method according to claim 2, characterized in that, The method further includes: If the sum of the number of applications mounted on the first base and the number of bases equals the full load capacity of the first base, unload one application mounted on the first base. The third base is mounted on the first base; Mount at least one unmounted application to the third base.
4. The method according to claim 2 or 3, characterized in that, The method further includes: If the number of bases mounted on the first base meets the third condition, unload one application from one of the bases mounted on the first base; The fourth base is mounted onto the first base; Mount at least one unmounted application to the fourth base.
5. The method according to claim 1, characterized in that, The method further includes: Receive a second instruction; the second instruction is used to indicate that the second base should not be mounted on the first base; In response to the second instruction, at least one application that is not currently mounted is still mounted to the first base. When the number of applications mounted on the first base is greater than or equal to the second threshold, the second base is mounted on the first base; wherein the second threshold is greater than the first threshold.
6. The method according to claim 5, characterized in that, The second threshold includes an upper limit mandatory threshold, the ratio of which to the cognitive suggestion threshold is the golden ratio.
7. The method according to any one of claims 1, 2, 3, 5, and 6, characterized in that, The first base is the root node; or, the first base is a child node.
8. The method according to any one of claims 1, 2, 3, 5, and 6, characterized in that, Each application is provided with identification information to characterize the location of the application; each base is provided with identification information to characterize the location of the base; wherein, the identification information of the application is determined at least according to the hierarchy of the application; the identification information of the base is determined at least according to the hierarchy of the base.
9. The method according to claim 8, characterized in that, The method further includes: The base mounted on any of the bases and the application mounted on any of the bases store the identification information of any of the bases; If all the bases mounted on any base and the applications mounted on any base are unloaded, the base is determined according to the identification information of the base stored in the bases mounted on any base, or the base is determined according to the identification information of the base stored in the applications mounted on any base. Send an unload notification to any of the base stations so that any of the base stations destroys itself.
10. The method according to any one of claims 1, 2, 3, 5, 6, and 9, characterized in that, The method further includes: Identify the application to be rendered; The application to be rendered is rendered by loading and mounting a base onto it.
11. The method according to claim 10, characterized in that, The process of rendering the application by loading and mounting its base includes: When the base on which the application to be rendered is mounted is a parent base, the application to be rendered is rendered by loading the base on which the application to be rendered is mounted. When the base on which the application to be rendered is mounted is not the parent base, the application is rendered by sequentially loading the parent base onto each base along the path of the application to be rendered.
12. An application management device, characterized in that, include: Mounting module, used to mount the application to the first base; The mounting module is further configured to mount a second base on the first base when the number of applications mounted on the first base meets a first condition; the first condition includes that the number of applications mounted on the first base is greater than or equal to a first threshold; the first threshold includes at least a cognitive suggestion threshold determined according to the Sperling memory capacity theory. The mounting module is also used to mount at least one unmounted application to the second base; An output module is configured to output a reminder message when the number of applications mounted on the first base meets the first condition; wherein the reminder message is used to prompt the mounting of the second base on the first base; A receiving module is configured to receive a first instruction; the first instruction is configured to instruct the mounting of the second base on the first base; The mounting module is also configured to mount the second base on the first base in response to the first instruction.
13. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Shutdown method and related product
CN108833669A
Management distribution method and device
CN112788134A