CN107526690B - Method and device for clearing cache - Google Patents

Method and device for clearing cache Download PDF

Info

Publication number
CN107526690B
CN107526690B CN201610454882.8A CN201610454882A CN107526690B CN 107526690 B CN107526690 B CN 107526690B CN 201610454882 A CN201610454882 A CN 201610454882A CN 107526690 B CN107526690 B CN 107526690B
Authority
CN
China
Prior art keywords
application
network management
management system
data
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610454882.8A
Other languages
Chinese (zh)
Other versions
CN107526690A (en
Inventor
耿凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201610454882.8A priority Critical patent/CN107526690B/en
Priority to PCT/CN2017/089375 priority patent/WO2017219982A1/en
Publication of CN107526690A publication Critical patent/CN107526690A/en
Application granted granted Critical
Publication of CN107526690B publication Critical patent/CN107526690B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention provides a method and a device for clearing cache, wherein the method comprises the following steps: determining the duration of unused application in the network management system; and after the duration that the application is not used is determined to exceed the preset expiration time, the cache data in the memory of the network management system is cleared. The invention solves the problems of unsmooth interface operation, unsmooth operation and influence on user experience caused by excessive network management cache by clearing the memory of the network management system, and improves the operation efficiency of the network management and the smoothness of user operation.

Description

Method and device for clearing cache
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for removing a cache.
Background
With the continuous development of communication network technology, the amount of communication traffic is increasing. Intelligent network systems are increasingly used in engineering releases. Currently, network management is a cache mechanism, that is, data is cached in a memory when an interface is opened for the first time. And opening the network management interface again to acquire data from the memory, and accelerating the interface expansion speed. Because the cache occupies too much memory, the maximum memory limit of a network management Jave Virtual Machine (Java Virtual Machine Java, JVM for short) is sometimes approached, and the memory overflow is the exceeding. Therefore, the operation of the network manager is blocked, thereby influencing the user experience.
Under the conditions of long running time of the network management and more open interfaces. A large amount of data is stored in a memory, and the maximum 32 bits of the network management client in the related technology can only be set to 930M memory. In addition, there are many cases that 400 boards are inserted into 1 network element. A medium bureau has at least 50 sites and is configured with complex traffic, plus a large amount of alarm reporting data. This data volume is quite large and the network administrator cannot effectively handle large data volume caching. In the related technology, the network management cache is unmanaged, the memory cannot be released, and the cache occupies too large memory of the network management, so that the interface operation is blocked, the operation is not smooth, and the user experience is influenced.
In view of the above problems, no effective solution has been proposed in the related art.
Disclosure of Invention
The embodiment of the invention provides a method and a device for clearing cache, which are used for at least solving the problems that in the related technology, the network management cache is not managed, the memory cannot be released, and the cache occupies too large memory of the network management, so that the interface operation is blocked, the operation is not smooth, and the user experience is influenced.
According to an embodiment of the present invention, there is provided a method for clearing a cache, including: determining the duration of unused application in the network management system; and clearing the cache data in the memory of the application in the network management system after determining that the unused duration of the application exceeds the preset expiration time.
Optionally, after determining that the duration of the unused application exceeds the preset expiration time, clearing the cache data in the memory of the application in the network management system includes: when the duration time of the unused application exceeds the preset expiration time and the window of the application is in an activated state, switching the functional thread of the application to a background, setting the functional thread to be in a dormant state, and releasing the cache data of the application in the memory of the network management system; and/or releasing the cache data of the application in the memory of the network management system when the unused duration of the application exceeds the preset expiration time and the window of the application is in a closed state.
Optionally, the releasing the cache data applied in the memory of the network management system includes: searching the port object list of the lowest application layer, clearing data in the port object list and releasing a memory occupied by the port object list; searching the single board and the network element object list corresponding to the application from the lowest layer upwards step by step, and deleting the single board and the network element object list corresponding to the application; and searching the data list of the application, clearing the data in the data list of the application and releasing the memory occupied by the data list of the application.
Optionally, the releasing the cache data applied in the memory of the network management system further includes at least one of the following: deleting data corresponding to the data in the port object list stored in a database of the network management system; deleting a listener object for listening to the application; deleting the user interface object of the application.
Optionally, after determining that the duration of the unused application exceeds the preset expiration time, clearing the cache data in the memory of the application in the network management system includes: encapsulating an execution command according to the unused duration of the application, the name of the application and the state of the window of the application, wherein the execution command has a function identified by the network management system; and sending the execution command to the network management system, wherein the execution command is used for indicating the network management system to clear the cache data in the memory of the application according to the unused duration of the application, the name of the application and the state of the window of the application.
Optionally, the method further includes: and updating the preset expiration time according to an updating rule.
According to another embodiment of the present invention, there is provided an apparatus for clearing a cache, including: the determining module is used for determining the unused duration of the application in the network management system; and the clearing module is used for clearing the cache data in the memory of the application in the network management system after determining that the unused duration time of the application exceeds the preset expiration time.
Optionally, the clearing module includes: a release unit, configured to switch a functional thread of the application to a background to set the functional thread to a dormant state when it is determined that the duration of the unused application exceeds the preset expiration time and the window of the application is in an active state, and release the cache data of the application in the memory of the network management system; and/or releasing the cache data of the application in the memory of the network management system when the unused duration of the application exceeds the preset expiration time and the window of the application is in a closed state.
Optionally, when releasing the cache data applied in the memory of the network management system, the releasing unit includes: the first searching subunit is used for searching the port object list of the lowest application layer; the first emptying subunit is used for emptying the data in the port object list and releasing the memory occupied by the port object list; a second searching subunit, configured to search, from the lowest layer, a veneer and a network element object list corresponding to the application step by step upwards; a first deleting subunit, configured to delete the single board and the network element object list corresponding to the application; the third searching subunit is used for searching the application data list; and the second emptying subunit is used for emptying the data in the application data list and releasing the memory occupied by the application data list.
Optionally, the releasing unit further includes at least one of: a second deleting subunit, configured to delete data corresponding to the data in the port object list stored in the database of the network management system; a third deleting subunit, configured to delete a listener object for listening to the application; and the fourth deleting subunit is used for deleting the user interface object of the application.
Optionally, the clearing module includes: the encapsulation unit is used for encapsulating an execution command according to the unused duration of the application, the name of the application and the state of the window of the application, wherein the execution command has a function identified by the network management system; a sending unit, configured to send the execution command to the network management system, where the execution command is used to instruct the network management system to clear the cache data of the application in the memory of the network management system according to the unused duration of the application, the name of the application, and the state of the window of the application.
Optionally, the apparatus further comprises: and the updating module is used for updating the preset expiration time according to an updating rule.
According to still another embodiment of the present invention, there is also provided a storage medium. The storage medium is configured to store program codes for performing the above-described steps.
According to the invention, when the duration of the unused application exceeds the expected time, the cache data applied in the memory of the network management system is cleared, so that the problems that the network management cache is not managed, the memory cannot be released, the cache occupies too large network management memory, the interface operation is blocked, the operation is not smooth, and the user experience is influenced can be solved, and the effects of improving the operation efficiency of the network management and improving the user operation experience and smoothness can be achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow diagram of a method of flushing a cache according to an embodiment of the invention;
FIG. 2 is a flowchart of operations for flushing a cache, according to an embodiment of the invention;
fig. 3 is a block diagram of an apparatus for clearing a cache according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In this embodiment, a method for clearing a cache is provided, and fig. 1 is a flowchart of a method for clearing a cache according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
step S102, determining the duration of unused application in the network management system;
and step S104, clearing the cache data in the memory of the application in the network management system after determining that the unused duration of the application exceeds the preset expiration time.
The main execution body of the above steps may be a network management system, or may be a processing device, and the processing device may be integrated in the network management system, or may exist as a separate device.
Through the steps, when the duration time of the unused application exceeds the expected time, the cache data applied in the memory of the network management system is cleared, so that the problems that the network management cache is not managed, the memory cannot be released, the cache occupies too large network management memory, the interface operation is blocked, the operation is not smooth, and the user experience is influenced can be solved, and the effects of improving the operation efficiency of the network management and improving the user operation experience and smoothness are achieved.
In an optional embodiment, after determining that the duration of the unused application exceeds a preset expiration time, clearing the cache data in the memory of the network management system by the application includes: when the duration time of the unused application exceeds the preset expiration time and the window of the application is in an activated state, switching the functional thread of the application to a background, setting the functional thread to be in a dormant state, and releasing the cache data of the application in the memory of the network management system; and/or releasing the cache data of the application in the memory of the network management system when the unused duration of the application exceeds the preset expiration time and the window of the application is in a closed state. In the present embodiment, two scenarios are applicable: firstly, the application function which is opened for a long time but is not used is opened for a long time, the duration time of the unused application function after the application function is opened exceeds the preset expiration time, the function thread is switched to a background and is set to be in a dormant state, the function thread can be activated from the dormant state when the application function is used again, and the activation mode is not limited. And secondly, closing the lost application function interface, counting the application function interface which is not opened again for a long time if the application function interface is not opened again for a long time, and periodically deleting the cache data of the application function interface in the memory of the network management system. Optionally, the expiration time may be set, or may be processed according to a default time of the network management system, for example: default 6 hours.
In an optional embodiment, the releasing the cache data applied in the memory of the network management system includes: searching the port object list of the lowest application layer, clearing data in the port object list and releasing a memory occupied by the port object list; searching the single board and the network element object list corresponding to the application from the lowest layer upwards step by step, and deleting the single board and the network element object list corresponding to the application; and searching the data list of the application, emptying the data in the data list of the application and releasing the memory occupied by the data list of the application. In the embodiment, first, a port object list of the lowest layer corresponding to an application is searched, the searched port list is removed, a memory occupied by data in the port list is released, the application of the port list is assigned to be empty, and the memory occupied by the port list is released; then, searching upwards step by step from the lowest layer to find a single board and a network element object list, switching the functional threads of the single board and the network element object list to a background, setting the functional threads to be in a dormant state, and releasing the memory; and finally, searching a data list of the application function, removing the data list, and assigning the application of the data list to be null. More data related to the application can be searched through the first-level and first-level searching, so that more caches can be cleared, and more space can be released.
In an optional embodiment, the releasing the cache data applied in the memory of the network management system further includes at least one of the following: deleting data corresponding to the data in the port object list stored in a database of the network management system; deleting a listener object for listening to the application; deleting the user interface object of the application. In the above embodiment, if the relevant list data is also stored in the database, the relevant function statement may be called to delete the table data stored in the application database, and a destruction operation may be performed on the user interface object to release the data memory occupied by the user interface; if a certain list or module in the application data is not complete, the application cannot be actually applied, and related function statements can be called, for example, according to a main key of a data table in a database, a deletion statement in SQL is called, the incomplete application data is deleted, and the memory is released.
In an optional embodiment, after determining that the duration of the unused application exceeds a preset expiration time, the clearing the cache data in the memory of the application in the network management system includes: encapsulating an execution command according to the unused duration of the application, the name of the application and the state of the window of the application, wherein the execution command has a function identified by the network management system; and sending the execution command to a network management system, wherein the execution command is used for indicating the network management system to clear the cache data applied in the memory of the network management system according to the unused duration of the application, the name of the application and the state of the window of the application. In the above embodiment, the execution main body may be the processing device, and the processing device may associate the current operation object, the unused duration of the application, the name of the application, and the state of the window of the application according to a tree structure (not limited to the tree structure), set a priority according to a parent-child structure, associate the tree structure with the application, encapsulate the data structure into an execution command that can be recognized by the network management system, such as an F interface command currently used by the network management system, and an Abstract Syntax Notation (asn.1) object structure, and notify the network management system of the message of the structure to perform the processing of clearing the cache. The execution command structure may be composed of a plurality of attribute fields, and includes structure objects such as a network element, a board, a port, and application data, and each structure object is identified by an identifier ID as a unique key of the entire network.
In an optional embodiment, the method further includes: and updating the preset expiration time according to the updating rule. In this embodiment, the update operation may occur at any time, and after it is determined that the expiration time needs to be updated, the update operation on the expiration time may be performed, where the update rule may be various, for example, the expiration time may be updated according to a change in the importance level of the application (when the importance level of an application becomes more important, the expiration time corresponding to the application needs to be appropriately extended), the expiration time may also be updated according to a change in the usage scenario of the application, and of course, the expiration time may also be updated in other manners.
The invention is illustrated below with reference to specific examples:
fig. 2 is a flowchart of operations of clearing a cache according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
step 201: opening the device;
step 202, setting an expiration time; the scheme in the embodiment can be integrated on a network management system (or can be detected as network management), can set the expiration time, and can also process according to the default time of the network management, such as 6 hours;
step 203: analyzing the time of the application function interface from opening to closing; the application program interface is opened and closed, and the functional framework can be recorded by the onClicked and onClosed keywords respectively; analyzing the current memory occupation condition of each application;
step 204: analyzing the current window activation state of the application; analyzing the activation state of the network management application interface window, if the activation mark belongs to Active, if the current window is Closed, marking as Closed;
step 205: generating a data structure according to the key information; and associating according to the current operation object, the name of the application function, the opening-to-closing time of the interface and the window activation state and according to the tree structure (regardless of the tree structure). Setting priorities (EMS, group, NE, rack, shelf, board and TP) according to parent and child nodes, and associating the priorities into a large tree data structure;
step 206: packaging the data structure into a command which can be identified by the network management; for example, the current use of the network manager is F interface command, ASN1 object structure, and the message of the structure is used to inform the network manager to process; the interface command structure is composed of a plurality of attribute fields, and comprises network elements, a single board, ports, application function data and other structural objects associated in step 205, and each object is identified by ID as a unique key word of the whole network; the command is sent to the server by the client, and the server device (integrated in the network management server) is informed to execute the command;
step 207: the network management analyzes the command; finding out which function is specific according to the attribute of the command and the attribute of the functional data of the interface; after the function is found, the time from opening to closing of the function interface is compared with the preset timeout, and if the interface is not closed, the time attribute is set to be infinite;
step 208: decomposing the command into units;
step 209: judging whether the period is exceeded;
step 210: not expiring, skipping the cell;
step 211: judging whether to activate;
step 212: the period is expired and the window is activated, and the unit thread is set to be dormant; if it is expired, and the window is active. Then the present solution removes the work thread for which the function is enabled from the thread pool and sets it to sleep. After the thread is dormant, the memory occupied by the thread is released, and the memory is redistributed when the thread is started;
step 213: when the time is out and the window is closed, the network manager clears the cache according to the unit operation object and releases the memory; if it is expired, and the window is in a closed state. In the function range, the scheme firstly searches the port object list at the lowest layer, removes the list and releases the memory occupied by the data. Assigning the list reference to null, releasing the memory occupied by the list, and calling a delete sql statement to delete the list data if the data is also stored in the database;
and searching upwards step by step to find the list of the single board and the network element object. If the method in step 210 deletes the object save list, release the memory;
and finally, searching an application module function self data list (corresponding to the application self data list), clearing the list clear, and assigning the reference to null. The function also has a listener object, and the present invention drops the listener object to which the function relates. The function also has an interface UI object, the invention executes the destroy operation on the UI object, destroys the UI object and releases the memory;
if the application module data is incomplete, the data cannot be practically applied. Then the invention carries out the deletion operation of the residual data, according to the main key of the database table, the delete sql statement is called, the corresponding residual data is deleted, and the occupied memory is released;
step 214: the cache flush is successful.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a device for clearing a cache is further provided, where the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described again after the description is given. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 3 is a block diagram of a structure of an apparatus for clearing a cache according to an embodiment of the present invention, and as shown in fig. 3, the apparatus includes a determining module 32 and a clearing module 34, and the apparatus is described below:
a determining module 32, configured to determine a duration of time during which an application in the network management system is not used; a clearing module 34, connected to the determining module 32, configured to clear the cache data in the memory of the network management system after determining that the duration of the unused application exceeds a preset expiration time.
In an optional embodiment, the purging module 34 includes a releasing unit, configured to switch the functional thread of the application to a background and set the functional thread to a dormant state when it is determined that the duration of the unused application exceeds a preset expiration time and the window of the application is in an active state, and release the cache data in the memory of the network management system; and/or releasing the cache data in the memory of the application in the network management system when the unused duration of the application exceeds the preset expiration time and the window of the application is in a closed state.
In an alternative embodiment, the releasing unit includes: the first searching subunit is used for searching the port object list of the lowest application layer; a first emptying subunit, configured to empty the data in the port object list and release the memory occupied by the port object list; a second searching subunit, configured to search, from the lowest layer upwards, a list of single boards and network element objects corresponding to the application step by step; a first deleting subunit, configured to delete the single board and the network element object list corresponding to the application; a third searching subunit, configured to search the application data list; and the second emptying subunit is used for emptying the data in the application data list and releasing the memory occupied by the application data list.
In an optional embodiment, the releasing unit further comprises at least one of: a second deleting subunit, configured to delete data corresponding to the data in the port object list stored in the database of the network management system; a third deleting subunit, configured to delete a listener object for monitoring the application; and the fourth deleting subunit is used for deleting the user interface object of the application.
In an alternative embodiment, the purge module 34 comprises: an encapsulation unit, configured to encapsulate an execution command according to the unused duration of the application, the name of the application, and the state of the window of the application, where the execution command has a function identified by the network management system; and a sending unit, configured to send the execution command to the network management system, where the execution command is used to instruct the network management system to clear the cache data in the memory of the network management system according to the unused duration of the application, the name of the application, and the state of the window of the application.
In an optional embodiment, the apparatus further comprises: and the updating module is used for updating the preset expiration time according to an updating rule.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are located in different processors in any combination.
The embodiment of the invention also provides a storage medium. Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, determining the duration of unused application in a network management system;
and S2, clearing the cache data in the memory of the application in the network management system after determining that the unused duration of the application exceeds the preset expiration time.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, in this embodiment, the processor executes the above steps according to program codes stored in the storage medium.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
Through the scheme in the embodiment of the invention, on one hand, the problem that the network management cache cannot be cleared is solved, the operation efficiency of the network management is greatly improved, and the operation experience and the smoothness of a user are improved. The network management cache in the related technology is not managed, but the network management cache and the occupied memory thereof in the implementation of the invention can be managed in real time. The memory is released when not used, and the network management occupies less system resources. The network management operation and execution of other commands become faster. On the other hand, in the embodiment of the invention, manual participation is not needed when the network management cache is cleared. The condition of errors caused by manual participation is greatly reduced, and human resources are saved. Time and communication cost are saved, and efficiency is improved.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for flushing a cache, comprising:
determining the duration of unused application in the network management system;
after determining that the duration time of the unused application exceeds the preset timeout, clearing the cache data in the memory of the network management system;
wherein, after determining that the duration of the unused application exceeds the preset expiration time, clearing the cache data in the memory of the application in the network management system comprises:
when the duration time of the unused application exceeds the preset expiration time and the window of the application is in an activated state, switching the functional thread of the application to a background, setting the functional thread to be in a dormant state, and releasing the cache data of the application in the memory of the network management system; and/or the presence of a gas in the atmosphere,
when the duration time of the unused application exceeds the preset expiration time and the window of the application is in a closed state, releasing the cache data of the application in the memory of the network management system;
wherein the releasing the cache data applied in the memory of the network management system comprises:
searching the port object list of the lowest application layer, clearing data in the port object list and releasing a memory occupied by the port object list;
searching the single board and the network element object list corresponding to the application from the lowest layer upwards step by step, and deleting the single board and the network element object list corresponding to the application;
and searching the data list of the application, clearing the data in the data list of the application and releasing the memory occupied by the data list of the application.
2. The method according to claim 1, wherein releasing the cached data applied in the memory of the network management system further comprises at least one of:
deleting data corresponding to the data in the port object list stored in a database of the network management system;
deleting a listener object for listening to the application;
deleting the user interface object of the application.
3. The method of claim 1, wherein clearing the cached data of the application from the memory of the network management system after determining that the duration of the unused application exceeds the preset expiration time comprises:
encapsulating an execution command according to the unused duration of the application, the name of the application and the state of the window of the application, wherein the execution command has a function identified by the network management system;
and sending the execution command to the network management system, wherein the execution command is used for indicating the network management system to clear the cache data in the memory of the application according to the unused duration of the application, the name of the application and the state of the window of the application.
4. The method of claim 1, further comprising:
and updating the preset expiration time according to an updating rule.
5. An apparatus for flushing a cache, comprising:
the determining module is used for determining the unused duration of the application in the network management system;
the clearing module is used for clearing the cache data in the memory of the application in the network management system after determining that the duration time of the unused application exceeds the preset expiration time;
wherein the purge module comprises:
a release unit, configured to switch a functional thread of the application to a background to set the functional thread to a dormant state when it is determined that the duration of the unused application exceeds the preset expiration time and the window of the application is in an active state, and release the cache data of the application in the memory of the network management system; and/or releasing the cache data of the application in the memory of the network management system when the unused duration of the application exceeds the preset expiration time and the window of the application is in a closed state;
wherein the release unit includes:
the first searching subunit is used for searching the port object list of the lowest application layer;
the first emptying subunit is used for emptying the data in the port object list and releasing the memory occupied by the port object list;
a second searching subunit, configured to search, from the lowest layer, a veneer and a network element object list corresponding to the application step by step upwards;
a first deleting subunit, configured to delete the single board and the network element object list corresponding to the application;
the third searching subunit is used for searching the application data list;
and the second emptying subunit is used for emptying the data in the application data list and releasing the memory occupied by the application data list.
6. The apparatus of claim 5, wherein the release unit further comprises at least one of:
a second deleting subunit, configured to delete data corresponding to the data in the port object list stored in the database of the network management system;
a third deletion subunit, configured to delete a listener object used for listening to the application;
and the fourth deleting subunit is used for deleting the user interface object of the application.
7. The apparatus of claim 5, wherein the purge module comprises:
the encapsulation unit is used for encapsulating an execution command according to the unused duration of the application, the name of the application and the state of the window of the application, wherein the execution command has a function identified by the network management system;
a sending unit, configured to send the execution command to the network management system, where the execution command is used to instruct the network management system to clear the cache data of the application in the memory of the network management system according to the unused duration of the application, the name of the application, and the state of the window of the application.
8. The apparatus of claim 5, further comprising: and the updating module is used for updating the preset expiration time according to an updating rule.
CN201610454882.8A 2016-06-21 2016-06-21 Method and device for clearing cache Active CN107526690B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610454882.8A CN107526690B (en) 2016-06-21 2016-06-21 Method and device for clearing cache
PCT/CN2017/089375 WO2017219982A1 (en) 2016-06-21 2017-06-21 Cache clear method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610454882.8A CN107526690B (en) 2016-06-21 2016-06-21 Method and device for clearing cache

Publications (2)

Publication Number Publication Date
CN107526690A CN107526690A (en) 2017-12-29
CN107526690B true CN107526690B (en) 2022-12-02

Family

ID=60735347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610454882.8A Active CN107526690B (en) 2016-06-21 2016-06-21 Method and device for clearing cache

Country Status (2)

Country Link
CN (1) CN107526690B (en)
WO (1) WO2017219982A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669706A (en) * 2018-12-24 2019-04-23 麒麟合盛网络技术股份有限公司 The management method and device of application
CN116737358B (en) * 2022-10-28 2024-05-17 荣耀终端有限公司 Memory refreshing method and electronic equipment
CN116662222A (en) * 2022-11-22 2023-08-29 荣耀终端有限公司 Cache management method and related equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008108195A (en) * 2006-10-27 2008-05-08 Canon Inc Device monitoring system, management server, monitoring device, device monitoring method, storage medium, program
CN103209212A (en) * 2013-03-22 2013-07-17 烽火通信科技股份有限公司 Data caching method and system in Web network management client based on rich internet application (RIA)
CN104298549A (en) * 2014-09-30 2015-01-21 北京金山安全软件有限公司 Method and device for cleaning application programs in mobile terminal and mobile terminal
CN104298612A (en) * 2014-09-30 2015-01-21 北京金山安全软件有限公司 Method and device for cleaning memory in mobile terminal and mobile terminal
CN104461746A (en) * 2014-12-30 2015-03-25 中科创达软件股份有限公司 Memory space optimization method and system based on Android system
CN104714895A (en) * 2015-03-23 2015-06-17 努比亚技术有限公司 Mobile terminal and method and device for increasing running speed of mobile terminal
CN105045723A (en) * 2015-06-26 2015-11-11 深圳市腾讯计算机系统有限公司 Processing method, apparatus and system for cached data

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012043238A (en) * 2010-08-20 2012-03-01 Toyo Electric Mfg Co Ltd Retain-memory saving method of programmable controller

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008108195A (en) * 2006-10-27 2008-05-08 Canon Inc Device monitoring system, management server, monitoring device, device monitoring method, storage medium, program
CN103209212A (en) * 2013-03-22 2013-07-17 烽火通信科技股份有限公司 Data caching method and system in Web network management client based on rich internet application (RIA)
CN104298549A (en) * 2014-09-30 2015-01-21 北京金山安全软件有限公司 Method and device for cleaning application programs in mobile terminal and mobile terminal
CN104298612A (en) * 2014-09-30 2015-01-21 北京金山安全软件有限公司 Method and device for cleaning memory in mobile terminal and mobile terminal
CN104461746A (en) * 2014-12-30 2015-03-25 中科创达软件股份有限公司 Memory space optimization method and system based on Android system
CN104714895A (en) * 2015-03-23 2015-06-17 努比亚技术有限公司 Mobile terminal and method and device for increasing running speed of mobile terminal
CN105045723A (en) * 2015-06-26 2015-11-11 深圳市腾讯计算机系统有限公司 Processing method, apparatus and system for cached data

Also Published As

Publication number Publication date
WO2017219982A1 (en) 2017-12-28
CN107526690A (en) 2017-12-29

Similar Documents

Publication Publication Date Title
CN107104824B (en) Network topology determination method and device
CN105656714B (en) Data acquisition reporting method and device for mobile equipment
CN109710615B (en) Database access management method, system, electronic device and storage medium
CN112104486A (en) Kubernetes container-based network endpoint slicing method and system
CN110445828B (en) Data distributed processing method based on Redis and related equipment thereof
CN101477386B (en) Timer implementing method and apparatus
CN107526690B (en) Method and device for clearing cache
CN111953568B (en) Method and device for managing packet loss information
CN108566291A (en) A kind of method of event handling, server and system
CN108777662B (en) Table item management method and device
US8224933B2 (en) Method and apparatus for case-based service composition
CN111897643A (en) Thread pool configuration system, method, device and storage medium
CN107094085B (en) Signaling transmission method and device
US9922539B1 (en) System and method of telecommunication network infrastructure alarms queuing and multi-threading
CN105653556B (en) Data aging method and device
CN108154343B (en) Emergency processing method and system for enterprise-level information system
CN108259214B (en) Configuration command management method, device and machine-readable storage medium
CN116016117A (en) Network equipment operation and maintenance data acquisition method and system, electronic equipment and storage medium
CN114281476A (en) Kubernetes cloud native cluster resource deletion protection method, device, equipment and storage medium
CN106161068B (en) Recovery prompting and distributing method for network resources and controller
CN114625594A (en) Configuration file generation method, log collection method, device, equipment and medium
CN110879774A (en) Network element performance data warning method and device
CN111061719A (en) Data collection method, device, equipment and storage medium
CN111400060A (en) Equipment linkage method, device, server and medium
CN114500575B (en) Method, device and storage medium for managing path loss in multi-path object map

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant