Memory management method and device in application, electronic equipment and readable storage medium

By receiving event registration requests and generating memory management policies through the application's internal memory management module, the problem of excessive memory usage caused by long-term application operation is solved, achieving stable application operation and memory optimization.

CN114546894BActive Publication Date: 2026-03-24ALIBABA INNOVATION PRIVATE LIMITED
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-10
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Applications on computing devices are prone to excessive memory usage during prolonged operation, which can lead to forced system termination and negatively impact the application's performance.

Method used

By receiving event registration requests and generating memory management policies through the application's internal memory management module, memory is dynamically managed based on events, conditions, and memory operation items. This includes triggering operations to reduce and restore memory usage, thus preventing the application from being forcibly terminated by the operating system.

Benefits of technology

It achieves a healthy and stable state of application memory, avoids forced application termination, improves application stability and efficiency, and optimizes memory to suit different user characteristics and scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114546894B_ABST
    Figure CN114546894B_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure disclose a memory management method and device in an application, electronic equipment and a readable storage medium. In the memory management method in the application, the application comprises a memory management module, and the method comprises the following steps executed by the memory management module: receiving an event registration request of the application, registering an event triggering a memory management operation, a condition representing a user feature and a memory operation item for operating a memory operation object in response to the event registration request; generating a memory management strategy based on the registered event, condition and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy; and based on the memory management strategy, triggering the operation of the memory operation item corresponding to the event in response to the occurrence of the event triggering the memory management operation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer, in particular to an in-application memory management method and device, electronic equipment and readable storage medium. BACKGROUND

[0002] With the popularity of computing devices, applications running on computing devices consume memory during use. In some cases, various applications on computers or mobile terminals face the problem of being forced to exit by the system due to excessive memory during long-time running, affecting the use effect of the applications. Therefore, how to ensure that the applications of the computing device are not forced to exit during running and can keep the application memory in a healthy and stable state is an increasingly urgent problem to be solved. SUMMARY

[0003] To solve the problems in the related art, the embodiments of the present disclosure provide an in-application memory management method, device, electronic equipment, readable storage medium and computer program product.

[0004] In a first aspect, an in-application memory management method is provided in the embodiments of the present disclosure, the application includes a memory management module, and the method includes executing the following steps by the memory management module:

[0005] receiving an event registration request of an application, and registering an event triggering a memory management operation, a condition representing a user feature and a memory operation item for operating a memory operation object in response to the event registration request;

[0006] generating a memory management strategy based on the registered event, condition and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy;

[0007] based on the memory management strategy, triggering the operation of the memory operation item corresponding to the event in response to the occurrence of the event triggering the memory management operation.

[0008] In combination with the first aspect, in a first implementation manner of the first aspect, the memory management strategy is provided with a triggering time of the memory management operation, and the triggering time includes the event triggering the memory management operation, or includes the event triggering the memory management operation and the condition representing the user feature,

[0009] wherein, based on the memory management strategy, triggering the execution of the memory operation item corresponding to the event in response to the occurrence of the event triggering the memory management operation, includes:

[0010] triggering the operation of the memory operation item corresponding to the event based on the triggering time set in the memory management strategy.

[0011] With reference to the first aspect, in a second implementation form of the first aspect, the memory operation item includes an action of performing the memory operation and a memory operation object on which the memory operation is performed.

[0012] With reference to the first aspect, in a third implementation form of the first aspect, the event triggering the memory management operation includes a first type of event triggering an operation of reducing memory occupancy and a second type of event triggering an operation of restoring memory occupancy,

[0013] The triggering, based on the memory management policy, of the operation on the memory operation item corresponding to the event in response to the event triggering the memory management operation includes:

[0014] The triggering, based on the memory management policy, of the operation on the memory operation item corresponding to the event in response to the event triggering the memory management operation includes:

[0015] The triggering, based on the memory management policy, of the operation on the memory operation item corresponding to the event in response to the event triggering the memory management operation includes:

[0016] With reference to the third implementation form of the first aspect, in a fourth implementation form of the first aspect, the triggering, based on the memory management policy, of the operation on the memory operation item corresponding to the event in response to the second type of event includes:

[0017] The triggering, based on the memory management policy, of the operation on the memory operation item corresponding to the event in response to the second type of event includes:

[0018] The triggering, based on the memory management policy, of the operation on the memory operation item corresponding to the event in response to the second type of event includes:

[0019] With reference to the third implementation form of the first aspect, in a fifth implementation form of the first aspect, the receiving of the event registration request of the application to register the event triggering the memory management operation, the condition representing the user feature, and the memory operation item for performing the operation on the memory operation object in response to the event registration request includes:

[0020] The receiving of the event registration request of the application to register the event triggering the memory management operation, the condition representing the user feature, and the memory operation item group consisting of the memory operation items for performing the operation on the memory operation object in response to the event registration request includes:

[0021] The operation on the memory operation item corresponding to the event is triggered in response to an event triggering a memory management operation based on the memory management strategy, and the operation on the group of memory operation items corresponding to the event is triggered in response to an event triggering a memory management operation based on the memory management strategy.

[0022] The operation on the memory operation item corresponding to the event is triggered in response to an event triggering a memory management operation based on the memory management strategy, and the operation on the group of memory operation items corresponding to the event is triggered in response to an event triggering a memory management operation based on the memory management strategy.

[0023] With reference to the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect, the method further includes:

[0024] At least one memory operation item is added in the group of memory operation items corresponding to the first type of event occurring first in response to another first type of event occurring after the first type of event occurring first based on the memory management strategy.

[0025] With reference to any one of the first aspect, the first implementation manner to the sixth implementation manner of the first aspect, in a seventh implementation manner of the first aspect, the receiving of the event registration request of the application to register an event triggering a memory management operation, a condition representing a user feature, and a memory operation item for operating a memory operation object in response to the event registration request includes:

[0026] The event registration request for the application scenario is received in response to entering the application scenario to register an event triggering a memory management operation for the application scenario, a condition representing a user feature, and a memory operation item for operating a memory operation object in response to the event registration request.

[0027] With reference to any one of the first aspect, the first implementation manner to the sixth implementation manner of the first aspect, in an eighth implementation manner of the first aspect, the condition representing a user feature includes device information representing a computing device running the application, wherein the device information includes a memory occupancy threshold value that causes the application to be forced to exit in an operating system of the computing device.

[0028] In a second aspect, an in-application memory management apparatus is provided in the embodiments of the present disclosure, and the apparatus includes:

[0029] An event registration module is configured to receive an event registration request of an application to register an event triggering a memory management operation, a condition representing a user feature, and a memory operation item for operating a memory operation object in response to the event registration request;

[0030] A memory management strategy generation module is configured to generate a memory management strategy based on the registered event, condition, and memory operation item, wherein the event triggering a memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy.

[0031] The memory operation module is configured to trigger an operation on a memory operation item corresponding to the event based on the memory management strategy in response to an event triggering a memory management operation.

[0032] In a third aspect, the embodiments of the present disclosure provide a memory management method in a navigation application, the navigation application comprising a navigation memory management module, the method comprising performing the following steps by the navigation memory management module:

[0033] receiving a navigation event registration request of the navigation application to register a navigation application event triggering a memory management operation, a navigation application condition representing a user feature of the navigation application, and a navigation memory operation item for operating a memory operation object in the navigation application in response to the navigation event registration request;

[0034] generating a navigation memory management strategy based on the registered navigation application event, the navigation application condition, and the navigation memory operation item, wherein the navigation memory management strategy is configured to set the navigation application event triggering the memory management operation and at least one navigation memory operation item corresponding to the navigation application event;

[0035] triggering an operation on a navigation memory operation item corresponding to the navigation application event based on the navigation memory management strategy in response to a navigation application event triggering a memory management operation.

[0036] In a fourth aspect, the embodiments of the present disclosure provide an electronic device, comprising a memory and a processor; wherein

[0037] The memory is configured to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method of any one of the first aspect, the first to eighth implementation manners of the first aspect, or the third aspect.

[0038] In a fifth aspect, the embodiments of the present disclosure provide a readable storage medium having computer instructions stored thereon, wherein the computer instructions are executed by a processor to implement the method of any one of the first aspect, the first to eighth implementation manners of the first aspect, or the third aspect.

[0039] In a sixth aspect, the embodiments of the present disclosure provide a computer program product comprising computer instructions, wherein the computer instructions are executed by a processor to implement the method of any one of the first aspect, the first to eighth implementation manners of the first aspect, or the third aspect.

[0040] The technical solutions provided by the embodiments of the present disclosure can include the following beneficial effects:

[0041] According to the technical scheme provided by the embodiment of the present disclosure, the application includes a memory management module, and the method includes the following steps performed by the memory management module: receiving an event registration request of an application, registering an event triggering a memory management operation, a condition representing a user feature, and a memory operation item for operating a memory operation object in response to the event registration request; generating a memory management strategy based on the registered event, condition, and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy; based on the memory management strategy, triggering the operation of the memory operation item corresponding to the event in response to the occurrence of the event triggering the memory management operation, the event, condition, and memory operation item that enable the application running in the computing device to be managed by memory can be registered, the memory of the application is ensured to be in a healthy and stable state during the running of the application, thereby the application is stably running in the operating system where the application is located, and the application is prevented from being forcibly exited by the operating system. Moreover, for different event registration requests, the memory can be intelligently and dynamically managed based on different events, conditions representing user features, and memory operation items, and the memory optimization effect is achieved. Moreover, the condition representing the user feature can ensure that the memory management strategy is suitable for different people.

