CN117032737A - Application uninstalling method, device, electronic equipment and readable storage medium - Google Patents
Application uninstalling method, device, electronic equipment and readable storage medium Download PDFInfo
- Publication number
- CN117032737A CN117032737A CN202311023527.1A CN202311023527A CN117032737A CN 117032737 A CN117032737 A CN 117032737A CN 202311023527 A CN202311023527 A CN 202311023527A CN 117032737 A CN117032737 A CN 117032737A
- Authority
- CN
- China
- Prior art keywords
- application
- sub
- cache file
- input
- base
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 238000000547 structure data Methods 0.000 claims abstract description 28
- 230000004044 response Effects 0.000 claims abstract description 13
- 238000012545 processing Methods 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 12
- 230000006870 function Effects 0.000 description 10
- 230000009471 action Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000000903 blocking effect Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 4
- 101100148256 Actinobacillus pleuropneumoniae apxIB gene Proteins 0.000 description 3
- 101150008617 appB gene Proteins 0.000 description 3
- 238000009877 rendering Methods 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000001815 facial effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/61—Installation
- G06F8/62—Uninstallation
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses an application unloading method, an application unloading device, electronic equipment and a readable storage medium, and belongs to the technical field of data processing. The method comprises the following steps: receiving a first input for switching by a first sub-application to another sub-application; in response to the first input, saving a first cache file in a base application of the first sub-application, the first cache file including an application instance of the first sub-application and virtual DOM structure data of the first sub-application; and unloading the first sub-application.
Description
Technical Field
The application belongs to the technical field of data processing, and particularly relates to an application unloading method, an application unloading device, electronic equipment and a readable storage medium.
Background
The current industry micro front-end solution divides applications into base applications and sub-applications, e.g. a complete application downloaded in an electronic device is a base application, and other applications appear as sub-applications in applets. The sub-application may help the user to quickly access a designated page of the base application.
In the browser, when the sub-application a of the base application is displayed, if the sub-application B of the base application is to be switched to, the currently displayed sub-application a needs to be unloaded, and the initialization data of the sub-application B is loaded. In general, when a user accesses a plurality of sub-applications, it is necessary to continuously unload one sub-application and load initialization data of another sub-application, so that the time for loading the initialization data is long, which results in an increase in access time, and a slow and fast sense of page switching and blocking is provided for the user.
It can be seen that the prior art has a phenomenon of switching stuck when switching between a plurality of sub-applications.
Disclosure of Invention
The embodiment of the application aims to provide an application unloading method which can solve the problem that switching is blocked when a plurality of sub-applications are switched in the prior art.
In a first aspect, an embodiment of the present application provides an application uninstalling method, including: receiving a first input for switching by a first sub-application to another sub-application; in response to the first input, saving a first cache file in a base application of the first sub-application, the first cache file including an application instance of the first sub-application and virtual DOM structure data of the first sub-application; and unloading the first sub-application.
In a second aspect, an embodiment of the present application provides an application uninstalling apparatus, including: a first receiving module for receiving a first input for switching from a first sub-application to other sub-applications; a first storing module, configured to store, in response to the first input, a first cache file in a base application of the first sub-application, where the first cache file includes an application instance of the first sub-application and virtual DOM structure data of the first sub-application; and the unloading module is used for unloading the first sub-application.
In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which when executed by a processor perform the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and where the processor is configured to execute a program or instructions to implement a method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one processor to implement the method according to the first aspect.
Thus, in the embodiment of the application, when the user triggers the switch from the first sub-application currently displayed to other sub-applications through the first input, the first sub-application is not directly unloaded in response to the first input, but the first cache file is stored in the base application of the first sub-application, and the first cache file comprises the application instance of the first sub-application and the virtual DOM structure data of the first sub-application, and the first sub-application is unloaded after being stored. Therefore, when the first sub-application is switched to the next time, the first cache file can be directly utilized without loading the initialization data of the first sub-application. Therefore, according to the unloading method provided by the embodiment of the application, when switching among a plurality of sub-applications, the step of loading initialization data is saved, and the time for loading page data is shortened, so that the phenomenon of blocking does not occur when switching the applications.
Drawings
FIG. 1 is a flow chart of an application offloading method of an embodiment of the application;
FIG. 2 is one illustrative diagram of an application offloading method of an embodiment of the application;
FIG. 3 is a second illustrative diagram of an application offloading method according to an embodiment of the application;
FIG. 4 is a third illustrative diagram of an application offloading method of an embodiment of the application;
FIG. 5 is a block diagram of an application offloading apparatus of an embodiment of the application;
FIG. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application;
fig. 7 is a second schematic diagram of a hardware structure of an electronic device according to an embodiment of the application.
Detailed Description
The technical solutions of the embodiments of the present application will be clearly described below with reference to the accompanying drawings of the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which are obtained by a person skilled in the art based on the embodiments of the present application, fall within the scope of protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged, as appropriate, such that embodiments of the present application may be implemented in sequences other than those illustrated or described herein, and that the objects identified by "first," "second," etc. are generally of a type, and are not limited to the number of objects, such as the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The execution body of the application unloading method provided by the embodiment of the application can be the application unloading device provided by the embodiment of the application or the electronic equipment integrated with the application unloading device, wherein the application unloading device can be realized in a hardware or software mode.
The application unloading method provided by the embodiment of the application is described in detail through specific embodiments and application scenes thereof with reference to the accompanying drawings.
FIG. 1 shows a flow chart of an application uninstalling method of an embodiment of the application, applied to an electronic device, the method comprising:
step 110: a first input is received, the first input for switching from a first sub-application to another sub-application. The first input includes a touch input made by a user on a screen, and is not limited to click, slide, drag, and other inputs. The first input may also be a blank input of the user, such as a gesture action, a facial action, etc., and further includes an input of the user to a physical key on the device, not limited to a press, etc. Moreover, the first input comprises one or more inputs, wherein the plurality of inputs may be continuous or time-spaced.
In this step, a first input is used to trigger a switch by the user from the first sub-application currently displayed to the other sub-application.
In this embodiment, referring to fig. 2, based on a certain base application 201, a plurality of sub-applications 202 may be split, where each sub-application presents the content of the navigated page to the user. The base application 201 provides the capabilities of a registration interface of the sub-application 202, a sub-application loading inlet, sub-application environment isolation and the like, so as to ensure that the sub-application can be conveniently switched and operated.
The first sub-application is one sub-application of the base application, and the other sub-applications are the other sub-applications of the base application.
For example, referring to fig. 3, the base application a is a shopping application, including a total station navigation menu, where the base application a may divide a navigation B and a navigation C, the navigation B corresponds to a sub-application B, the page navigated by the sub-application B is a commodity list page, the navigation C corresponds to a sub-application C, and the page navigated by the sub-application C is a shopping cart settlement page. Correspondingly, the first input is for the user to trigger a switch from sub-application B301 to sub-application C302.
In the application scenario of this embodiment, for example, in the case where the browser displays the page content navigated by the first sub-application, the user clicks the link corresponding to the other sub-application, so as to trigger displaying the page content navigated by the other sub-application.
Step 120: in response to the first input, a first cache file is saved in a base application of the first sub-application, the first cache file including an application instance of the first sub-application and virtual DOM structure data of the first sub-application.
In this step, a first cache file is saved in a base application of the first sub-application based on page content of the currently displayed first sub-page, before the first sub-application is uninstalled.
Wherein the first cache file includes an application instance of the first sub-application and virtual document object model (Document Object Model, DOM) structure data of the first sub-application.
For example, the first sub-application is sub-application B, and the stored first cache file includes: and the Node B is used for representing the application instance of the sub-application B, and the Node B is used for representing the Node of the virtual DOM structure data.
Optionally, the first cache file is saved to a designated storage location of the base application for subsequent reading.
Step 130: the first sub-application is offloaded.
In this step, the first sub-application is uninstalled after the first cache file of the first sub-application is saved.
Further, switching to other sub-applications.
For example, referring to fig. 3, after switching from sub-application B to sub-application C, "B" is saved in base application a: appB, nodeB).
In this embodiment, in the case of switching applications, monitoring is performed in the base application, and if it is monitored that two applications switched at this time are two sub-applications of the base application, the sub-applications before switching are stored with a cache file.
Thus, in the embodiment of the application, when the user triggers the switch from the first sub-application currently displayed to other sub-applications through the first input, the first sub-application is not directly unloaded in response to the first input, but the first cache file is stored in the base application of the first sub-application, and the first cache file comprises the application instance of the first sub-application and the virtual DOM structure data of the first sub-application, and the first sub-application is unloaded after being stored. Therefore, when the first sub-application is switched to the next time, the first cache file can be directly utilized without loading the initialization data of the first sub-application. Therefore, according to the unloading method provided by the embodiment of the application, when switching among a plurality of sub-applications, the step of loading initialization data is saved, and the time for loading page data is shortened, so that the phenomenon of blocking does not occur when switching the applications.
In the flow of the application uninstalling method according to another embodiment of the present application, step 130 includes:
substep A1: and deleting the page node of the first sub-application.
Substep A2: first attribute information of the first cache file is set.
In this step, when the first sub-application is uninstalled, only the page node of the first sub-application is deleted, and the first attribute information of the first cache file is set to "keep-alive".
In this embodiment, when the first sub-application is uninstalled, the first cache file stored in the base application is not deleted, and the attribute of the first cache file is set to "keep alive", so as to ensure that the cache file is available in the scene of switching to the first sub-application next time.
In the flow of the application download method according to another embodiment of the present application, step 120 includes:
substep B1: the first cache file is saved as a variable.
In this step, the first cache file is saved to the base application and is kept as the variable "appMap".
The "appMap" is a variable name in the base application, which can be understood as a section of memory space for storing cache contents.
Optionally, the variable "appMap" is persisted into the front-end storage "localtorage", and the next time the user triggers to display the first sub-application, the page content can be recovered through the persisted data, so as to accelerate the rendering speed.
In this embodiment, the storage location of the first cache file is defined to ensure that the first cache file can be used in the switching scenario of the sub-application. In addition, the first cache file is saved as a variable, and deletion and the like can be performed according to the actual size of the remaining storage space, so that the performance of the electronic equipment is ensured.
In the flow of the application download method according to another embodiment of the present application, after step 130, the method further includes:
step C1: a second input is received, the second input for switching from the second sub-application to the first sub-application.
The second input includes touch input made by the user on the screen, and is not limited to click, slide, drag and other inputs. The second input may also be a blank input of the user, such as a gesture action, a facial action, etc., and further includes an input of the user to a physical key on the device, not limited to a press, etc. Moreover, the second input comprises one or more inputs, wherein the plurality of inputs may be continuous or time-spaced.
In this step, the second input is used to trigger a switch by the user from the second sub-application currently displayed to the first sub-application.
The first sub-application and the second sub-application are two sub-applications of the base application respectively.
For example, referring to fig. 4, the second sub-application is sub-application C, the first sub-application is sub-application B, and the second input is used for user triggering a switch from sub-application C401 to sub-application B402.
Step C2: and responding to the second input, and acquiring a first cache file in the base application according to the name information of the first sub-application.
In this step, according to the name information of the first sub-application, a corresponding first cache file may be queried in the base application.
For example, the first sub-application is sub-application B, and the base application stores: "B: appB, nodeB ", wherein": "front" B "is used to indicate name information of the sub-application B.
Step C3: and displaying the first sub-application according to the first cache file under the condition that the second sub-application is unloaded.
In the step, after unloading the second sub-application currently displayed, restoring the page content of the first sub-application according to the application instance of the first sub-application and the virtual DOM structure data of the first sub-application so as to complete the switching display of the first sub-application.
Referring to fig. 4, in conjunction with fig. 3 and the application uninstalling method of the present application, when the sub-application C401 is switched to the sub-application B402, the base application a stores: "B: appB, nodeB "and" C: appc, nodeC).
In this embodiment, a method for recovering page content based on a saved cache file is provided, and the method is applied to a switching scene between sub-applications without reloading initial data, so that the page presentation speed is improved, and the switching and clamping experience is avoided for users.
In the flow of the application downloading method according to another embodiment of the present application, the method further includes:
step D1: and under the condition that the third sub-application of the base application is displayed, acquiring an application instance of a fourth sub-application of the base application and virtual DOM structure data of the fourth sub-application.
In this step, the third sub-application and the fourth sub-application are any two sub-applications of the base application.
In the application scenario of this embodiment, if the first loading is to load a sub-application of the base application, if the loading is to load a third sub-application, then other sub-applications may be automatically loaded in the background, if the other sub-applications are fourth sub-applications, and based on the loading data, an application instance of the fourth sub-application and virtual DOM structure data of the fourth sub-application may be automatically acquired in the background.
Step D2: and storing a second cache file in the base application, wherein the second cache file comprises an application instance of the fourth sub-application and virtual DOM structure data of the fourth sub-application.
In this step, the second cache file of the base application is automatically saved in the background. The second cache file is a cache file corresponding to the fourth sub-application and is used for recovering page contents of the fourth sub-application.
With reference to the method of this embodiment, the cache files corresponding to all the sub-applications may be stored in the base application.
Therefore, when the user switches to the fourth sub-application, the page content of the fourth sub-page is directly restored by using the second cache file, so that the step of initializing the construction example can be reduced, and the rendering is quickened.
In the embodiment, the cache file corresponding to each sub-application is stored in the base application in advance, so that the cache file can be used when the sub-application is switched to for the first time, the data loading time is shortened, and the user experience is improved.
In other embodiments of the present application, for micro front end applications without virtual DOM, the method of storing cache data in the present application may be used to store other forms of cache data of page content, so as to reduce the time for loading page data when switching next time.
In other embodiments of the present application, if the cache file corresponding to the sub-application is not stored in the base application, the resource of the sub-application is directly loaded, an application such as "AppC" is instantiated, a script is executed to construct a virtual DOM, and page rendering is performed.
In summary, based on the current front-end development trend, more and more functions are designed to the World Wide Web (Web) end, and applications are also more and more complex, and traditional single-page applications (Single Page Application, SPA) are also becoming larger and larger, so that the solution of increasing front-end applications by using a micro front-end scheme is promoted, for example, the larger SPA is split into a plurality of smaller applications, namely, the base application is split into sub-applications, so as to solve the problem of the boulder application. Based on the method, the application provides an application unloading method, and the virtual DOM structure of the front end frame is used for storing the cache file when the application is unloaded, so that one-time loading and multiple-time use of the sub-application can be realized based on the stored cache file, and user operation information can be stored.
TABLE 1
Referring to table 1, compared with the conventional micro front end application switching method, the optimized micro front end application switching method provided by the application has the advantages that the steps of loading current application resources, executing current application initialization codes, constructing application instances, constructing virtual DOMs and the like are saved, pages are rendered directly based on virtual DOM structure data in a cache file, the consumed time for displaying the pages is shortened, the problem of blocking during switching is solved, and extremely good performance experience is brought to users.
According to the application unloading method provided by the embodiment of the application, the execution main body can be an application unloading device. In the embodiment of the present application, an application unloading device executes an application unloading method as an example, and the application unloading device provided in the embodiment of the present application is described.
FIG. 5 shows a block diagram of an application offloading apparatus of one embodiment of the application, comprising:
a first receiving module 10 for receiving a first input for switching from a first sub-application to another sub-application;
a first saving module 20, configured to save, in response to a first input, a first cache file in a base application of a first sub-application, where the first cache file includes an application instance of the first sub-application and virtual DOM structure data of the first sub-application;
an uninstall module 30 for uninstalling the first sub-application.
Thus, in the embodiment of the application, when the user triggers the switch from the first sub-application currently displayed to other sub-applications through the first input, the first sub-application is not directly unloaded in response to the first input, but the first cache file is stored in the base application of the first sub-application, and the first cache file comprises the application instance of the first sub-application and the virtual DOM structure data of the first sub-application, and the first sub-application is unloaded after being stored. Therefore, when the first sub-application is switched to the next time, the first cache file can be directly utilized without loading the initialization data of the first sub-application. Therefore, according to the unloading method provided by the embodiment of the application, when switching among a plurality of sub-applications, the step of loading initialization data is saved, and the time for loading page data is shortened, so that the phenomenon of blocking does not occur when switching the applications.
Optionally, the unloading module 30 comprises:
the deleting unit is used for deleting the page node of the first sub-application;
and the setting unit is used for setting the first attribute information of the first cache file.
Optionally, the first storage module 20 includes:
and the storage unit is used for storing the first cache file as a variable.
Optionally, the apparatus further comprises:
the second receiving module is used for receiving a second input, and the second input is used for being switched to the first sub-application by the second sub-application;
the first acquisition module is used for responding to the second input and acquiring a first cache file in the base application according to the name information of the first sub-application;
and the display module is used for displaying the first sub-application according to the first cache file under the condition that the second sub-application is unloaded.
Optionally, the apparatus further comprises:
the second acquisition module is used for acquiring an application instance of a fourth sub-application of the base application and virtual DOM structure data of the fourth sub-application under the condition that the third sub-application of the base application is displayed;
and the second saving module is used for saving a second cache file in the base application, wherein the second cache file comprises an application instance of the fourth sub-application and virtual DOM structure data of the fourth sub-application.
The application unloading device in the embodiment of the application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The application uninstalling device of the embodiment of the application can be a device with an action system. The action system may be an Android (Android) action system, an ios action system, or other possible action systems, and the embodiment of the application is not limited specifically.
The application unloading device provided by the embodiment of the application can realize each process realized by the embodiment of the method, and in order to avoid repetition, the description is omitted.
Optionally, as shown in fig. 6, the embodiment of the present application further provides an electronic device 100, including a processor 101, a memory 102, and a program or an instruction stored in the memory 102 and capable of being executed on the processor 101, where the program or the instruction implements each step of any one of the application unloading method embodiments described above when executed by the processor 101, and the steps achieve the same technical effects, and are not repeated herein.
The electronic device of the embodiment of the application includes the mobile electronic device and the non-mobile electronic device.
Fig. 7 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 1000 includes, but is not limited to: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, processor 1010, camera 1011, and the like.
Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 1010 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 7 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein the user input unit 1007 is configured to receive a first input for switching from the first sub-application to the other sub-application; a processor 1010, configured to store, in response to the first input, a first cache file in a base application of the first sub-application, where the first cache file includes an application instance of the first sub-application and virtual DOM structure data of the first sub-application; and unloading the first sub-application.
Thus, in the embodiment of the application, when the user triggers the switch from the first sub-application currently displayed to other sub-applications through the first input, the first sub-application is not directly unloaded in response to the first input, but the first cache file is stored in the base application of the first sub-application, and the first cache file comprises the application instance of the first sub-application and the virtual DOM structure data of the first sub-application, and the first sub-application is unloaded after being stored. Therefore, when the first sub-application is switched to the next time, the first cache file can be directly utilized without loading the initialization data of the first sub-application. Therefore, according to the unloading method provided by the embodiment of the application, when switching among a plurality of sub-applications, the step of loading initialization data is saved, and the time for loading page data is shortened, so that the phenomenon of blocking does not occur when switching the applications.
Optionally, the processor 1010 is further configured to delete a page node of the first sub-application; and setting first attribute information of the first cache file.
Optionally, the processor 1010 is further configured to save the first cache file as a variable.
Optionally, the user input unit 1007 is further configured to receive a second input for switching from a second sub-application to the first sub-application; the processor 1010 is further configured to obtain, in response to the second input, the first cache file in the base application according to name information of the first sub-application; and a display unit 1006, configured to display the first sub-application according to the first cache file, where the second sub-application has been uninstalled.
Optionally, the processor 1010 is further configured to obtain, in a case where the third sub-application of the base application is displayed, an application instance of a fourth sub-application of the base application and virtual DOM structure data of the fourth sub-application; and storing a second cache file in the base application, wherein the second cache file comprises an application instance of the fourth sub-application and virtual DOM structure data of the fourth sub-application.
In summary, based on the current front-end development trend, more and more functions are designed to the World Wide Web (Web) end, and applications are also more and more complex, and traditional single-page applications (Single Page Application, SPA) are also becoming larger and larger, so that the solution of increasing front-end applications by using a micro front-end scheme is promoted, for example, the larger SPA is split into a plurality of smaller applications, namely, the base application is split into sub-applications, so as to solve the problem of the boulder application. Based on the method, the application provides an application unloading method, and the virtual DOM structure of the front end frame is used for storing the cache file when the application is unloaded, so that one-time loading and multiple-time use of the sub-application can be realized based on the stored cache file, and user operation information can be stored. Compared with the conventional micro front-end application switching method, the optimized micro front-end application switching method saves the steps of loading current application resources, executing current application initialization codes, constructing application instances, constructing virtual DOMs and the like, and renders pages directly based on virtual DOM structure data in cache files, so that the time consumed for displaying the pages is shortened, the problem of blocking during switching is solved, and extremely good performance experience is brought to users.
It should be appreciated that in an embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes image data of still pictures or video images obtained by an image capturing device (e.g., a camera) in a video image capturing mode or an image capturing mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also referred to as a touch screen. The touch panel 10071 can include two portions, a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein. Memory 1009 may be used to store software programs as well as various data including, but not limited to, application programs and an action system. The processor 1010 may integrate an application processor that primarily processes an action system, user pages, applications, etc., with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1010.
The memory 1009 may be used to store software programs as well as various data. The memory 1009 may mainly include a first memory area storing programs or instructions and a second memory area storing data, wherein the first memory area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 1009 may include volatile memory or nonvolatile memory, or the memory 1009 may include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash Memory. The volatile memory may be random access memory (Random Access Memory, RAM), static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (Enhanced SDRAM), synchronous DRAM (SLDRAM), and Direct RAM (DRRAM). Memory 1009 in embodiments of the application includes, but is not limited to, these and any other suitable types of memory.
The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, and the like, and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 1010.
The embodiment of the application also provides a readable storage medium, and the readable storage medium stores a program or an instruction, which when executed by a processor, implements each process of the above application unloading method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no further description is provided here.
The processor is a processor in the electronic device in the above embodiment. Readable storage media include computer readable storage media such as computer readable memory ROM, random access memory RAM, magnetic or optical disks, and the like.
The embodiment of the application further provides a chip, the chip comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions, the processes of the application unloading method embodiment can be realized, the same technical effects can be achieved, and the repetition is avoided, and the description is omitted here.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
Embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the above-described application unloading method embodiments, and achieve the same technical effects, and for avoiding repetition, a detailed description is omitted herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in part in the form of a computer software product stored on a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method of the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are to be protected by the present application.
Claims (12)
1. An application offloading method, the method comprising:
receiving a first input for switching by a first sub-application to another sub-application;
in response to the first input, saving a first cache file in a base application of the first sub-application, the first cache file including an application instance of the first sub-application and virtual DOM structure data of the first sub-application;
and unloading the first sub-application.
2. The method of claim 1, wherein the offloading the first sub-application comprises:
deleting the page node of the first sub-application;
and setting first attribute information of the first cache file.
3. The method of claim 1, wherein the saving the first cache file in the base application of the first sub-application comprises:
and storing the first cache file as a variable.
4. The method of claim 1, wherein after said offloading the first sub-application, the method further comprises:
receiving a second input for switching by a second sub-application to the first sub-application;
responding to the second input, and acquiring the first cache file in the base application according to the name information of the first sub-application;
and displaying the first sub-application according to the first cache file under the condition that the second sub-application is unloaded.
5. The method according to claim 1, wherein the method further comprises:
under the condition that a third sub-application of the base application is displayed, acquiring an application instance of a fourth sub-application of the base application and virtual DOM structure data of the fourth sub-application;
and storing a second cache file in the base application, wherein the second cache file comprises an application instance of the fourth sub-application and virtual DOM structure data of the fourth sub-application.
6. An application offloading apparatus, the apparatus comprising:
a first receiving module for receiving a first input for switching from a first sub-application to other sub-applications;
a first storing module, configured to store, in response to the first input, a first cache file in a base application of the first sub-application, where the first cache file includes an application instance of the first sub-application and virtual DOM structure data of the first sub-application;
and the unloading module is used for unloading the first sub-application.
7. The apparatus of claim 6, wherein the offloading module comprises:
a deleting unit, configured to delete a page node of the first sub-application;
and the setting unit is used for setting the first attribute information of the first cache file.
8. The apparatus of claim 6, wherein the first storage module comprises:
and the storage unit is used for storing the first cache file as a variable.
9. The apparatus of claim 6, wherein the apparatus further comprises:
a second receiving module for receiving a second input for switching from a second sub-application to the first sub-application;
the first acquisition module is used for responding to the second input and acquiring the first cache file in the base application according to the name information of the first sub-application;
and the display module is used for displaying the first sub-application according to the first cache file under the condition that the second sub-application is unloaded.
10. The apparatus of claim 6, wherein the apparatus further comprises:
the second acquisition module is used for acquiring an application instance of a fourth sub-application of the base application and virtual DOM structure data of the fourth sub-application under the condition that a third sub-application of the base application is displayed;
and the second saving module is used for saving a second cache file in the base application, wherein the second cache file comprises an application instance of the fourth sub-application and virtual DOM structure data of the fourth sub-application.
11. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the application offloading method of any one of claims 1 to 5.
12. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the application uninstalling method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311023527.1A CN117032737A (en) | 2023-08-14 | 2023-08-14 | Application uninstalling method, device, electronic equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311023527.1A CN117032737A (en) | 2023-08-14 | 2023-08-14 | Application uninstalling method, device, electronic equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117032737A true CN117032737A (en) | 2023-11-10 |
Family
ID=88601896
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311023527.1A Pending CN117032737A (en) | 2023-08-14 | 2023-08-14 | Application uninstalling method, device, electronic equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117032737A (en) |
-
2023
- 2023-08-14 CN CN202311023527.1A patent/CN117032737A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112286612B (en) | Information display method and device and electronic equipment | |
US11314391B2 (en) | Navigation bar controlling method and terminal | |
CN112948844B (en) | Control method and device and electronic equipment | |
CN111813305A (en) | Application program starting method and device | |
CN116107531A (en) | Interface display method and device | |
CN113282213A (en) | Interface display method and device | |
WO2024153027A1 (en) | Application display method and application display apparatus | |
CN114911441A (en) | Information display method and device | |
CN114416269A (en) | Interface display method and display device | |
CN111880701B (en) | Page switching method and device and electronic equipment | |
CN112286615A (en) | Information display method and device of application program | |
CN111638828A (en) | Interface display method and device | |
CN117032737A (en) | Application uninstalling method, device, electronic equipment and readable storage medium | |
CN113794943B (en) | Video cover setting method and device, electronic equipment and storage medium | |
CN115328355A (en) | Application function starting method and device | |
CN115167721A (en) | Display method and device of functional interface | |
CN113824830A (en) | Application management method and device | |
CN114647411A (en) | Programming interface loading method and device, electronic equipment and storage medium | |
CN114398129B (en) | Sharing method and device for sharing objects, electronic equipment and readable storage medium | |
CN117389645A (en) | Application running method, device, electronic equipment and readable storage medium | |
CN116700866A (en) | Window drawing method and device and electronic equipment | |
CN116755736A (en) | Application updating method and electronic equipment | |
CN118132177A (en) | Notification processing method and electronic equipment | |
CN117519541A (en) | Page display method and device, electronic equipment and readable storage medium | |
CN116627566A (en) | Theme application method, theme application device, electronic equipment and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |