A control program-based system cache automatic cleaning method, system and medium
By using the system cache automatic cleanup method of the control program, the cache of self-service terminal devices is periodically cleaned and managed by user level, which solves the problems of device lag and accidental cleanup, and ensures device stability and operation and maintenance efficiency.
Patent Information
- Application Number
- CN202111397070.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-23
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2041-11-23
AI Technical Summary
The accumulation of cache files due to long-term operation of self-service terminals in banks or hospitals can cause device lag and increase the difficulty of maintenance. In addition, different users may accidentally clear important cache files.
The system cache is automatically cleaned periodically using a control-based program. The cache is cleaned in an orderly manner according to user login information, and intelligent cache management is achieved by using a cache monitoring visual control and a cleanup index table, combined with a performance monitoring program.
To prevent terminal devices from laging due to prolonged operation, avoid accidental clearing of important caches by different users, ensure orderly cache clearing, and not affect normal device operation and task processing progress.
Smart Images

Figure CN114238288B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of system cache processing, in particular to a system cache automatic cleaning method based on a control program, a system and a medium. BACKGROUND
[0002] The self-service terminal of a bank or a hospital needs to be online for a long time, and a large number of system cache files will be generated, which will continuously cause the application program on the terminal device to be stuck or some unpredictable errors to occur; if the operation and maintenance period is long, the terminal device memory may reach the storage limit, thereby causing the entire terminal device to be stuck, which increases the operation and maintenance difficulty, cost and time of the terminal device; therefore, a method for periodically and automatically cleaning the cache and sequentially cleaning the cache according to user login information by levels is needed. SUMMARY
[0003] The main purpose of the present application is to develop a method for periodically and automatically cleaning the cache and sequentially cleaning the cache according to user login information by levels, thereby preventing the terminal device from being out of order due to long-term operation, and preventing different terminal users from mistakenly cleaning important caches on the terminal device.
[0004] To achieve the above purpose, one technical scheme adopted by the present application is to provide a system cache automatic cleaning method based on a control program, comprising the following steps:
[0005] An initial configuration step is provided.
[0006] The cache file storage information is obtained, the user information database is configured, and the cache cleaning index table is configured based on the cache file storage information and the user information database.
[0007] A cache self-cleaning step is provided.
[0008] The cache monitoring visual control is configured, the monitoring time period is set, the periodic cache self-cleaning operation is performed based on the cache cleaning index table, the cache monitoring visual control and the monitoring time period, and the cache self-cleaning result is obtained.
[0009] A step of cleaning on demand is provided.
[0010] The cache cleaning controllable program is configured, the cache cleaning instruction is obtained, and the cache specified cleaning operation is performed based on the cache cleaning index table, the cache self-cleaning result, the cache cleaning controllable program and the cache cleaning instruction.
[0011] As an improved scheme, the cache file storage information includes the cache paths of a plurality of cache files and a plurality of cache process identification numbers respectively matched with the plurality of cache paths.
[0012] The user information database is configured with a plurality of username keys and a plurality of user controllable levels respectively matched with the plurality of username keys;
[0013] The cache self-cleaning result includes a first self-cleaning result and a second self-cleaning result; the first self-cleaning result is to meet the operation requirement; and the second self-cleaning result is not to meet the operation requirement;
[0014] The cache cleaning instruction is provided with a first user login account, a cache cleaning requirement value and a to-be-cleaned process identification number.
[0015] As an improved scheme, the step of configuring the cache cleaning index table based on the cache file storage information and the user information database further includes:
[0016] Accessing the user information database, extracting a plurality of username keys and a plurality of user controllable levels;
[0017] Identifying the cache file storage information, screening a plurality of cache specified paths respectively matched with a plurality of user controllable levels from a plurality of cache paths, and screening a plurality of specified identification numbers respectively matched with a plurality of cache specified paths from a plurality of cache process identification numbers;
[0018] Setting the cache paths other than the cache specified paths in a plurality of cache paths as system cache basic paths; and setting the cache process identification numbers other than the specified identification numbers in a plurality of cache process identification numbers as basic identification numbers;
[0019] Based on the system cache basic path, the basic identification number, a plurality of username keys, a plurality of cache specified paths and a plurality of specified identification numbers, an index table creation step is performed to obtain the cache cleaning index table.
[0020] As an improved scheme, the index table creation step includes:
[0021] According to the user controllable level, a plurality of cache specified paths are respectively bound with a plurality of username keys to generate a plurality of first binding indexes; and according to the cache specified path, a plurality of specified identification numbers are respectively bound with a plurality of first binding indexes to generate a plurality of second binding indexes;
[0022] Creating a blank index table, setting a listening filling field and a plurality of index rows respectively matched with a plurality of second binding indexes in the blank index table; and setting a plurality of second binding indexes as a plurality of cache cleaning indexes respectively;
[0023] First, several cache cleanup indexes are filled into several index rows of the blank index table. Then, the system cache base path and the base identifier are filled into the listener field to obtain the cache cleanup index table.
[0024] As an improved approach, the periodic cache self-cleaning operation includes:
[0025] Set the response speed baseline value, speed difference baseline value, cache cleanup baseline value, and process number baseline value; every time the monitoring time period is specified, call the cache monitoring visual control to access the monitoring fill field of the cache cleanup index table; call the cache monitoring visual control to access the system cache base path, and count the first storage occupancy value of the cache files in the system cache base path;
[0026] Configure a performance testing program, and based on the cache monitoring visual control, the basic identifier, the response speed benchmark value, the speed difference benchmark value, the cache cleanup benchmark value, the process quantity benchmark value, the first storage usage value, and the performance testing program, execute a first self-cleaning step to obtain the cache self-cleaning result.
[0027] As an improved solution, the first self-cleaning step includes: calling the cache monitoring visual control to delete the cache files in the system cache base path according to the cache cleanup baseline value, and performing a runtime performance test step;
[0028] The performance testing steps include: calling the performance detection program to obtain the response speed of the first system, and comparing whether the response speed of the first system reaches the response speed benchmark value; if it reaches the benchmark value, then setting the cache self-cleaning result as the first self-cleaning result; if it does not reach the benchmark value, then calculating the speed difference between the response speed of the first system and the response speed benchmark value, and determining whether the speed difference is not greater than the speed difference benchmark value; if it is not greater than the benchmark value, then executing the second self-cleaning step; if it is greater than the benchmark value, then returning to the first self-cleaning step.
[0029] The second self-cleaning step includes: calling the cache monitoring visual control to access system process information; calling the cache monitoring visual control to identify several real-time processes in the system process information; filtering out a first real-time process that matches the basic identifier from among the several real-time processes; calling the cache monitoring visual control to perform a process termination operation on the first real-time process according to the process quantity benchmark value, and returning to the performance test step.
[0030] As an improved approach, the performance testing steps further include:
[0031] A number threshold is set, and when the speed difference value is not greater than the speed difference reference value, a first execution number of the second self-cleaning step is counted; the number threshold and the first execution number are compared; if the first execution number reaches the number threshold, the cache self-cleaning result is set as the second self-cleaning result.
[0032] As an improved scheme, the step of performing the cache specified cleaning operation based on the cache cleaning index table, the cache self-cleaning result, the cache cleaning controllable program and the cache cleaning instruction further comprises:
[0033] When the cache self-cleaning result is the second self-cleaning result, the first user login account, the cache cleaning demand value and the to-be-cleaned process identification number in the cache cleaning instruction are identified; the cache specified cleaning operation is performed based on the cache cleaning controllable program, the first user login account, the cache cleaning demand value, the to-be-cleaned process identification number and a plurality of cache cleaning indexes;
[0034] The cache specified cleaning operation comprises:
[0035] The cache cleaning controllable program is started, and a login interface of the cache cleaning controllable program is accessed; the first user login account is input into an account input area of the login interface; the cache cleaning controllable program is called to identify the first user login account in the account input area, and the cache cleaning controllable program is called to identify a first user name keyword in the first user login account;
[0036] A first cache cleaning index matched with the first user name keyword is filtered out from a plurality of cache cleaning indexes; a first cache specified path and a first specified identification number in the first cache cleaning index are identified; the cache cleaning controllable program is called to clean cache files in the first cache specified path according to the cache cleaning demand value; the cache cleaning controllable program is called to close a system process corresponding to the first specified identification number according to the to-be-cleaned process identification number.
[0037] The application further provides a system cache automatic cleaning system based on a control program, comprising:
[0038] An initial configuration module, a cache self-cleaning module and an on-demand cleaning module;
[0039] The initial configuration module is used for acquiring cache file storage information and configuring a user information database, and the initial configuration module configures a cache cleaning index table based on the cache file storage information and the user information database;
[0040] The cache self-cleaning module is configured to configure a cache monitoring visual control and set a monitoring time period, and performs a periodic cache self-cleaning operation based on the cache cleaning index table, the cache monitoring visual control and the monitoring time period to obtain a cache self-cleaning result.
[0041] The on-demand cleaning module is configured to configure a cache cleaning controllable program and obtain a cache cleaning instruction, and performs a cache specified cleaning operation based on the cache cleaning index table, the cache self-cleaning result, the cache cleaning controllable program and the cache cleaning instruction.
[0042] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the system cache automatic cleaning method based on a control program.
[0043] The application has the following advantages:
[0044] 1. The system cache automatic cleaning method based on a control program can automatically clean the cache in a self-service terminal device periodically, and release the cache under the corresponding permission level according to the login information of the cache cleaning control, thereby preventing the terminal device from lagging due to long running time, preventing different users from mistakenly cleaning important cache, ensuring the ordered cleaning of the cache, and not affecting the normal operation of the terminal device or the processing progress of the terminal device for different cache tasks.
[0045] 2. The system cache automatic cleaning system based on a control program can automatically clean the cache in a self-service terminal device periodically through the cooperation of the initial configuration module, the cache self-cleaning module and the on-demand cleaning module, and release the cache under the corresponding permission level according to the login information of the cache cleaning control, thereby preventing the terminal device from lagging due to long running time, preventing different users from mistakenly cleaning important cache, ensuring the ordered cleaning of the cache, and not affecting the normal operation of the terminal device or the processing progress of the terminal device for different cache tasks.
[0046] 3、The computer readable storage medium described in the application can realize cooperation of the boot initial configuration module, the cache self-cleaning module and the on-demand cleaning module, thereby realizing periodic automatic cleaning of the cache in the self-service terminal device, and releasing the cache under the corresponding permission level according to the login information of the cache cleaning control, which can prevent the terminal device from causing lag due to long running time, prevent different users from mistakenly cleaning important cache, ensure ordered cache cleaning, and will not affect the normal operation of the terminal device, will not affect the processing progress of the terminal device for different cache tasks, and effectively improve the operability of the system cache automatic cleaning method based on the control program. BRIEF DESCRIPTION OF DRAWINGS
[0047] In order to more clearly illustrate the specific embodiments of the application or the technical solutions in the prior art, the drawings needed to be used in the specific embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the application, and those skilled in the art can obtain other drawings according to these drawings without creative labor.
[0048] Figure 1 is a flowchart of the system cache automatic cleaning method based on the control program according to the embodiment 1 of the application;
[0049] Figure 2 is a specific flowchart of the system cache automatic cleaning method based on the control program according to the embodiment 1 of the application;
[0050] Figure 3 is an architecture diagram of the system cache automatic cleaning system based on the control program according to the embodiment 2 of the application. DETAILED DESCRIPTION
[0051] The preferred embodiments of the application will be described in detail below with reference to the accompanying drawings, so that the advantages and features of the application can be more easily understood by those skilled in the art, and the protection scope of the application can be more clearly defined.
[0052] In the description of the application, it should be noted that the embodiments described in the application are part of the embodiments of the application, not all the embodiments; all other embodiments obtained by those skilled in the art without creative labor based on the embodiments in the application belong to the protection scope of the application.
[0053] In the description of the application, it should be noted that the terms "first", "second" are only for description purpose, and cannot be understood as indicating or implying relative importance.
[0054] In the description of the present application, it should be noted that Winform is a window development control.
[0055] Embodiment 1
[0056] The present embodiment provides a system cache automatic cleaning method based on a control program, as shown in Figure 1 and Figure 2 , comprising the following steps:
[0057] S100, initial configuration step, specifically comprising:
[0058] S110, obtaining cache file storage information, configuring a user information database, and configuring a cache cleaning index table based on the cache file storage information and the user information database;
[0059] Specifically, the cache file storage information includes cache paths of a plurality of cache files and a plurality of cache process identification numbers respectively matched with the plurality of cache paths; the cache process identification number represents an identification number corresponding to the generation process of the cache file stored in the cache path, and the identification number includes but is not limited to process name and process number; the user information database is configured with a plurality of username keywords and a plurality of user controllable levels respectively matched with the plurality of username keywords; the username keyword corresponds to different user controllable levels, thereby realizing that different users only manage the cache files under the cache paths at their corresponding levels; the username keyword is part of the characters extracted from the account used for login by the user;
[0060] Specifically, the user information database is accessed, and a plurality of username keywords and a plurality of user controllable levels are extracted; the cache file storage information is identified, a plurality of cache specified paths respectively matched with a plurality of user controllable levels are screened out from a plurality of cache paths, and a plurality of specified identification numbers respectively matched with a plurality of cache specified paths are screened out from a plurality of cache process identification numbers;
[0061] Setting the cache paths other than the cache specified paths as system cache base paths; setting the cache process identification numbers other than the specified identification numbers as base identification numbers; the system cache base paths represent system running cache files that do not affect system running in the embodiment; the base identification numbers are system background process identification numbers that do not affect system running; in this step, the purpose is to partition the cache, one part is user specified cache and process that can be controlled by the user, and the other part is system base process that can be controlled by all users or self-cleaning; therefore, the index table creation step is performed based on the system cache base paths, the base identification numbers, the user name keywords, the cache specified paths and the specified identification numbers, and the cache cleaning index table is obtained;
[0062] Specifically, the index table creation step includes:
[0063] According to the user controllable level, the cache specified paths and the user name keywords are respectively bound to generate a plurality of first binding indexes; according to the cache specified paths, the specified identification numbers and the first binding indexes are respectively bound to generate a plurality of second binding indexes; the second binding index is a user name keyword-cache specified path-specified identification number; a blank index table is created, and a listening fill-in field and a plurality of index rows matched with the second binding indexes are set in the blank index table; the second binding indexes are set as a plurality of cache cleaning indexes; first, the cache cleaning indexes are filled into the index rows of the blank index table, and then the system cache base paths and the base identification numbers are filled into the listening fill-in field, so that the cache cleaning index table is obtained; in this step, the purpose is to bind the cache specified paths and the specified identification numbers to the user name keywords according to the user controllable level, so as to facilitate subsequent screening and calling; correspondingly, the user controllable level is, for example, C disk / A folder / from top to bottom XX row file, etc.
[0064] S200, cache self-cleaning step, specifically including:
[0065] S210, configuring cache listening visual control, setting listening time period, performing periodic cache self-cleaning operation based on the cache cleaning index table, the cache listening visual control and the listening time period, and obtaining cache self-cleaning result; in the embodiment, the cache listening visual control is developed based on Winform;
[0066] Specifically, the cache self-cleaning result includes a first self-cleaning result and a second self-cleaning result; the first self-cleaning result meets the running requirement; the second self-cleaning result does not meet the running requirement;
[0067] Specifically, the periodic cache self-cleaning operation comprises:
[0068] The response speed reference value, the speed difference reference value, the cache cleaning reference value and the process quantity reference value are set; in the embodiment, the response speed reference value, the speed difference reference value, the cache cleaning reference value and the process quantity reference value are set according to the specific running speed and the cache space size of the terminal device system; correspondingly, the response speed reference value is set as the response speed of the system to any simple instruction, which is set as 1.5 s in the embodiment; the speed difference reference value is set as 0.5 s; the cache cleaning reference value is set as 125 MB; the process quantity reference value is set as two; the listening time period is set as 5 days, that is, 120 hours; every time the listening time period elapses, the cache listening visual control is called to access the listening filling field of the cache cleaning index table; the system cache base path is accessed by calling the cache listening visual control, and the first storage occupation value of the cache file in the system cache base path is counted; the first storage occupation value is the current size of the system cache file, which is calculated in units of MB; the performance detection program is configured, which is used to detect the response time of the system to a simple instruction, which is the instruction of opening the computer property panel in the embodiment; the simple instruction is set according to different requirements of the system speed; the first self-cleaning step is executed based on the cache listening visual control, the base identification number, the response speed reference value, the speed difference reference value, the cache cleaning reference value, the process quantity reference value, the first storage occupation value and the performance detection program, and the cache self-cleaning result is obtained; the first self-cleaning step realizes periodic automatic cleaning of the system cache, and the self-cleaning does not clean the cache files under the personal management level of the user, which has a high degree of intelligence.
[0069] Specifically, the first self-cleaning step comprises: the cache listening visual control is called to delete the cache file in the system cache base path according to the cache cleaning reference value, that is, 125 MB of system cache file is cleaned every time in the embodiment, and the running performance test step is executed.
[0070] The running performance test step comprises: calling the performance detection program calling simple instruction and timing, stopping timing according to system response to the simple instruction, and then obtaining the first system response speed; in this embodiment, the system response speed is a descriptive summary, and the unit is second (s); comparing whether the first system response speed reaches the response speed reference value; if yes, it indicates that the system cache file cleaning meets the running demand once, so the cache self-cleaning result is set as the first self-cleaning result; if no, the speed difference between the first system response speed and the response speed reference value is calculated, and it is judged whether the speed difference is not greater than the speed difference reference value; if no, it indicates that the system running can meet the demand without unnecessary process ending basis, so the second self-cleaning step is executed; if yes, it indicates that the system cache file still needs to be cleaned, so the first self-cleaning step is returned to;
[0071] The second self-cleaning step comprises: calling the cache monitoring visual control to access system process information, the system process information being process information of processes currently running in the system; therefore, the cache monitoring visual control identifies a plurality of real-time processes in the system process information; a first real-time process matching the basic identification number is screened out from the plurality of real-time processes, the first real-time process being one or more, and the matching being specific according to real-time conditions; the cache monitoring visual control executes a process ending operation on the first real-time process according to the process quantity reference value, that is, two first implementation processes are ended each time in this embodiment, and the running performance test step is returned to.
[0072] Specifically, the running performance test step further comprises:
[0073] A number threshold is set, and the number threshold is 3 in this embodiment; when the speed difference is not greater than the speed difference reference value, the first execution number of the second self-cleaning step is counted; the number threshold and the first execution number are compared; if the first execution number reaches the number threshold, it indicates that cleaning the system cache and the system process cannot meet the running demand, so the cache self-cleaning result is set as the second self-cleaning result; through step S200, the system cache is effectively and orderly self-cleaned intelligently and periodically, the running stability of the terminal device is improved, and the operation and maintenance difficulty is reduced.
[0074] S300, a cleaning-on-demand step, specifically comprising:
[0075] S310, configure a cache cleaning controllable program, obtain a cache cleaning instruction, and perform a cache specified cleaning operation based on the cache cleaning index table, the cache self-cleaning result, the cache cleaning controllable program, and the cache cleaning instruction; in this embodiment, the cache cleaning controllable program is also developed based on Winform, and the cache cleaning instruction is a login instruction for the cache cleaning controllable program;
[0076] Specifically, the cache cleaning instruction includes a first user login account, a cache cleaning demand value, and a to-be-cleaned process identification number; the cache cleaning demand value is in units of MB;
[0077] Specifically, when the cache self-cleaning result is the second self-cleaning result, the first user login account, the cache cleaning demand value, and the to-be-cleaned process identification number in the cache cleaning instruction are identified; the cache specified cleaning operation is performed based on the cache cleaning controllable program, the first user login account, the cache cleaning demand value, the to-be-cleaned process identification number, and a plurality of cache cleaning indexes;
[0078] The cache specified cleaning operation includes: starting the cache cleaning controllable program, accessing a login interface of the cache cleaning controllable program; inputting the first user login account into an account input area of the login interface; calling the cache cleaning controllable program to identify the first user login account in the account input area, calling the cache cleaning controllable program to identify a first user name keyword in the first user login account; screening a first cache cleaning index that matches the first user name keyword from a plurality of cache cleaning indexes; identifying a first cache specified path and a first specified identification number in the first cache cleaning index; calling the cache cleaning controllable program to clean cache files in the first cache specified path according to the cache cleaning demand value; calling the cache cleaning controllable program to close a system process corresponding to the first specified identification number according to the to-be-cleaned process identification number; therefore, in this embodiment, the cache specified cleaning operation is used to control and process cache files and corresponding specified processes at controllable levels of different users, thereby meeting corresponding running requirements; and because the level permissions of different users are different, the important processes running in the background of other users will not be mistakenly closed by a user, or the important cache files of other users will not be mistakenly cleaned by a user, through the specified cache cleaning manner, not only the cleaning requirement is met, but also a certain order is achieved, the application degree is extremely high, and the development and maintenance are easy; it can be imagined that when a user finishes cleaning and does not meet the running requirement, the user can perform self-detection, detect who has the most cache files at a controllable level, and then notify the user to log in to the cache cleaning controllable program to clean the cache files of the user, which is extremely intelligent.
[0079] Embodiment 2
[0080] This embodiment is based on the same inventive concept as the automatic system cache cleanup method based on control programs described in Embodiment 1, and provides an automatic system cache cleanup system based on control programs, such as... Figure 3 As shown, it includes: an initial configuration module, a cache self-cleaning module, and an on-demand cleanup module;
[0081] In the system cache automatic cleanup system based on control program, the initial configuration module is used to obtain cache file storage information and configure user information database. The initial configuration module configures cache cleanup index table based on the cache file storage information and user information database.
[0082] Specifically, the cache file storage information includes cache paths for several cache files and several cache process identifiers that match the several cache paths respectively; the user information database is configured with several username keywords and several user controllable levels that match the several username keywords respectively;
[0083] Specifically, the initial configuration module accesses the user information database, extracts several username keywords and several user controllable levels; the initial configuration module identifies the cache file storage information, filters out several cache specified paths that match the several user controllable levels from several cache paths, and filters out several specified identifiers that match the several cache specified paths from several cache process identifiers; the initial configuration module sets the cache paths other than the several cache specified paths as the system cache base paths; the initial configuration module sets the cache process identifiers other than the several specified identifiers as base identifiers; the initial configuration module performs an index table creation step based on the system cache base paths, the base identifiers, several username keywords, several cache specified paths, and several specified identifiers to obtain the cache cleanup index table.
[0084] Specifically, the index table creating step comprises: the initial configuration module binds a plurality of the cache specified paths with a plurality of the user name keywords respectively according to the user controllable hierarchy to generate a plurality of first binding indexes; the initial configuration module binds a plurality of the specified identification numbers with a plurality of the first binding indexes respectively according to the cache specified paths to generate a plurality of second binding indexes; the initial configuration module creates a blank index table, and sets a listening fill-in field and a plurality of index rows respectively matched with a plurality of the second binding indexes in the blank index table; the initial configuration module sets a plurality of the second binding indexes as a plurality of cache cleaning indexes respectively; firstly, the initial configuration module fills a plurality of the cache cleaning indexes into a plurality of the index rows of the blank index table respectively, and then the initial configuration module fills the system cache basic path and the basic identification number into the listening fill-in field to obtain the cache cleaning index table.
[0085] In the system cache automatic cleaning system based on the control program, the cache self-cleaning module is configured to configure a cache listening visual control and set a listening time period, and the cache self-cleaning module performs a periodic cache self-cleaning operation based on the cache cleaning index table, the cache listening visual control and the listening time period to obtain a cache self-cleaning result.
[0086] Specifically, the cache self-cleaning result comprises a first self-cleaning result and a second self-cleaning result; the first self-cleaning result is to meet the running requirement; and the second self-cleaning result is not to meet the running requirement.
[0087] Specifically, the periodic cache self-cleaning operation comprises: the cache self-cleaning module sets a response speed reference value, a speed difference reference value, a cache cleaning reference value and a process quantity reference value; every listening time period, the cache self-cleaning module calls the cache listening visual control to access the listening fill-in field of the cache cleaning index table; the cache self-cleaning module calls the cache listening visual control to access the system cache basic path, and counts a first storage occupation value of a cache file in the system cache basic path; the cache self-cleaning module configures a performance detection program, and performs a first self-cleaning step based on the cache listening visual control, the basic identification number, the response speed reference value, the speed difference reference value, the cache cleaning reference value, the process quantity reference value, the first storage occupation value and the performance detection program to obtain the cache self-cleaning result.
[0088] Specifically, the first self-cleaning step comprises: the cache self-cleaning module calls the cache listening visual control to delete the cache file in the system cache basic path according to the cache cleaning reference value, and performs a running performance test step.
[0089] The running performance test step comprises: the cache self-cleaning module calling the performance detection program to obtain a first system response speed, and comparing whether the first system response speed reaches the response speed benchmark value; if yes, the cache self-cleaning module sets the cache self-cleaning result as the first self-cleaning result; if no, the cache self-cleaning module calculates a speed difference value between the first system response speed and the response speed benchmark value, and judges whether the speed difference value is not greater than the speed difference benchmark value; if no, the cache self-cleaning module executes a second self-cleaning step; if yes, the cache self-cleaning module returns to the first self-cleaning step;
[0090] The second self-cleaning step comprises: the cache self-cleaning module calling the cache monitoring visual control to access system process information, and calling the cache monitoring visual control to identify a plurality of real-time processes in the system process information; the cache self-cleaning module screens a first real-time process matching the basic identification number from the plurality of real-time processes; the cache self-cleaning module calls the cache monitoring visual control to execute a process end operation on the first real-time process according to the process quantity benchmark value, and returns to the running performance test step.
[0091] Specifically, the running performance test step further comprises: the cache self-cleaning module setting a number threshold value, when the speed difference value is not greater than the speed difference benchmark value, the cache self-cleaning module counts a first execution number of the second self-cleaning step; the cache self-cleaning module compares the number threshold value with the first execution number; if the first execution number reaches the number threshold value, the cache self-cleaning module sets the cache self-cleaning result as the second self-cleaning result.
[0092] In the system cache automatic cleaning system based on the control program, the on-demand cleaning module is configured to configure a cache cleaning controllable program and obtain a cache cleaning instruction, the on-demand cleaning module executes a cache specified cleaning operation based on the cache cleaning index table, the cache self-cleaning result, the cache cleaning controllable program and the cache cleaning instruction.
[0093] Specifically, the cache cleaning instruction is provided with a first user login account, a cache cleaning demand value and a to-be-cleaned process identification number.
[0094] Specifically, when the cache self-cleaning result is the second self-cleaning result, the on-demand cleaning module identifies the first user login account, the cache cleaning demand value and the to-be-cleaned process identification number in the cache cleaning instruction; the on-demand cleaning module executes the cache specified cleaning operation based on the cache cleaning controllable program, the first user login account, the cache cleaning demand value, the to-be-cleaned process identification number and a plurality of cache cleaning indexes.
[0095] The cache specified cleaning operation includes: the on-demand cleaning module starts the cache cleaning controllable program, the on-demand cleaning module accesses the login interface of the cache cleaning controllable program; the on-demand cleaning module inputs the first user login account into the account input area of the login interface; the on-demand cleaning module calls the cache cleaning controllable program to identify the first user login account in the account input area, and the on-demand cleaning module calls the cache cleaning controllable program to identify the first user name keyword in the first user login account; the on-demand cleaning module screens out the first cache cleaning index matched with the first user name keyword from a plurality of cache cleaning indexes; the on-demand cleaning module identifies the first cache specified path and the first specified identification number in the first cache cleaning index; the on-demand cleaning module calls the cache cleaning controllable program to clean the cache file in the first cache specified path according to the cache cleaning demand value; the on-demand cleaning module calls the cache cleaning controllable program to close the system process corresponding to the first specified identification number according to the to-be-cleaned process identification number.
[0096] Embodiment 3
[0097] The embodiment provides a computer readable storage medium, comprising:
[0098] The storage medium is used to store computer software instructions for implementing the system cache automatic cleaning method based on the control program in the above embodiment 1, which contains an executable program for executing the program set for the system cache automatic cleaning method based on the control program; specifically, the executable program can be built-in in the system cache automatic cleaning system based on the control program in embodiment 2, so that the system cache automatic cleaning system based on the control program can realize the system cache automatic cleaning method based on the control program in embodiment 1 by executing the built-in executable program.
[0099] In addition, the computer readable storage medium of the embodiment can adopt any combination of one or more readable storage media, wherein the readable storage medium includes an electrical, optical, electromagnetic, infrared or semiconductor system, device or component, or any combination thereof.
[0100] Different from the prior art, the application discloses a system cache automatic cleaning method, system and medium based on a control program, which can periodically and automatically clean the cache in a self-service terminal device by the method, and release the cache under the corresponding permission level according to the login information of the cache cleaning control, so as to prevent the terminal device from lagging due to long running time, prevent different users from mistakenly cleaning important cache, ensure the ordered cleaning of the cache, and prevent the normal operation of the terminal device and the processing progress of the terminal device for different cache tasks. The system provides effective technical support for the method, and finally makes up for the deficiencies of the prior art.
[0101] The above-mentioned embodiment sequence numbers of the application only serve for description, and do not represent the advantages and disadvantages of the embodiments.
[0102] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or a program for instructing related hardware can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.
[0103] The above-mentioned embodiments are only examples of the application, and do not limit the patent scope of the application. Any equivalent structure or equivalent process transformation, or direct or indirect application in other related technical fields, which is based on the content of the specification and drawings of the application, is also included in the patent protection scope of the application.
Claims
1. A method for automatically clearing system cache based on control programs, characterized in that, Includes the following steps: Initial configuration steps: Obtain cache file storage information, configure user information database, and configure cache cleanup index table based on the cache file storage information and user information database; Cache self-cleaning steps: Configure a cache monitoring visual control, set a monitoring time period, and perform a periodic cache self-cleaning operation based on the cache cleanup index table, the cache monitoring visual control, and the monitoring time period to obtain the cache self-cleaning result; Clean-up steps as needed: Configure a controllable cache cleanup program, obtain cache cleanup instructions, and perform specified cache cleanup operations based on the cache cleanup index table, the cache self-cleaning results, the controllable cache cleanup program, and the cache cleanup instructions; The cache file storage information includes the cache paths of several cache files and several cache process identifiers that match the several cache paths respectively; The user information database is configured with several username keywords and several user controllable levels that match the username keywords respectively; The cache self-cleaning result includes: a first self-cleaning result and a second self-cleaning result; the first self-cleaning result indicates that the operational requirements are met; the second self-cleaning result indicates that the operational requirements are not met. The cache cleanup instruction includes the first user login account, the cache cleanup requirement value, and the identifier of the process to be cleaned. The step of configuring a cache cleanup index table based on the cache file storage information and the user information database further includes: accessing the user information database and extracting several username keywords and several user controllable levels; identifying the cache file storage information and filtering out several cache specified paths that match the several user controllable levels from several cache paths, and filtering out several specified identifiers that match the several cache specified paths from several cache process identifiers; setting the cache paths other than the several cache specified paths as system cache base paths; setting the cache process identifiers other than the several specified identifiers as base identifiers; and performing an index table creation step based on the system cache base paths, the base identifiers, several username keywords, several cache specified paths, and several specified identifiers to obtain the cache cleanup index table. The index table creation steps include: binding several cache-specified paths and several username keywords according to the user-controllable hierarchy to generate several first binding indexes; binding several specified identifiers and several first binding indexes according to the cache-specified paths to generate several second binding indexes; creating a blank index table, setting a listener input field and several index rows that match the several second binding indexes respectively in the blank index table; setting the several second binding indexes as several cache cleanup indexes; first filling the several cache cleanup indexes into the several index rows of the blank index table, and then filling the system cache base path and the base identifier into the listener input field to obtain the cache cleanup index table; The periodic cache self-cleaning operation includes: setting a response speed baseline value, a speed difference baseline value, a cache cleanup baseline value, and a process count baseline value; every certain monitoring time period, calling the cache monitoring visual control to access the monitoring input field of the cache cleanup index table; calling the cache monitoring visual control to access the system cache base path and calculating the first storage usage value of cache files in the system cache base path; the response speed baseline value is 1.5s, the speed difference baseline value is 0.5s, the cache cleanup baseline value is 125MB, the process count baseline value is two, and the first storage usage value is the current size of the system cache file in MB; configuring a performance testing program, and executing the first self-cleaning step based on the cache monitoring visual control, the base identifier, the response speed baseline value, the speed difference baseline value, the cache cleanup baseline value, the process count baseline value, the first storage usage value, and the performance testing program to obtain the cache self-cleaning result.
2. The method for automatically clearing system cache based on control programs according to claim 1, characterized in that: The first self-cleaning step includes: calling the cache monitoring visual control to delete the cache file in the system cache base path according to the cache cleanup baseline value, and performing a runtime performance test step; The performance testing steps include: calling the performance detection program to obtain the response speed of the first system, and comparing whether the response speed of the first system reaches the response speed benchmark value; if it reaches the benchmark value, then setting the cache self-cleaning result as the first self-cleaning result; if it does not reach the benchmark value, then calculating the speed difference between the response speed of the first system and the response speed benchmark value, and determining whether the speed difference is not greater than the speed difference benchmark value; if it is not greater than the benchmark value, then executing the second self-cleaning step; if it is greater than the benchmark value, then returning to the first self-cleaning step. The second self-cleaning step includes: calling the cache monitoring visual control to access system process information; calling the cache monitoring visual control to identify several real-time processes in the system process information; filtering out a first real-time process that matches the basic identifier from among the several real-time processes; calling the cache monitoring visual control to perform a process termination operation on the first real-time process according to the process quantity benchmark value, and returning to the performance test step.
3. The method for automatically clearing system cache based on control programs according to claim 2, characterized in that: The performance testing steps also include: Set a threshold for the number of executions. When the speed difference is not greater than the speed difference benchmark value, count the first execution count of the second self-cleaning step. Compare the threshold for the number of executions with the first execution count. If the first execution count reaches the threshold for the number of executions, then set the cache self-cleaning result as the second self-cleaning result.
4. The method for automatically clearing system cache based on control programs according to claim 3, characterized in that: The step of performing a specified cache cleanup operation based on the cache cleanup index table, the cache self-cleaning result, the cache cleanup controllable program, and the cache cleanup instruction further includes: When the cache self-cleaning result is the second self-cleaning result, the first user login account, the cache cleanup requirement value, and the process identifier to be cleaned in the cache cleanup instruction are identified; the specified cache cleanup operation is executed based on the cache cleanup controllable program, the first user login account, the cache cleanup requirement value, the process identifier to be cleaned, and several cache cleanup indexes; The specified cache cleanup operations include: Start the cache cleanup controllable program and access the login interface of the cache cleanup controllable program; input the first user login account into the account input area of the login interface; call the cache cleanup controllable program to identify the first user login account in the account input area, and call the cache cleanup controllable program to identify the first username keyword in the first user login account; The process involves: selecting a first cache cleanup index that matches the first username keyword from among several cache cleanup indexes; identifying a first cache specified path and a first specified identifier in the first cache cleanup index; calling the cache cleanup controllable program to clean up the cache files in the first cache specified path according to the cache cleanup requirement value; and calling the cache cleanup controllable program to shut down the system process corresponding to the first specified identifier according to the process identifier to be cleaned.
5. A system for automatically clearing system cache based on control programs, based on any one of claims 1 to 4, characterized in that: The system cache automatic cleanup system includes: an initial configuration module, a cache self-cleaning module, and an on-demand cleanup module; The initial configuration module is used to obtain cache file storage information and configure user information database. The initial configuration module configures a cache cleanup index table based on the cache file storage information and the user information database. The cache self-cleaning module is used to configure the cache monitoring visual control and set the monitoring time period. The cache self-cleaning module performs periodic cache self-cleaning operations based on the cache cleanup index table, the cache monitoring visual control and the monitoring time period to obtain the cache self-cleaning result. The on-demand cleanup module is used to configure a controllable cache cleanup program and obtain cache cleanup instructions. The on-demand cleanup module performs specified cache cleanup operations based on the cache cleanup index table, the cache self-cleaning results, the controllable cache cleanup program, and the cache cleanup instructions.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the automatic system cache cleanup method based on control programs as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Data cleaning method and device and storage medium
CN112416868A