[0042] According to the technical scheme provided by the embodiment of the present disclosure, the trigger time of the memory management operation is set in the memory management strategy, the trigger time includes the event triggering the memory management operation, or includes the event triggering the memory management operation and the condition representing the user feature, and the operation of the memory operation item corresponding to the event is triggered based on the memory management strategy in response to the occurrence of the event triggering the memory management operation, which includes triggering the operation of the memory operation item corresponding to the event based on the trigger time set in the memory management strategy, the operation of the memory operation item can be triggered at different trigger times, thereby the memory is intelligently and dynamically managed, and the memory optimization effect is achieved.

[0043] According to the technical scheme provided by the embodiment of the present disclosure, the memory operation item includes an action of performing the memory operation and a memory operation object subjected to the memory operation, the operation of the memory operation item can be performed, the memory is intelligently and dynamically managed, and the memory optimization effect is achieved.

[0044] According to the technical scheme provided by the embodiment of the present disclosure, the event triggering the memory management operation includes a first type of event triggering the operation of reducing memory occupation and a second type of event triggering the operation of restoring memory occupation, and the operation of triggering the operation of the memory operation item corresponding to the event in response to the event triggering the memory management operation based on the memory management strategy includes triggering the operation of reducing memory occupation of the memory operation item corresponding to the first type of event in response to the first type of event based on the memory management strategy, or triggering the operation of restoring memory occupation of the memory operation item corresponding to the second type of event in response to the second type of event based on the memory management strategy. The memory can be dynamically managed for the first type of event or the second type of event based on the memory management strategy, and the memory optimization effect is achieved.

[0045] According to the technical scheme provided by the embodiment of the present disclosure, the operation of triggering the operation of the memory operation item corresponding to the event in response to the event triggering the memory management operation based on the memory management strategy includes determining whether the reference count of the memory operation item corresponding to the event and having executed the operation of reducing memory occupation is zero in response to the second type of event based on the memory management strategy, and restoring the memory operation item having executed the operation of reducing memory occupation to the initial state according to the reference count of the memory operation item corresponding to the event and having executed the operation of reducing memory occupation being zero. The memory can be dynamically managed for the second type of event based on the memory management strategy, the memory optimization effect is achieved, and the reference count of the memory operation item can be used to prevent the memory operation item from being restored incorrectly.

[0046] According to the technical scheme provided by the embodiment of the present disclosure, the event triggering the memory management operation includes a first type of event triggering the operation of reducing memory occupation and a second type of event triggering the operation of restoring memory occupation, and the operation of triggering the memory management operation includes triggering the operation of reducing memory occupation of the memory operation item corresponding to the first type of event in response to the first type of event based on the memory management strategy, or triggering the operation of restoring memory occupation of the memory operation item corresponding to the second type of event in response to the second type of event based on the memory management strategy. The memory can be dynamically managed for the first type of event or the second type of event based on the memory management strategy, and the memory optimization effect is achieved.

[0047] According to the technical scheme provided by the embodiment of the present disclosure, by means of the memory management strategy, in response to another first type event occurring after the first type event occurring in advance, at least one memory operation item is added in the memory operation item group corresponding to the first type event occurring in advance, the existing memory operation item group can be dynamically adjusted after the memory management strategy is determined, thereby dynamically managing the memory, and the memory optimization effect is achieved.

[0048] According to the technical scheme provided by the embodiment of the present disclosure, by means of the event registration request of the receiving application, in response to the event registration request, the event triggering the memory management operation, the condition representing the user feature and the memory operation item for operating the memory operation object are registered, including: in response to entering the application scene of the application, the event registration request for the application scene is received, in response to the event registration request, the event triggering the memory management operation for the application scene, the condition representing the user feature and the memory operation item for operating the memory operation object are registered, the event, the condition and the memory operation item for enabling the application running in the computing device to be managed by the memory can be registered for the application scene, and the memory of the application in the specific application scene is guaranteed to be in a healthy and stable state, thereby stably running in the operating system of the application, and avoiding the application being forced to exit by the operating system. Moreover, for different event registration requests, the memory can be intelligently and dynamically managed based on different events, conditions and memory operation items in different application scenes, and different memory optimization effects are achieved.

[0049] According to the technical scheme provided by the embodiment of the present disclosure, the condition representing the user feature includes device information of the computing device running the application, wherein the device information includes a memory occupation threshold value for enabling the application to be forced to exit in the operating system of the computing device, and the memory of the application running in the computing device can be guaranteed to be in a healthy and stable state, and the application is avoided from being forced to exit by the operating system.

[0050] According to the technical scheme provided by the embodiment of the present disclosure, the event registration module is configured to receive an event registration request of an application, register an event triggering a memory management operation, a condition representing a user feature, and a memory operation item for operating a memory operation object in response to the event registration request; the memory management strategy generation module is configured to generate a memory management strategy based on the registered event, condition, and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy; and the memory operation module is configured to trigger the operation of the memory operation item corresponding to the event in response to the occurrence of the event triggering the memory management operation based on the memory management strategy. The event, condition, and memory operation item that enable the application running in the computing device to be managed can be registered, so that the memory of the application is kept in a healthy and stable state during the running of the application, thereby stably running in the operating system where the application is located, and avoiding the application being forcibly exited by the operating system. Moreover, different events, conditions representing user features, and memory operation items can be used to intelligently and dynamically manage the memory based on different event registration requests, so as to achieve the memory optimization effect. Moreover, the condition representing the user feature can ensure that the memory management strategy is suitable for different people based on different user features.

[0051] According to the technical scheme provided by the embodiment of the present disclosure, the navigation application includes a navigation memory management module, and the method includes the following steps performed by the navigation memory management module: receiving a navigation event registration request of a navigation application, registering a navigation application event triggering a memory management operation, a navigation application condition representing a user feature of the navigation application, and a navigation memory operation item for operating a navigation application memory operation object in response to the navigation event registration request; generating a navigation memory management strategy based on the registered navigation application event, navigation application condition, and navigation memory operation item, wherein the navigation application event triggering the memory management operation and at least one navigation memory operation item corresponding to the navigation application event are set in the navigation memory management strategy; and triggering the operation of the navigation memory operation item corresponding to the navigation application event in response to the occurrence of the navigation application event triggering the memory management operation based on the navigation memory management strategy. The navigation application event, navigation application condition, and navigation memory operation item that enable the navigation application running in the computing device to be managed can be registered, so that the memory of the navigation application is kept in a healthy and stable state during the running of the navigation application, thereby stably running in the operating system where the navigation application is located, and avoiding the navigation application being forcibly exited by the operating system. Moreover, different navigation application events, navigation application conditions representing user features, and navigation memory operation items can be used to intelligently and dynamically manage the memory based on different navigation event registration requests, so as to achieve the memory optimization effect. Moreover, the navigation application condition representing the user feature can ensure that the navigation memory management strategy is suitable for different people based on different user features.

[0052] It should be understood that the general description and detailed description that follow are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0053] Other features, objects, and advantages of the present disclosure will become more apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings:

[0054] Figure 1 A flowchart illustrating a memory management method within an application according to an embodiment of the present disclosure is shown;

[0055] Figure 2 A schematic diagram illustrating an exemplary implementation scenario in which the memory management method within an application according to an embodiment of the present disclosure is applied to a navigation application is shown;

[0056] Figure 3 An exemplary flowchart illustrating an embodiment in which the memory management method within an application according to an embodiment of the present disclosure is applied to a navigation application is shown;

[0057] Figure 4 A schematic diagram illustrating an exemplary event registration center for performing Figure 3 A schematic diagram illustrating a workflow of the exemplary event registration center for performing

[0058] Figure 5 A structural block diagram illustrating a memory management apparatus within an application according to an embodiment of the present disclosure is shown;

[0059] Figure 6 A structural block diagram illustrating an electronic device according to an embodiment of the present disclosure is shown;

[0060] Figure 7 A structural schematic diagram of a computer system suitable for implementing the method according to the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0061] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so as to be easily implemented by those skilled in the art. Also, portions unrelated to describing the exemplary embodiments are omitted in the accompanying drawings for the sake of clarity.

[0062] In the present disclosure, it should be understood that terms such as "include" or "have" are intended to indicate that there are labels, numbers, steps, actions, components, parts or combinations thereof disclosed in the specification, and do not exclude the possibility of adding one or more other labels, numbers, steps, actions, components, parts or combinations thereof.

[0063] In addition, it should be noted that the embodiments in the present disclosure and the tags in the embodiments can be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0064] In the present disclosure, the acquisition of user information or user data is an operation authorized, confirmed by the user, or actively selected by the user. The user can be an individual, a profit-making institution, a non-profit-making institution, and various persons or organizations.

[0065] In the related art, when the operating system of the computing device performs memory management, the memory management is generally performed for the running application, that is, the application that is no longer running or occupies too much memory is forcibly exited. The application being forcibly exited by the operating system affects the use effect of the application.

[0066] To solve the above problems, the present disclosure proposes an in-application memory management method, device, electronic device, readable storage medium and computer program product. According to an embodiment of the present disclosure, during the use of an application running in a computing device, an event (which can be referred to as Action in an embodiment of the present disclosure), a condition (which can be referred to as Condition in an embodiment of the present disclosure) and a memory operation item (which can be referred to as Feature in an embodiment of the present disclosure) that enable the application to be managed in memory are registered, thereby constituting a memory management strategy. The operation of the memory operation item corresponding to the event is triggered based on the memory management strategy, so as to manage the memory occupation of the application. In an embodiment of the present disclosure, based on the memory management strategy, a first type of event triggering an operation of reducing memory occupation can be triggered to trigger the memory operation item to reduce the memory occupation of the application, so as to ensure that the application memory is in a healthy and stable state, and avoid the application being forcibly exited by the operating system. In an embodiment of the present disclosure, the memory management method is executed by a memory management module of the application within the application. Compared with the operating system level memory management, this memory management method has a significant advantage in ensuring the stable operation of the application itself and finely managing the memory occupation of the application.

[0067] In an embodiment of the present disclosure, the memory operation item can also be referred to as an operation item, which refers to the smallest unit of memory optimization, and can release a certain amount of memory after execution. In addition, based on the memory management strategy, a second type of event triggering an operation of recovering memory occupation can be triggered to recover the memory operation item that has executed the operation of reducing the memory occupation of the application, that is, to recover the memory occupation, so as to ensure the availability of the application. The in-application memory management method according to the embodiment of the present disclosure can achieve the characteristics of intelligence, real-time, dynamics, effectiveness and individuality, thereby achieving a better memory optimization effect.

[0068] It should be noted that the implementation scenarios of the in-application memory management method discussed above can be scenarios in which various computing devices run applications, and are not limited to a certain specific device, a certain specific application, or a certain specific scenario.

[0069] In one embodiment of the present disclosure, the in-application memory management method discussed in the embodiments of the present disclosure is directed to an in-application memory management method performed by an application itself for memory management, rather than a memory management operation performed by an operating system. Unlike the operating system of a computing device ensuring the health and stability of the memory of the computing device by forcibly exiting the application when performing memory management, the in-application memory management method of the embodiments of the present disclosure can ensure the health and stability of the memory state of the application itself by establishing a memory management strategy in the application, and managing the memory operation item associated with the event according to the registered event and condition, so as to prevent the application from being easily forcibly exited by the operating system due to occupying more memory than necessary.

[0070] The following refers to Figure 1 An example of the in-application memory management method according to an embodiment of the present disclosure is described.

[0071] Figure 1 A flowchart of the in-application memory management method according to an embodiment of the present disclosure is shown. As shown in Figure 1 In the in-application memory management method shown in FIG. 1, the application includes a memory management module, and the memory management module performs the following steps S101, S102, and S103.

[0072] In step S101, an event registration request of the application is received, and an event triggering a memory management operation, a condition representing a user feature, and a memory operation item for operating a memory operation object are registered in response to the event registration request.

[0073] In step S102, a memory management strategy is generated based on the registered event, condition, and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy.

[0074] In step S103, based on the memory management strategy, an operation on the memory operation item corresponding to the event is triggered in response to the occurrence of the event triggering the memory management operation.

[0075] In an embodiment of the present disclosure, an application refers to an application program running in an operating system of a computing device, for example, an office application program running on an operating system of a computer, a game application program, and the like, or a navigation application program running on an operating system of a mobile terminal, a shopping application program, and the like. The memory management method in an application mentioned in the embodiments of the present disclosure is a method for an application to execute or in an application.

[0076] In an embodiment of the present disclosure, the memory management method in an application can manage memory based on an event (Action), a condition (Condition), and a memory operation item (Feature). This management manner can be referred to as an ACF (i.e., the initial combination of letters of Action, Condition, and Feature) management manner. In an embodiment of the present disclosure, a module for executing the ACF management manner can be referred to as a memory management module or an ACF manager center or an ACF event registration center, which can be used to determine a memory operation item (Feature) based on an event (Action) and a condition (Condition), and further generate a memory management strategy to trigger an operation for reducing memory occupation in response to an event, or restore a memory operation item that has executed an operation for reducing memory occupation to an initial state, and the like.

[0077] In an embodiment of the present disclosure, an event registration request of an application can be a scene entering event of the application, i.e., an event of entering a scene in the application. The scene can be various scenes occurring in the running process of the application, for example, for a navigation application, the scenes can include a driving navigation scene, a family map scene, a cycling navigation scene, a walking navigation scene, a small video scene, and the like. In the case of executing the memory management method in an application according to the embodiments of the present disclosure, the event of entering a scene triggers a registered event (the registered event can be multiple events, including the scene entering event) and a condition representing a user feature (the registered condition can be multiple conditions), and the event of entering a scene also triggers a registered memory operation item associated with the registered event or associated with both the registered event and the registered condition.

[0078] In an embodiment of the present disclosure, the event triggering the memory management operation can refer to an application's in-scene event, out-scene event, foreground switching event, background switching event, low memory warning event, low power warning event, and the like. The out-scene event refers to an event in which the current scene is exited in the application. The foreground switching event refers to an event in which a scene in the background is switched to the foreground in the application. The background switching event refers to an event in which the current scene is switched to the background in the application. The low memory warning event refers to an event in which a warning of insufficient memory is received from the operating system in the application. The low power warning event refers to an event in which a warning of low power is received from the operating system in the application. In an embodiment of the present disclosure, the memory warning and the low power warning received from the operating system can be received through an interface provided by the operating system for the application.

[0079] In an embodiment of the present disclosure, the condition representing the user feature can be registered in response to the event registration request. The condition is different from the event, and represents the feature of the user of the application, for example, the type of the computing device of the user (the computing device where the application is located), the use habit of the user operating the application, the location of the user, the travel mode of the user, and the like can be used as the condition. When the memory management method in the application is executed, the memory management considering the condition can make the execution strategy of the memory management method in the application different for different people, and intelligently implement the memory management. In an embodiment of the present disclosure, the manner of obtaining the user feature can be known from the related art, and the present disclosure will not be repeated here.

[0080] In an embodiment of the present disclosure, the memory operation item (which can also be referred to as an operation item) for operating the memory operation object can refer to an item set in the application for operating the object related to the memory occupation in the application, for example, a close animation operation item, a script garbage collection operation item, and the like.

[0081] In an embodiment of the present disclosure, the event triggering the memory management operation and the at least one memory operation item corresponding to the event are set in the memory management strategy. The memory management strategy refers to the operation of reducing the memory occupation or recovering the memory occupation triggered by the event registered in which memory operation item. In an embodiment of the present disclosure, the memory operation item registered in response to the event registration request is generally different in different cases of any one of the event and the condition. In an embodiment of the present disclosure, the memory operation item set in the memory management strategy is generally different in different cases of any one of the application scene, the event, and the condition. Therefore, the memory management strategy generated by the memory management method in the application of the embodiment of the present disclosure is different for different people and intelligent.

[0082] According to the technical scheme provided by the embodiment of the present disclosure, the application includes a memory management module, and the method includes the following steps performed by the memory management module: receiving an event registration request of an application, registering an event triggering a memory management operation, a condition representing a user feature, and a memory operation item used for operating a memory operation object in response to the event registration request; generating a memory management strategy based on the registered event, condition, and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy; and triggering the operation of the memory operation item corresponding to the event based on the memory management strategy in response to the occurrence of the event triggering the memory management operation, so that the event, condition, and memory operation item that enable the application running in the computing device to be managed by memory can be registered, the memory of the application is ensured to be in a healthy and stable state during the running of the application, the application is stably run in the operating system where the application is located, and the application is prevented from being forcibly exited by the operating system. Moreover, different events, conditions representing user features, and memory operation items can be used to intelligently and dynamically manage the memory based on different event registration requests, so that the memory optimization effect is achieved. Moreover, the condition representing the user feature can ensure that the memory management strategy is suitable for different people.

[0083] In one embodiment of the present disclosure, a triggering time of the memory management operation is set in the memory management strategy, and the triggering time includes the event triggering the memory management operation or includes the event triggering the memory management operation and the condition representing the user feature. In this case, step S103 includes triggering the operation of the memory operation item corresponding to the event based on the triggering time set in the memory management strategy.

[0084] In one embodiment of the present disclosure, the triggering time of the memory management operation refers to the case in which the memory management operation is triggered. In one embodiment of the present disclosure, the concept of the triggering time is not limited to the occurrence of the event triggering the memory management operation, and can also include the registered condition. For example, the triggering time of a certain memory management operation can only include the occurrence of the event entering a certain specific application scenario, or the triggering time of a certain memory management operation can include both the occurrence of the event entering a certain specific application scenario and the condition of the habit of the user using the current application. That is, the triggering time of the memory management operation can refer to the occurrence of a specific event under a certain condition.

[0085] According to the technical scheme provided by the embodiment of the present disclosure, the trigger time of the memory management operation is set in the memory management strategy, the trigger time includes an event triggering the memory management operation, or includes the event triggering the memory management operation and a condition representing a user feature, wherein the memory management strategy is used to trigger the execution of the memory operation item corresponding to the event in response to the event triggering the memory management operation, and the operation of the memory operation item corresponding to the event is triggered based on the trigger time set in the memory management strategy. The operation of the memory operation item can be triggered at different trigger times, so that the memory is intelligently and dynamically managed, and the memory optimization effect is achieved.

[0086] In an embodiment of the present disclosure, the event triggering the memory management operation includes a first type of event triggering the operation of reducing the memory occupation and a second type of event triggering the operation of restoring the memory occupation. In this case, step S103 includes triggering the operation of reducing the memory occupation of the memory operation item corresponding to the event in response to the first type of event based on the memory management strategy, or triggering the operation of restoring the memory occupation of the memory operation item having executed the operation of reducing the memory occupation in response to the second type of event based on the memory management strategy.

[0087] In an embodiment of the present disclosure, although the first type of event triggering the operation of reducing the memory occupation and the memory operation item corresponding to the first type of event are set in the memory management strategy, it should be understood that in some cases, the first type of event is not the only factor triggering the operation of reducing the memory occupation of the memory operation item. That is, the occurrence of the first type of event is part of the trigger time of the operation of reducing the memory occupation of the memory operation item, and the trigger time refers to the occurrence of the first type of event under a certain condition. For example, when the condition is that the computing device used by the user is a computing device with a computing performance reaching a first standard, the occurrence of a specific first type of event triggers the operation of reducing the memory occupation of a specific memory operation item. For another example, when the condition is that the computing device used by the user is a computing device with a computing performance reaching a second standard, the occurrence of the same specific first type of event does not trigger the operation of reducing the memory occupation of the aforementioned specific memory operation item, but triggers the operation of reducing the memory occupation of another memory operation item. Similarly, in some cases, the second type of event is not the only factor triggering the operation of restoring the memory occupation of the memory operation item. That is, the occurrence of the second type of event is part of the trigger time of the operation of restoring the memory occupation of the memory operation item, and the trigger time refers to the occurrence of the second type of event under a certain condition. Therefore, the trigger time of the operation of each memory operation item can be set in the memory management strategy.

[0088] In an embodiment of the present disclosure, the first type of event refers to an event in the event of requesting registration that triggers a memory occupation reduction operation on a memory operation item, for example, a background cutting event, a low memory warning receiving event, a low power warning receiving event, and the like. In an embodiment of the present disclosure, the scene-out event can also be considered as the first type of event.

[0089] In an embodiment of the present disclosure, the second type of event refers to an event in the event of requesting registration that triggers a memory occupation recovery operation on a memory operation item, for example, a foreground cutting event, a scene-out event, and the like. For example, the foreground cutting event can trigger the recovery of the memory operation item corresponding to the foreground cutting event and having been executed the memory occupation reduction operation to the initial state. For example, the scene-out event can trigger the recovery of the memory operation item corresponding to the scene-out event and having been executed the memory occupation reduction operation to the initial state.

[0090] According to the technical scheme provided by the embodiments of the present disclosure, the event triggering the memory management operation includes the first type of event triggering the memory occupation reduction operation and the second type of event triggering the memory occupation recovery operation, wherein the operation of the memory operation item corresponding to the event is triggered based on the memory management strategy in response to the event triggering the memory management operation, including: the memory occupation reduction operation of the memory operation item corresponding to the event is triggered based on the memory management strategy in response to the first type of event, or the memory occupation recovery operation of the memory operation item having been executed the memory occupation reduction operation is triggered based on the memory management strategy in response to the second type of event. The memory can be dynamically managed based on the memory management strategy for the first type of event or the second type of event, and the memory optimization effect is achieved.

[0091] In an embodiment of the present disclosure, the memory occupation recovery operation of the memory operation item having been executed the memory occupation reduction operation corresponding to the event is triggered based on the memory management strategy in response to the second type of event, including: determining whether the reference count of the memory operation item having been executed the memory occupation reduction operation corresponding to the event is zero based on the memory management strategy in response to the second type of event; and recovering the memory operation item having been executed the memory occupation reduction operation to the initial state according to the reference count of the memory operation item having been executed the memory occupation reduction operation corresponding to the event being zero.

[0092] In one embodiment of the present disclosure, the same memory operation item can be triggered by different first type events. When the memory operation item that has executed the memory occupation reducing operation is recovered in response to the second type event, the specific memory operation item can have been triggered to execute the memory occupation reducing operation by another first type event. Therefore, a reference count needs to be set for the memory operation item, and only when the reference count is 0, it indicates that the memory operation item has not been triggered to execute the memory occupation reducing operation, and thus can be recovered to the initial state in response to the second type event. In this way, the recovery of the memory operation item group can be accurately and dynamically performed, and the misoperation can be prevented.

[0093] According to the technical scheme provided by the embodiment of the present disclosure, the memory occupation reducing operation triggered by the recovery of the memory operation item that has executed the memory occupation reducing operation corresponding to the event in response to the second type event based on the memory management strategy comprises: determining whether the reference count of the memory operation item that has executed the memory occupation reducing operation corresponding to the event is 0 in response to the second type event based on the memory management strategy; and recovering the memory operation item that has executed the memory occupation reducing operation to the initial state according to the reference count of the memory operation item that has executed the memory occupation reducing operation corresponding to the event being 0. The memory can be dynamically managed based on the memory management strategy for the second type event, the memory optimization effect can be achieved, and the memory operation item can be prevented from being recovered incorrectly through the reference count of the memory operation item.

[0094] In one embodiment of the present disclosure, the step S101 comprises: receiving an event registration request of an application, and registering an event triggering a memory management operation, a condition representing a user feature, and a memory operation item group composed of memory operation items for operating on a memory operation object in response to the event registration request, wherein the memory management operation triggered by the operation on the memory operation item corresponding to the event based on the memory management strategy in response to the event triggering the memory management operation comprises: the operation on the memory operation item group corresponding to the event based on the memory management strategy in response to the event triggering the memory management operation.

[0095] In one embodiment of the present disclosure, the memory operation item associated with the event registered in response to the event registration request can be referred to as a general operation item. In one embodiment of the present disclosure, the general operation item can be a plurality of memory operation items, and the registered memory operation item associated with the event can be considered to constitute a memory operation item pool. In one embodiment of the present disclosure, the memory operation item group can be registered as a memory operation item group composed of at least one memory operation item triggered in response to the event. The memory operation item group corresponding to any one of the registered events is composed of at least one memory operation item in the general operation item, that is, a part of the memory operation items in the memory operation item pool are selected to constitute the memory operation item group,

[0096] In one embodiment of the present disclosure, upon receiving an event registration request of an application, the application declares the correspondence between the triggering of an event and a memory operation item. In one embodiment of the present disclosure, in the application, the management of one or more memory operation items can be triggered in response to the occurrence of an event. In this case, the memory operation items triggered by one event can be set as a memory operation item group, that is, the occurrence of an event can trigger the memory occupation reduction operation of each memory operation item in a memory operation item group as a whole, or the occurrence of an event can trigger the recovery of the initial state of each memory operation item in a memory operation item group that has performed the memory occupation reduction operation, for example, the recovery of the memory occupation of the function that has been executed to reduce the memory occupation, or in other words, the recovery of the function of the memory occupation reduction operation that has been closed or released or cleaned up. In one embodiment of the present disclosure, different events can trigger the management of the same memory operation item, or different memory operation item groups triggered by different events can have the same memory operation item. In other words, different memory operation item groups can contain (reference) the same memory operation item.

[0097] According to the technical scheme provided by the embodiments of the present disclosure, the event registration request of the application is received, and the event triggering the memory management operation, the condition representing the user feature, and the memory operation item group composed of the memory operation items for operating the memory operation object are registered in response to the event registration request, including: receiving the event registration request of the application, and registering the event triggering the memory management operation, the condition representing the user feature, and the memory operation item group composed of the memory operation items for operating the memory operation object in response to the event registration request, wherein the operation of the memory operation item corresponding to the event is triggered in response to the occurrence of the event triggering the memory management operation based on the memory management strategy, including: the operation of the memory operation item group corresponding to the event is triggered in response to the occurrence of the event triggering the memory management operation based on the memory management strategy, the memory operation items can be managed in groups, and the event can trigger the operation of the memory operation item group including multiple memory operation items, and the efficient memory management operation is realized.

[0098] In one embodiment of the present disclosure, the memory management method in the application according to the embodiments of the present disclosure further includes: based on the memory management strategy, in response to the occurrence of another first type event after the first type event that has occurred first, adding at least one memory operation item in the memory operation item group corresponding to the first type event that has occurred first.

[0099] In an embodiment of the present disclosure, in the case that the occurrence of the first type of event triggers the reducing memory occupation operation on the memory operation item group, another first type of event can also occur after the first type of event. For example, the first type of event is an entering scene event, and another first type of event occurring after the entering scene event can be a background event, and thus at least one new memory operation item can be added in the memory operation item group registered when the entering scene event is registered. In an embodiment of the present disclosure, even in the case that the memory management strategy has been generated, the memory operation item group corresponding to the first type of event can be adjusted, so as to intelligently and dynamically manage the memory.

[0100] According to the technical scheme provided by the embodiment of the present disclosure, by responding to the occurrence of another first type of event after the first type of event occurring in advance, at least one memory operation item is added in the memory operation item group corresponding to the first type of event occurring in advance based on the memory management strategy, the existing memory operation item group can be dynamically adjusted after the memory management strategy is determined, so as to dynamically manage the memory, and the memory optimization effect is achieved.

[0101] In an embodiment of the present disclosure, the step S101 comprises: in response to entering an application scene of the application, receiving an event registration request for the application scene, and registering an event triggering a memory management operation for the application scene, a condition representing a user feature, and a memory operation item for operating a memory operation object in response to the event registration request.

[0102] In an embodiment of the present disclosure, the application scene can refer to a scene in which the application in the computing device runs. For example, a scene such as a driving navigation scene, a walking navigation scene, and the like in which a navigation application on a vehicle-mounted computing device or a portable terminal runs. For example, a scene such as a fast-forward playback scene, a background playback scene, and the like in which a video playback application on a desktop computer or a mobile terminal runs. For example, a scene such as a night mode scene, a fast scanning scene, and the like in which a monitoring application of a fixed monitoring device or a mobile monitoring device runs.

[0103] In an embodiment of the present disclosure, registering the event, the condition, and the memory operation item can refer to that, after receiving the event registration request, the memory management method in the application according to the embodiment of the present disclosure determines the event, the condition, and the memory operation item to be registered according to the specific scene and the entering scene event. In another aspect, all events that can occur from the entering scene event for a specific application scene to the exiting scene event for the specific application scene are events registered in response to the event registration request (the entering scene event).

[0104] In one embodiment of the present disclosure, in different application scenarios, the registration event request is different. In different application scenarios, the registered event, condition and memory operation item are also different. Therefore, in different application scenarios, the registered event is the event registered by the request of the application scenario, and the memory operation item associated with the event is the memory operation item associated with the event for the application scenario. In this way, the intelligence, dynamics and effectiveness of memory management can be ensured.

[0105] In one embodiment of the present disclosure, the memory management module can listen to events for the current application scenario, that is, detect whether the set event in the memory management strategy occurs. According to the current application scenario, the memory operation item group set in the memory management strategy is managed in response to the occurrence of the registered first type event or the second type event. In one embodiment of the present disclosure, the memory operation item in the managed memory operation item group can be part or all of the general memory operation item (memory operation item pool).

[0106] In one embodiment of the present disclosure, the memory operation item group of the same event in different application scenarios in one application can be the same or different. For example, the navigation memory operation item group in the line navigation scenario in the navigation application and the navigation memory operation item group in the small video scenario in the navigation application can be completely different or partially the same.

[0107] According to the technical scheme provided by the embodiments of the present disclosure, the event registration request of the receiving application is received to register the event triggering the memory management operation, the condition representing the user characteristics and the memory operation item for operating the memory operation object in response to the event registration request, including: in response to entering the application scenario of the application, the event registration request for the application scenario is received to register the event triggering the memory management operation for the application scenario, the condition representing the user characteristics and the memory operation item for operating the memory operation object in response to the event registration request. The event, condition and memory operation item for enabling the application running in the computing device to be managed can be registered for the application scenario, so that the memory of the application in the specific application scenario is in a healthy and stable state, thereby stably running in the operating system where the application is located, and avoiding the application being forcibly exited by the operating system. Moreover, for different event registration requests, different events, conditions and memory operation items can be used to intelligently and dynamically manage the memory in different application scenarios, so as to achieve different memory optimization effects.

[0108] In one embodiment of the present disclosure, the condition representing the user characteristics includes device information of the computing device running the application, wherein the device information includes a memory occupation threshold value that makes the application be forcibly exited in the operating system of the computing device.

[0109] In an embodiment of the present disclosure, in order to avoid being forced to exit by the operating system, the application can obtain a memory occupancy threshold that the application is to reach when the operating system forces the application to exit. The memory management method in the application according to the embodiment of the present disclosure can consider this memory occupancy threshold when generating a memory management strategy, and perform an operation of reducing memory occupancy, so that the memory occupancy of the application can be lower than the memory occupancy threshold, to avoid the application being forced to exit by the operating system. The form of the memory occupancy threshold can be different according to different operating systems, which is not limited in the present disclosure.

[0110] According to the technical scheme provided by the embodiment of the present disclosure, the condition representing the user feature includes device information representing a computing device running the application, wherein the device information includes a memory occupancy threshold that causes the application to be forced to exit in the operating system of the computing device, which can ensure that the memory of the application running in the computing device is in a healthy and stable state, and avoid the application being forced to exit by the operating system.

[0111] The following refers to Figure 2 An example implementation scenario in which the memory management method in the application according to an embodiment of the present disclosure is applied to a navigation application is described. Figure 2 A schematic diagram showing an example implementation scenario in which the memory management method in the application according to an embodiment of the present disclosure is applied to a navigation application is shown.

[0112] As Figure 2 shown, a plurality of application scenarios in a navigation application in the operating system of a computing device are shown in block 201, such as in-line navigation, family map, cycling navigation, walking navigation, small video, and the like. In an embodiment of the present disclosure, the application scenarios of the navigation application are numerous, and the ways in which users apply the navigation application are also quite different, and in this case, the memory occupancy of the navigation application also presents great differences due to the different application scenarios. For example, in various application scenarios of the navigation application, the computing device where the navigation application is located can be in screen-on use or screen-off use; 3D stereoscopic rendering can be needed to be started, or only 2D rendering can be used; it can be used in a stationary state, or it can be used in a high-speed motion state. The memory management method in the application according to the embodiment of the present disclosure has obvious advantages when applied to such a navigation application with great differences in application scenarios, and can ensure that the memory occupied by the navigation application is in a healthy and stable state when running in the computing device, and avoid the application being forced to exit by the operating system.

[0113] It should be understood that although the memory management method executed in the application is discussed by taking the navigation application as an example in the embodiment of the present disclosure, the memory management method in the application according to the embodiment of the present disclosure is not limited to the navigation application, but can also be executed in various types of applications running in any other computing device, and is particularly suitable for applications with numerous functional modules and large memory requirements.

[0114] like Figure 2 As shown, box 202 represents an event (Action) registered in response to a navigation event registration request, such as an entry event, an exit event, a foreground event, a background event, a low memory warning event, a low battery warning event, etc. These events registered in response to the navigation event registration request can be referred to as navigation application events. In one embodiment of this disclosure, some of these navigation application events may also exist in other applications, while others may exist only in the navigation application and not in other applications.

[0115] like Figure 2 As shown, box 203 represents the Event, Condition, and Action Item Controller (or ACF CONTROLLER), i.e., the aforementioned reference Figure 1 The described memory management module is used to execute a memory optimization matching mechanism, responsible for scheduling or managing corresponding memory operation items based on different events and conditions. The event, condition, and operation item controller (or ACF CONTROLLER) is also the aforementioned ACF Manager Center or ACF event registration center. In one embodiment of this disclosure, the event, condition, and operation item controller can be referred to as the navigation application event, navigation application condition, and navigation application operation item controller in the navigation application, i.e., the navigation memory management module.

[0116] like Figure 2 As shown, box 204 represents the various navigation memory operation item groups set in the navigation memory management strategy, and each navigation memory operation item group includes the corresponding navigation memory operation item. Figure 2 The navigation application action group in frame 204 is a sample of the navigation application action group corresponding to each event in the navigation memory management strategy generated in the in-line navigation scenario of the navigation application. As the complexity of the navigation application and navigation application scenario increases, the navigation memory action group and the navigation memory action items within it may be continuously added to meet memory management needs.

[0117] like Figure 2 As shown, the first navigation memory operation group includes navigation memory operations: navigation AJX GC, navigation fireworks effect, navigation release C card, navigation low video memory mode, navigation clear rendering cache, navigation disable anti-aliasing, and navigation release F card. The navigation memory operations in the first navigation memory operation group are described below as examples. In one example of this disclosure, the first navigation application operation group is a navigation memory operation group registered in response to the occurrence of a scene entry event in the navigation scene.

[0118] Navigation AJX GC: Perform garbage collection of JS (JavaScript) in the navigation application to release JS memory.

[0119] Navigation Fireworks: Destroy the fireworks effect on the home page in the navigation application.

[0120] Navigation Release C Card: Release the toolbox-related functions on the home page in the navigation application.

[0121] Navigation Low-Display Memory Mode: Reduce rendering in the current application scenario in the navigation application, and local white blocks appear on the map.

[0122] Navigation Clear Rendering Cache: Clear the memory occupied by map rendering in the navigation application.

[0123] Navigation Close Anti-aliasing: Make the map in the navigation application display a jagged effect and release the memory occupied by the anti-aliasing function.

[0124] Navigation Release F Card: Destroy the business in the main map bottom area in the navigation application.

[0125] In the above example, in the in-line navigation scenario in the navigation application, based on the navigation memory management strategy, in response to listening to the enter scenario event, triggering the operation of the above-mentioned first navigation memory operation item group to reduce memory occupation, to release or reduce the occupation of the corresponding memory.

[0126] As shown in Figure 2 , the second navigation memory operation item group includes navigation memory operation items: navigation release MapView, navigation close large map at intersection, navigation close building, navigation simple three-dimensional, navigation close TMC, and navigation close POI. The following example describes the navigation memory operation items in the second navigation memory operation item group. In one example of the present disclosure, the second navigation operation item group is a navigation memory operation item group registered in response to the occurrence of the background event of the in-line navigation scenario.

[0127] Navigation Release MapView: Stop map drawing updates in the navigation application.

[0128] Navigation Close Large Map at Intersection: Close the large map display effect when navigating to an intersection in the navigation application.

[0129] Navigation Close Building: Hide the building blocks on the map in the navigation application.

[0130] Navigation Simple Three-Dimensional: Close the three-dimensional model in the navigation application and change to a flat model.

[0131] Navigation Close TMC: Only display congestion information when the scale is enlarged to 10 meters in the navigation application.

[0132] Navigation close POI: POI points of interest on the map in the navigation application are not displayed.

[0133] In the above example, in the navigation scene in the row, based on the navigation memory management strategy, in response to listening to the background event, the operation of reducing the memory occupation of the second navigation memory operation item group is triggered to release or reduce the occupation of the corresponding memory.

[0134] The above refers to Figure 2 The implementation framework of the memory management method in the navigation application is described exemplarily. The following describes the navigation memory management strategy generated by the memory management method in the navigation application according to the embodiment of the present disclosure through exemplary Table 1.

[0135] Table 1

[0136]

[0137]

[0138] As shown in Table 1, in the row of the navigation application, the navigation memory management strategy is generated based on the navigation application event registered according to the request obtained, the navigation application condition (device level in Table 1) related to the user of the navigation application, and the navigation memory operation item associated with the navigation application event and the navigation application condition. In the navigation memory management strategy, the navigation application event triggering the memory operation, the navigation application condition representing the user feature, and a plurality of navigation memory operation items for operating the navigation memory operation item are set. For the same event, the triggering time of the operation of the navigation memory operation item can be different due to the different conditions. That is, for the same event, the navigation memory operation item group composed of a plurality of navigation memory operation items can also be different. For example, from Table 1, it can be seen that for the entering-in-row navigation scene event, the triggering time of some navigation memory operation items is only the occurrence of the entering-in-row navigation scene event, and the triggering time of some other navigation memory operation items is the occurrence of the entering-in-row navigation scene event and the device running the navigation application is a low-end machine. In this case, when the entering-in-row navigation scene event of the navigation application occurs in the device as a high-end machine, the navigation memory operation item group can only include the feature_turnoff_fireworks navigation operation item and the feature_turnoff_notvavivui navigation operation item. In this case, when the entering-in-row navigation scene event of the navigation application occurs in the device as a low-end machine, the navigation memory operation item group can include the feature_turnoff_fireworks navigation operation item, the feature_turnoff_notvavivui navigation operation item, the feature_turnoff_anti-aliasing navigation operation item, the feature_turnon_lowmemorymode navigation operation item, the feature_turnoff_tmc navigation operation item, the feature_turnoff_buildingblock navigation operation item, the feature_release_fcard navigation operation item, and the feature_turnoff_simple3d navigation operation item.

[0139] As shown in Table 1, the memory operation item (navigation memory operation item) can be defined to include three parts, i.e., feature, action and memory operation object (navigation memory operation object). Among them, the feature is a prefix representing the navigation memory operation item, and the action and the navigation memory operation object are the core of how the navigation memory operation item performs the memory operation. For example, the action can include turnoff (turn off), turnon (turn on), release (release), clear (clear) and the like. For example, the navigation memory operation object can include a certain service, a certain function, a certain effect, a certain mode, a certain memory occupation and the like. In an embodiment of the present disclosure, the navigation memory operation item can only include the action and the navigation memory operation object.

[0140] In an embodiment of the present disclosure, the memory operation item includes an action of performing a memory operation and a memory operation object subjected to the memory operation.

[0141] According to the technical scheme provided by the embodiment of the present disclosure, by the memory operation item including an action of performing a memory operation and a memory operation object subjected to the memory operation, the operation on the memory operation item can be performed, the memory can be intelligently and dynamically managed, and the memory optimization effect can be achieved.

[0142] As shown in Table 1, among the navigation application events, the navigation application conditions and the navigation memory operation items as the basis for generating the navigation memory management strategy, the navigation application events include: entering the in-line navigation scene event, the low memory warning or the low power warning event, the background cutting event, the entering the lane level event; the navigation application conditions (1 represents the device, and 0 represents the non-device) include that the device is a low-end device, a middle-end device or a high-end device. It should be understood that the low-end device, the middle-end device and the high-end device defined in the embodiment of the present disclosure are only examples listed for explaining the navigation application conditions, and the definition thereof can be different as the technology develops, and therefore, the present disclosure does not make a specific description thereof.

[0143] Referring to the "description" column in Table 1, the navigation memory operation item includes:

[0144] The memory operation item feature_turnoff_fireworks for turning off the main graph fireworks service in the navigation application;

[0145] The memory operation item vuifeature_turnoff_notvavivui for turning off the non-in-line vui (voice user interface) in the navigation application;

[0146] The navigation memory operation item feature_turnoff_anti-aliasing for turning off the main graph anti-aliasing function in the navigation application;

[0147] Navigation memory operation item feature_turnon_lowmemorymode for turning on low memory mode in a navigation application;

[0148] Navigation memory operation item feature_turnoff_tmc for turning off TMC depth information in a navigation application;

[0149] Navigation memory operation item feature_turnoff_buildingblock for turning off building blocks in a navigation application;

[0150] Navigation memory operation item feature_release_fcard for releasing a main f card in a navigation application;

[0151] Navigation memory operation item feature_turnoff_simple3d for turning off simple 3D in a navigation application;

[0152] Navigation memory operation item feature_turnoff_mappoi for turning off displaying map POIs in a navigation application;

[0153] Navigation memory operation item feature_clear_rendervideocache for clearing a rendering engine video cache in a navigation application;

[0154] Navigation memory operation item feature_clear_renderbackgroundcache for clearing a rendering engine background cache in a navigation application.

[0155] As shown in Table 1, in the generated navigation memory management strategy, under the condition that the user's device is a low-end machine, the navigation memory operation item group triggered by the occurrence of the "entering the navigation scene in the row" navigation application event to execute the operation of reducing memory occupation can include the navigation memory operation items feature_turnoff_fireworks, feature_turnoff_notvavivui, feature_turnoff_anti-aliasing, feature_turnon_lowmemorymode, feature_turnoff_tmc, feature_turnoff_buildingblock, and feature_release_fcard. Under the condition that the user's device is a medium-end machine or a high-end machine, the navigation memory operation item group triggered by the occurrence of the "entering the navigation scene in the row" event can include the navigation memory operation items feature_turnoff_fireworks and feature_turnoff_notvavivui. That is, from the trigger time in Table 1, it can be determined that for different conditions related to the user of the navigation application, even in the same event of the same application scenario of the same navigation application, the navigation memory operation item group corresponding to the event is different. Therefore, it is necessary to generate a navigation memory management strategy based on the registered events obtained by the navigation request, the navigation application conditions related to the user of the navigation application, and the navigation memory operation items associated with the navigation application event and the navigation application condition. The generated navigation memory management strategy is different for different conditions, and realizes the intelligentization of navigation memory management.

[0156] As shown in Table 1, in the generated navigation memory management strategy, under the condition that the user's device is a low-end machine, the navigation memory operation item group triggered by the occurrence of the "low memory warning or low power warning" event can include the navigation memory operation items feature_turnoff_tmc, feature_turnoff_buildingblock, and feature_turnoff_mappoi. Under the condition that the user's device is a medium-end machine or a high-end machine, the navigation memory operation item group triggered by the occurrence of the "low memory warning or low power warning" navigation application event (at this trigger time) can include the navigation memory operation item feature_turnoff_mappoi.

[0157] As shown in Table 1, in the generated navigation memory management strategy, no matter whether the user device is a low-end machine, a middle-end machine or a high-end machine, the navigation memory operation item group triggered by the "background-off" navigation application event can include the navigation memory operation items feature_turnoff_mappoi, feature_clear_rendervideocache and feature_clear_renderbackgroundcache.

[0158] As shown in Table 1, in the generated navigation memory management strategy, under the condition that the user device is a low-end machine, the occurrence of the "enter lane level" navigation application event (at the triggering time) triggers the navigation memory operation item feature_turnoff_mappoi for reducing the navigation memory occupation.

[0159] Table 1 gives an example of the navigation memory management strategy generated by the memory management method in the navigation application according to the embodiments of the present disclosure. Those skilled in the art can understand that the content shown in Table 1 is only an example. In the actual implementation of the scheme of the embodiments of the present disclosure, the navigation application events of various navigation application scenarios are not limited to the navigation application events shown in Table 1, the conditions related to the users of the navigation application are not limited to the levels of the user devices shown in Table 1, the navigation memory operation items associated with the navigation application events and the navigation application conditions are not limited to the navigation memory operation items shown in Table 1, and the generated navigation memory management strategy is not limited to the navigation memory management strategy shown in Table 1.

[0160] The following refers to Figure 3 The following refers to Figure 1 An example of the flowchart of one embodiment of the memory management method in the application applied to the navigation application according to the embodiments of the present disclosure is shown. Figure 3 An example of the flowchart of one embodiment of the memory management method in the application applied to the navigation application according to the embodiments of the present disclosure is shown.

[0161] The following refers to the in-line navigation scenario of the runtime of the navigation application of the computing device.

[0162] First, start entering the in-line navigation scenario, construct the enhanced mode Config configuration (step 3001), start the enhanced mode (step 3002), and start the system in the navigation application for executing the scheme of the embodiments of the present disclosure, i.e. Figure 2The ACF CONTROLLER 203 (hereinafter referred to as ACF CONTROLLER) in the application receives a navigation event registration request, registers a navigation application event, a navigation application condition, and a general navigation operation item (or a navigation memory operation item), and generates a navigation memory management strategy (step 3003). When the ACF CONTROLLER 203 is started, a condition related to a user of the navigation application can be obtained. At this time, the ACF CONTROLLER 203 starts to listen to all registered navigation application events (step 3004). As shown in FIG. 30, it can be listened to that a quit scene event (step 3005) is listened to, a low memory warning event (step 3006) is listened to, an enter scene event (step 3007) is listened to, and more navigation application events (step 3008) are listened to. Figure 3

[0163] When the ACF CONTROLLER 203 listens to the registered navigation application event of the application scene, such as listening to the low memory warning event (step 3006) in the in-line navigation process, the navigation memory operation item is intelligently scheduled according to the navigation memory management strategy (step 3009). The implementation of intelligently scheduling the navigation memory operation item can refer to the foregoing related content of the specification.

[0164] When the ACF CONTROLLER 203 listens to the registered navigation application event, the corresponding registered navigation memory operation item is executed according to the navigation memory management strategy to perform a memory occupation reducing operation, thereby releasing memory to reduce the pressure of memory occupation of the application, ensure long-term stable operation of the in-line application, and avoid being forced to exit by the operating system.

[0165] In the application, steps 3010 to 3015 refer to an execution manner example of intelligently scheduling the navigation memory operation item according to the navigation memory management strategy (step 3009). Among them, steps 3010 to 3015 are operations of executing the navigation memory operation item to release memory, and steps 3013 to 3015 are operations of restoring the operation item to the initial state. Figure 3

[0166] ​​In step 3010, events are filtered according to the navigation memory management policy, retaining navigation application events set in the policy. For example, if the navigation memory management policy does not set the navigation application event, the filtering result is negative, and the memory reduction operation for this navigation memory operation item ends. If the navigation memory management policy sets the navigation application event, step 3011 is executed, filtering conditions according to the policy. If the navigation memory management policy does not set the navigation application condition, it is filtered out, and the memory reduction operation for this navigation memory operation item ends. If the navigation memory management policy sets the navigation application condition, it is not filtered out, i.e., the filtering result is positive, and the memory reduction operation for this navigation memory operation item is executed to release memory, step 3012.

[0167] In step 3013, the ACF controller 203 determines whether the detected navigation application event is an entry event. For example, if the determination result is yes, then proceed to step 3014. If the determination result is no, then the recovery operation of the navigation memory operation item caused by the entry event ends. In step 3014, it is determined whether the navigation memory operation item reference count (which can be simply referred to as the operation item reference count) is 0. If the determination result of step 3014 is no, it means that the navigation memory operation item reference count is not 0, that is, the navigation memory operation item exists in other navigation memory operation item groups, and there is currently a navigation application event triggering the navigation memory operation item. Therefore, the recovery operation of the navigation memory operation item ends. If the determination result of step 3014 is yes, it means that the navigation memory operation item reference count is 0, the navigation memory operation item does not exist in other navigation memory operation item groups, and there is currently no navigation application event triggering the navigation memory operation item. Therefore, step 3015 can be executed to restore the navigation memory operation item to its initial state.

[0168] The following is for reference Figure 4 An example describing the workflow of the aforementioned ACF controller. Figure 4 Show execution Figure 3 The diagram illustrates the workflow of an exemplary ACF controller for intelligent scheduling memory operations.

[0169] like Figure 4 As shown, the ACF controller can perform operations to release memory when it receives events such as a low memory warning event. When it receives events such as a foreground switch event, the ACF controller can restore the executed memory operations to their initial state to resume business operation. Figure 4 The workflow of the ACF controller shown is a simplified conceptual description; its specific workflow can be found in the descriptions in the foregoing embodiments.

[0170] In one embodiment of the present disclosure, a memory management method in a navigation application is provided, the navigation application comprising a navigation memory management module, the method comprising the following steps performed by the navigation memory management module:

[0171] receiving a navigation event registration request of the navigation application, and registering, in response to the navigation event registration request, a navigation application event triggering a memory management operation, a navigation application condition representing a user feature of the navigation application, and a navigation memory operation item for operating a memory operation object in the navigation application;

[0172] generating a navigation memory management strategy based on the registered navigation application event, the navigation application condition, and the navigation memory operation item, wherein the navigation application event triggering the memory management operation and at least one navigation memory operation item corresponding to the navigation application event are set in the navigation memory management strategy;

[0173] triggering, based on the navigation memory management strategy, an operation on the navigation memory operation item corresponding to the navigation application event in response to occurrence of the navigation application event triggering the memory management operation.

[0174] According to the technical scheme provided by the embodiments of the present disclosure, the navigation application comprises a navigation memory management module, the method comprises the following steps performed by the navigation memory management module: receiving a navigation event registration request of the navigation application, and registering, in response to the navigation event registration request, a navigation application event triggering a memory management operation, a navigation application condition representing a user feature of the navigation application, and a navigation memory operation item for operating a memory operation object in the navigation application; generating a navigation memory management strategy based on the registered navigation application event, the navigation application condition, and the navigation memory operation item, wherein the navigation application event triggering the memory management operation and at least one navigation memory operation item corresponding to the navigation application event are set in the navigation memory management strategy; triggering, based on the navigation memory management strategy, an operation on the navigation memory operation item corresponding to the navigation application event in response to occurrence of the navigation application event triggering the memory management operation. The navigation application event, the navigation application condition, and the navigation memory operation item that enable the memory management of the navigation application running in the computing device can be registered, the memory of the navigation application is ensured to be in a healthy and stable state during the running of the navigation application, thereby the navigation application is stably run in the operating system where the navigation application is located, and the navigation application is avoided to be forcibly exited by the operating system. Moreover, for different navigation event registration requests, the memory can be intelligently and dynamically managed based on different navigation application events, navigation application conditions representing user features, and navigation memory operation items, so as to achieve the memory optimization effect. Moreover, the navigation application condition representing the user feature can ensure that the navigation memory management strategy is suitable for different people.

[0175] In one embodiment of the present disclosure, the memory management method within the navigation application can be implemented as described above with reference to Figures 1 to 4 The memory management method within the application in the described embodiments can have the corresponding features and thus can also have the corresponding technical effects.

[0176] The following describes the memory management device within the application according to an embodiment of the present disclosure. Figure 5 The memory management device within the application according to an embodiment of the present disclosure is described. Figure 5 A structural block diagram of the memory management device within the application according to an embodiment of the present disclosure is shown. The memory management device within the application 500 includes an event registration module 501, a memory management strategy generation module 502, and a memory operation module 503.

[0177] The event registration module 501 is configured to receive an event registration request of an application, and to register an event triggering a memory management operation, a condition representing a user feature, and a memory operation item for operating a memory operation object in response to the event registration request.

[0178] The memory management strategy generation module 502 is configured to generate a memory management strategy based on the registered event, condition, and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy.

[0179] The memory operation module 503 is configured to trigger an operation on the memory operation item corresponding to the event in response to the occurrence of the event triggering the memory management operation based on the memory management strategy.

[0180] According to the technical scheme provided by the embodiment of the present disclosure, the event registration module is configured to receive an event registration request of an application, and register an event triggering a memory management operation, a condition representing a user feature, and a memory operation item used for operating a memory operation object in response to the event registration request; the memory management strategy generation module is configured to generate a memory management strategy based on the registered event, condition, and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy; and the memory operation module is configured to trigger an operation on the memory operation item corresponding to the event in response to the event triggering the memory management operation based on the memory management strategy. The event, condition, and memory operation item that enable the application running in the computing device to be subjected to memory management can be registered, so that the memory of the application is kept in a healthy and stable state during the running of the application, thereby stably running in the operating system where the application is located, and avoiding the application from being forcibly exited by the operating system. Moreover, different events, conditions representing user features, and memory operation items can be used to intelligently and dynamically manage the memory based on different event registration requests, so as to achieve the memory optimization effect. Moreover, the condition representing the user feature can ensure that the memory management strategy is suitable for different people.

[0181] Figure 6 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.

[0182] The embodiment of the present disclosure further provides an electronic device, as shown in Figure 6 The electronic device includes at least one processor 601 and a memory 602 connected with the at least one processor 601 in communication; the memory 602 stores instructions executable by the at least one processor 601, and the instructions are executed by the at least one processor 601 to implement the following steps:

[0183] The event registration request of the application is received, and the event triggering the memory management operation, the condition representing the user feature, and the memory operation item used for operating the memory operation object are registered in response to the event registration request;

[0184] The memory management strategy is generated based on the registered event, condition, and memory operation item, wherein the event triggering the memory management operation and at least one memory operation item corresponding to the event are set in the memory management strategy;

[0185] The operation on the memory operation item corresponding to the event is triggered in response to the event triggering the memory management operation based on the memory management strategy.

[0186] In one embodiment of the present disclosure, the memory management strategy is configured with a trigger timing of a memory management operation, the trigger timing including an event triggering the memory management operation, or including the event triggering the memory management operation and a condition representing a user feature,

[0187] The memory management strategy is used to trigger the operation of the memory operation item corresponding to the event based on the trigger timing configured in the memory management strategy.

[0188] The memory management strategy is used to trigger the operation of the memory operation item corresponding to the event based on the trigger timing configured in the memory management strategy.

[0189] In one embodiment of the present disclosure, the memory operation item includes an action of performing a memory operation and a memory operation object on which the memory operation is performed.

[0190] In one embodiment of the present disclosure, the event triggering the memory management operation includes a first type of event triggering an operation to reduce memory occupation and a second type of event triggering an operation to recover memory occupation,

[0191] The memory management strategy is used to trigger the operation of the memory operation item corresponding to the event based on the trigger timing configured in the memory management strategy.

[0192] The memory management strategy is used to trigger the operation of the memory operation item corresponding to the event based on the trigger timing configured in the memory management strategy.

[0193] The memory management strategy is used to trigger the operation of the memory operation item corresponding to the event based on the trigger timing configured in the memory management strategy.

[0194] The memory management strategy is used to trigger the operation of the memory operation item corresponding to the event based on the trigger timing configured in the memory management strategy.

[0195] The memory management strategy is used to trigger the operation of the memory operation item corresponding to the event based on the trigger timing configured in the memory management strategy.

[0196] According to the reference count of the memory operation item corresponding to the event triggering the memory management operation being zero, the memory operation item performing the memory occupation reduction operation is recovered to an initial state.

[0197] In one embodiment of the present disclosure, the receiving an event registration request of an application, registering, in response to the event registration request, an event triggering a memory management operation, a condition representing a user feature, and a memory operation item for operating a memory operation object, comprises:

[0198] receiving an event registration request of an application, registering, in response to the event registration request, an event triggering a memory management operation, a condition representing a user feature, and a memory operation item group consisting of memory operation items for operating a memory operation object,

[0199] wherein the triggering, based on the memory management policy, an operation on the memory operation item corresponding to the event in response to the event triggering a memory management operation, comprises:

[0200] triggering, based on the memory management policy, an operation on the memory operation item group corresponding to the event in response to the event triggering a memory management operation.

[0201] In one embodiment of the present disclosure, the instructions are further executable by the at least one processor 601 to implement the following steps:

[0202] triggering, based on the memory management policy, an operation on the memory operation item group corresponding to the event in response to the event triggering a memory management operation.

[0203] In one embodiment of the present disclosure, the receiving an event registration request of an application, registering, in response to the event registration request, an event triggering a memory management operation, a condition representing a user feature, and a memory operation item for operating a memory operation object, comprises:

[0204] In response to entering an application scenario of the application, receiving an event registration request for the application scenario, and registering, in response to the event registration request, an event triggering a memory management operation for the application scenario, a condition representing a user feature, and a memory operation item for operating a memory operation object.

[0205] In one embodiment of the present disclosure, the condition representing a user feature comprises device information representing a computing device running the application, wherein the device information comprises a memory occupancy threshold value that causes the application to be forcibly exited in an operating system of the computing device.

[0206] Figure 7 is a structural schematic diagram of a computer system suitable for implementing the method according to the embodiments of the present disclosure. As shown in Figure 7As shown, the computer system 700 includes a processing unit 701 which can perform various processing in the above-described embodiments shown in the accompanying drawings according to a program stored in a read-only memory (ROM) 702 or a program loaded from the storage section 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0207] Connected to the I / O interface 705 are an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as necessary. A removable recording medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 710 as necessary, so that a computer program read therefrom is installed into the storage section 708 as necessary. Among them, the processing unit 701 can be implemented as a CPU, a GPU, a TPU, a FPGA, a NPU, or the like.

[0208] In particular, according to embodiments of the present disclosure, the methods described above with reference to the accompanying drawings can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a non-transitory computer readable medium, the computer program containing program code for executing the methods in the accompanying drawings. In such embodiments, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from the removable recording medium 711. For example, embodiments of the present disclosure include a non-transitory computer readable medium having stored thereon computer instructions that, when executed by a processor, implement program code for executing the methods in the accompanying drawings.

[0209] The flow and block diagrams in the drawings represent possible architectural, functional, and operational architectures of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block can represent a module, a segment, or a portion of code that comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0210] The units or modules described in the embodiments of the present disclosure can be implemented by software, or by hardware. The described units or modules can also be arranged in a processor, and the name of the unit or module does not constitute a limitation on the unit or module itself in some cases.

[0211] As another aspect, the present disclosure also provides a computer readable storage medium, which can be the computer readable storage medium included in the node in the above embodiments, or can exist separately from the device and not be assembled into the device. The computer readable storage medium stores one or more programs for execution by one or more processors to perform the method described in the present disclosure.

[0212] The above description is merely preferred embodiments of the present disclosure and a description of principles of applied technologies. It should be understood by those skilled in the art that the scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and also covers other technical solutions formed by the combinations of the above technical features or equivalent features without departing from the inventive concept. For example, the technical solutions formed by the mutual replacement of the above features and the technical features disclosed in the present disclosure (but not limited to) having similar functions.

Claims

1. An in-application memory management method, characterized in that, The application includes a memory management module that executes the "Event-Condition-Memory Operation Item" (ACF) management method. The method includes the following steps performed by the memory management module: Receive an event registration request from the application, and in response to the event registration request register an event that triggers memory management operations, a condition representing user characteristics, and a memory operation item for operating on a memory operation object; wherein, the memory operation item refers to an item set in the application for operating on objects in the application that involve memory usage, and the memory operation item includes the action of performing memory operations and the memory operation object being operated on. A memory management policy is generated based on registered events, conditions, and memory operation items, wherein the memory management policy sets an event that triggers a memory management operation and at least one memory operation item corresponding to the event; Based on the memory management strategy, in response to the occurrence of an event that triggers a memory management operation, an operation is triggered on the memory operation item corresponding to the event.

2. The method according to claim 1, characterized in that, The memory management strategy includes settings for triggering memory management operations. These triggering events can be either events that trigger memory management operations or events that trigger memory management operations combined with conditions representing user characteristics. The step of triggering the execution of a memory operation item corresponding to the memory management operation in response to the occurrence of an event that triggers a memory management operation, based on the memory management strategy, includes: The operation on the memory operation item corresponding to the event is triggered based on the triggering timing set in the memory management strategy.

3. The method according to claim 1, characterized in that, The events that trigger memory management operations include a first type of event that triggers an operation to reduce memory usage and a second type of event that triggers an operation to restore memory usage. The step of triggering an operation on the memory operation item corresponding to the memory operation in response to an event that triggers a memory management operation, based on the memory management strategy, includes: Based on the memory management strategy, in response to the first type of event triggering a memory operation corresponding to the event to reduce memory usage, or Based on the memory management strategy, in response to the second type of event, a memory usage recovery operation is triggered for the memory operation item that has performed a memory usage reduction operation corresponding to the event.

4. The method according to claim 3, characterized in that, The memory management strategy, in response to the second type of event triggering a memory operation item that has performed a memory usage reduction operation corresponding to the event, includes the following: Based on the memory management strategy, in response to the second type of event, it is determined whether the reference count of the memory operation item that has performed a memory usage reduction operation corresponding to the event is zero; If the reference count of the memory operation item that has performed the memory reduction operation corresponding to the event is zero, restore the memory operation item that has performed the memory reduction operation to its initial state.

5. The method according to claim 3, characterized in that, The receiving application's event registration request, in response to which the event registration request is made, registers an event that triggers a memory management operation, a condition representing a user characteristic, and a memory operation item for operating on a memory operation object, including: Receive an event registration request from the application, and in response to the event registration request, register the event that triggers the memory management operation, the condition representing the user characteristics, and a group of memory operation items consisting of memory operation items for operating on memory operation objects. The step of triggering an operation on the memory operation item corresponding to the memory operation in response to an event that triggers a memory management operation, based on the memory management strategy, includes: Based on the memory management strategy, in response to the occurrence of an event that triggers a memory management operation, an operation is triggered on the memory operation item group corresponding to the event.

6. The method according to claim 5, characterized in that, The method further includes: Based on the memory management strategy, in response to the triggering of another first-type event after the first-type event is triggered first, at least one memory operation item is added to the memory operation item group corresponding to the first-type event.

7. The method according to any one of claims 1 to 6, characterized in that, The receiving application's event registration request, in response to which the event registration request is made, registers an event that triggers a memory management operation, a condition representing a user characteristic, and a memory operation item for operating on a memory operation object, including: In response to entering the application scenario, an event registration request for the application scenario is received, and in response to the event registration request, an event that triggers memory management operations for the application scenario, a condition representing user characteristics, and a memory operation item for operating on memory operation objects are registered.

8. The method according to any one of claims 1 to 6, characterized in that, The conditions representing user characteristics include device information representing the computing device running the application, wherein the device information includes a memory usage threshold that would force the application to quit within the operating system of the computing device.

9. An in-application memory management device, wherein the memory management device executes an "Event-Condition-Memory Operation" (ACF) management method, characterized in that, The device includes: The event registration module is configured to receive event registration requests from the application, and in response to the event registration requests, register events that trigger memory management operations, conditions representing user characteristics, and memory operation items for operating on memory operation objects; wherein, the memory operation items refer to items set in the application for operating on objects in the application that involve memory usage; The memory management policy generation module is configured to generate a memory management policy based on registered events, conditions, and memory operation items. The memory management policy sets an event that triggers a memory management operation and at least one memory operation item corresponding to the event. The memory operation item includes an action to perform a memory operation and a memory operation object to which the memory operation is performed. The memory operation module is configured to, based on the memory management policy, trigger operations on the memory operation items corresponding to the event that triggers the memory management operation.

10. A memory management method within a navigation application, characterized in that, The navigation application includes a navigation memory management module, which executes the "Event-Condition-Memory Operation Item" ACF management method. This method includes performing the following steps through the navigation memory management module: The system receives a navigation event registration request from a navigation application and, in response to the request, registers a navigation application event that triggers memory management operations, navigation application conditions representing user characteristics of the navigation application, and navigation memory operation items for operating on memory operation objects of the navigation application. The memory operation item refers to an item set in the application that operates on objects in the application that involve memory usage; the memory operation item includes the action of performing memory operations and the memory operation object being operated on. A navigation memory management strategy is generated based on registered navigation application events, navigation application conditions, and navigation memory operation items. The navigation memory management strategy sets a navigation application event that triggers memory management operations and at least one navigation memory operation item corresponding to the navigation application event. Based on the navigation memory management strategy, in response to a navigation application event that triggers a memory management operation, an operation is triggered on the navigation memory operation item corresponding to the navigation application event.

11. An electronic device comprising a memory and a processor; wherein, The memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method as described in any one of claims 1-8, 10.

12. A readable storage medium having stored thereon computer instructions that, when executed by a processor, implement the method as claimed in any one of claims 1-8 and 10.

13. A computer program product comprising computer instructions that, when executed by a processor, implement the method as described in any one of claims 1-8, 10.

Citation Information

Patent Citations

  • Information processing method and electronic equipment

    CN105893134A

  • Game screen display control method and device, and electronic equipment

    CN107398070A

  • Memory control method and device

    CN108073520A

  • Memory management method and device of application program, terminal equipment and medium

    CN110633141A