WO2022126984A1 - Cache data detection method and apparatus, computer device and storage medium - Google Patents

Cache data detection method and apparatus, computer device and storage medium Download PDF

Info

Publication number
WO2022126984A1
WO2022126984A1 PCT/CN2021/091713 CN2021091713W WO2022126984A1 WO 2022126984 A1 WO2022126984 A1 WO 2022126984A1 CN 2021091713 W CN2021091713 W CN 2021091713W WO 2022126984 A1 WO2022126984 A1 WO 2022126984A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
key
target
request
task
Prior art date
Application number
PCT/CN2021/091713
Other languages
French (fr)
Chinese (zh)
Inventor
陈志城
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2022126984A1 publication Critical patent/WO2022126984A1/en

Links

Images

Classifications

    • 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/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Definitions

  • the present application relates to the technical field of data processing, and in particular, to a detection method, device, computer equipment and storage medium for cached data.
  • HTML5 introduced Localstorage (which can be called local storage)
  • local storage has been widely used in the front-end field.
  • Local storage is mainly operated through js code, and is used to store some commonly used and infrequently changed data in the project, such as user information, static data, etc. directly to the browser locally, so as to facilitate calls in multiple places in the project.
  • the inventor realizes that after the developer uses the project cache data in the local storage, if the project cache data in the local storage permanently exists locally in the browser and is not cleared in time, the project code may report an error, etc. question.
  • the user has the need to detect whether there is project cache data that has not been cleared in the local storage, how to quickly detect the project cache data that has not been cleared in the local storage to meet the user's needs has become an urgent need at present. solved problem.
  • the main purpose of this application is to provide a method, device, computer equipment and storage medium for detecting cached data, aiming to solve the existing technical problem of how to quickly detect the cached data of items in local storage that have not been cleared.
  • the present application proposes a method for detecting cached data, the method comprising the steps of:
  • the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
  • the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
  • the target cache data corresponding to the third key is acquired and displayed.
  • the application also provides a detection device for cached data, including:
  • the first judgment module is used for judging whether an input cache detection request is received, wherein the cache detection request carries the item information corresponding to the target item, and the cache detection request is used to detect the data contained in the local storage and the target item. A request for cached data corresponding to the target item that has not been cleared;
  • the first acquisition module is used to obtain a pre-stored cache detection script corresponding to the item information based on the cache detection request if an input cache detection request is received;
  • the second acquisition module is used for running the cache detection script, and based on the running logic of the cache detection script, acquires the js code of the target project;
  • the first generation module is used to generate the abstract syntax tree corresponding to the js code
  • the first storage module is used to traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cached data contained in the js code through a preset first acquisition method, and store all the objects in the js code.
  • the first key is stored in the preset first array;
  • the second storage module is used for the first judgment module, and is used to obtain the second key corresponding to the second cache data in the js code that has undergone the cache clearing process through a preset second obtaining method, and store all the second keys in the js code.
  • the second key is stored in the preset second array;
  • a processing module configured to perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain A corresponding matching result, wherein the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
  • a determination module configured to determine that the specified cache data corresponding to the specified key has not been cleared if the matching result is a matching failure
  • a display module configured to acquire and display a target corresponding to the third key based on the third key that fails to match based on the matching result between the second key contained in the first array and the second key in the second array cache data.
  • the present application also provides a computer device, including a memory and a processor, where a computer program is stored in the memory, and the processor implements a method for detecting cached data when the processor executes the computer program, wherein the cached data is
  • the detection method includes the following steps:
  • the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
  • the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
  • the target cache data corresponding to the third key is acquired and displayed.
  • the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, a method for detecting cached data is implemented, wherein the method for detecting cached data includes the following steps:
  • the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
  • the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
  • the target cache data corresponding to the third key is acquired and displayed.
  • the detection method, device, computer equipment and storage medium for cached data provided in the present application can quickly detect the cached data that has not been cleared in the local cache, improve the detection efficiency of cached data, and help to reduce the number of cached data that has not been cleared. Eliminate program bugs caused by problems and improve the quality of project code.
  • FIG. 1 is a schematic flowchart of a method for detecting cached data according to an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an apparatus for detecting cached data according to an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
  • a method for detecting cached data includes:
  • S1 Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the cache detection request included in the local storage and corresponding to the target item Requests for cached data that have not been cleared;
  • S6 Acquire the second keys corresponding to the second cache data in the js code that have undergone the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array ;
  • S7 Perform matching processing on the specified key with each of the second keys included in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding match
  • the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
  • a key/value pair can be called a "cache data", or it can also be called a cache item, for example, "key1-value1" is one cache item and "key2-value2" is another cache item.
  • the key can be called the index key, which can be used when retrieving the value; the value can be called the data object, and the data object can be the data that the client actually wants to store in the local storage.
  • the data can be 1001. If a client needs to obtain data 1001, it can use the key corresponding to the data to retrieve it.
  • the execution body of this embodiment of the method is a detection device for cached data.
  • the above-mentioned detection device for cached data can be implemented by a virtual device, such as software code, or by a physical device written or integrated with relevant execution codes, and can communicate with the user through a keyboard, mouse, remote control, touch Human-computer interaction is carried out by means of board or voice control device.
  • the detection device for the above cached data may specifically be a browser.
  • the device for detecting cached data in this embodiment can quickly detect cached data that has not been cleared in the local cache.
  • the cache detection request carries item information corresponding to the target item
  • the target item may be any business item
  • the item information may specifically include the item of the target item name.
  • the above-mentioned cache request is a request for detecting the item cache data corresponding to the above-mentioned target item, which is included in the local storage of the browser and has not been cleared. If an input cache detection request is received, based on the cache detection request, a pre-stored cache detection script corresponding to the item information is acquired. Wherein, the item information in the cache detection request may be parsed first, and then the item information may be filled into a preset detection script template to generate the cache detection script.
  • the above cache detection script is run, and based on the running logic of the above cache detection script, the js code of the above target project is obtained.
  • the js code related to the target project can be obtained by querying a related code database, such as GitHub.
  • a related code database such as GitHub.
  • an abstract syntax tree corresponding to the above js code is generated.
  • the abstract syntax tree (Abstract Syntax Tree, AST), or simply syntax tree (Syntax tree)
  • AST Simple syntax tree
  • syntax tree is an abstract representation of the source code syntax structure. It represents the syntax structure of the programming language in the form of a tree, and each node on the tree represents a structure in the source code.
  • an abstract syntax tree corresponding to the above js code can be generated based on a related generation tool, such as an esprima tool. Then traverse all the objects in the above abstract syntax tree, obtain the first key corresponding to each first cache data contained in the above js code through the preset first acquisition method, and store all the above first keys in the preset in the first array of .
  • the above abstract syntax tree is an array formed by multiple objects. The JavaScript statement is divided into one part, that is, the object.
  • the above-mentioned first obtaining method is the setItem() method, through which the first key corresponding to each first cached data contained in the above-mentioned js code can be obtained by the setItem() method, so that the following can be quickly used according to the first key.
  • the preset first array does not contain data. and obtaining the second keys corresponding to the second cache data in the js code that have undergone the cache clearing process by using a preset second obtaining method, and storing all the second keys in the preset second array.
  • the above-mentioned second acquisition method is the removeItem() method, which analyzes the js code of the target item based on the abstract syntax tree, can quickly identify whether all the used cache data in the js code has been cleared, and can extract the The second key corresponding to the cached data that has not been cleared in the js code, so that the cached data that has not been cleared in the js code can be quickly detected according to the second key subsequently.
  • the specified key is matched with each of the above-mentioned second keys contained in the above-mentioned second array to detect whether there is a target key that is the same as the above-mentioned designated key in the above-mentioned second array, and a corresponding matching result is obtained, wherein the above-mentioned
  • the specified key is any one of all the above-mentioned first keys contained in the above-mentioned first array, and the above-mentioned matching result includes matching success or matching failure, and the preset second array does not contain data.
  • whether the specified key and any one of the second keys included in the second array can be compared based on the parallel data comparison instruction.
  • the above-mentioned parallel data comparison instruction may specifically be a single instruction stream multiple data stream (single instruction multiple data, SIMD) instruction, by utilizing the parallel computing capability of the parallel comparison instruction to carry out the above-mentioned designated key and any one contained in the above-mentioned second array at the same time.
  • SIMD single instruction multiple data
  • the data matching processing of the second key helps to further improve the processing rate of the data matching and the generation speed of the generated data matching result. If the above matching result is a matching failure, it is determined that the designated cache data corresponding to the above designated key has not been cleared. Wherein, if the specified key exists only in the first array but not in the second array, it can be determined that the specified cache data corresponding to the above specified key has not been cleared.
  • the target cache data corresponding to the third key is acquired and displayed.
  • the matching result that the above-mentioned matching fails means that for the third key included in the first array, there is no key identical to the third key in all the second keys included in the second array.
  • step S2 before the above step S2, it includes:
  • S206 Adjust the eliminated target task request to be processed within a preset idle time period, wherein the idle time period is different from the processing time period of the cache detection request.
  • the step may further include: firstly judging whether there are other task requests to be processed other than the above cache detection request. If there are other pending task requests other than the above cache detection request, obtain the request quantity of the above other task requests.
  • the above-mentioned quantity threshold is not specifically limited, and can be set according to actual needs, for example, it can be generated according to an empirical value obtained after statistical analysis of relevant historical data. If the above-mentioned number of requests is greater than the above-mentioned quantity threshold, a specified number of target task requests are selected from the above-mentioned other task requests according to preset rules.
  • the above specified number is not specifically limited, and can be determined according to actual needs, as long as it is ensured that the specified number is not greater than the number requested by the other tasks mentioned above.
  • the above preset rules are not specifically limited.
  • the preset rules may include: based on the resource consumption of each of the above other task requests, screening out the specified number of task requests with the largest processing resource consumption from the above other task requests as The above-mentioned target task request; or the preset rule may further include: based on the processing priority of each of the above-mentioned other task requests, screening out the specified number of task requests with the lowest processing priority from the above-mentioned other task requests as the above-mentioned target task request. Then, it is determined whether there is a specific task request whose processing time cannot be adjusted in the above target task. Among them, whether the task request belongs to a specific task request whose task time cannot be adjusted can be determined based on the task attribute of the task request.
  • corresponding rules can be preset. If the task attribute of the task request satisfies the preset conditions, it is determined that it belongs to the task.
  • a specific task request whose time is not adjustable.
  • the above preset conditions may be set according to actual needs. For example, the above preset conditions may be that the service to which the task request belongs is a preset designated service, or the task request belongs to a preset designated service type. If the above-mentioned specific task request exists in the above-mentioned target task, the above-mentioned specific task is eliminated from the above-mentioned target task request, and the eliminated target task request is obtained. Finally, the deleted target task request is adjusted to a preset idle time period for processing, wherein the idle time period is different from the processing time period of the cache detection request.
  • step S203 includes:
  • S2031 sort all the other task requests in descending order of the resource consumption to obtain a corresponding first sorting result
  • the above-mentioned step of selecting a specified number of target task requests from the above-mentioned other task requests according to a preset rule may specifically include: firstly determining the resource consumption of each of the above-mentioned other task requests.
  • the above-mentioned resource consumption refers to the storage space, CPU, or traffic required to execute the task request.
  • the historical resource consumption of each of the above-mentioned other task requests can be queried by querying the resource consumption statistics corresponding to the historical task requests. Specifically, other tasks specified within a preset time period can be queried based on the resource consumption statistics.
  • the above specified other task request is any one of all the above other task requests. ask. Then, sort all the above-mentioned other task requests in descending order of the above-mentioned resource consumption to obtain a corresponding first sorting result. Then, starting from other task requests ranked first in the first sorting result, multiple first task requests that are the same as the above-specified number are sequentially acquired. Finally, all the above-mentioned first task requests are regarded as the above-mentioned target task requests.
  • the first task request with a large amount of resource consumption is extracted from all other task requests based on the amount of resource consumption as the target task request, so that the subsequent task request with a large amount of processing resource consumption will be intelligently adjusted to Different from the idle time of the current time period, the processing can prevent this part of the task request from affecting the normal processing of the current cache detection request, effectively ensure the normal processing of the above cache detection request, and improve the intelligence of the cache detection request processing.
  • step S203 includes:
  • S2034 Obtain the processing priority of each of the other task requests based on a preset task request priority table
  • S2035 Sort all the other task requests according to the order of the processing priority from low to high to obtain a corresponding second sorting result
  • the above-mentioned step of selecting a specified number of target task requests from the above-mentioned other task requests according to a preset rule includes: acquiring each of the above-mentioned other task requests based on a preset task request priority table. priority.
  • a task request priority table is pre-created, and the task request priority table records request identifiers of different task requests and processing priority serial numbers corresponding to each request identifier one-to-one. The smaller the processing priority sequence number corresponding to the request identifier is, the higher the processing priority of the task request corresponding to the request identifier is.
  • a second task request with a lower processing priority is extracted from all other task requests based on the processing priority as the target task request, so that the task request with a lower processing priority will be intelligently adjusted to be different in the future. Processing in the idle time of the current time period can prevent this part of the task request from affecting the normal processing of the current cache detection request, effectively ensure the normal processing of the above cache detection request, and improve the intelligence of the cache detection request processing.
  • step S9 it includes:
  • S902 Calculate the expiration time point corresponding to the target cache data based on the writing time and the expiration time;
  • S906 Generate corresponding expiration reminder information based on the target cache data and the difference, and display the expiration reminder information.
  • the cached data in an expired state As described in the above steps S900 to S906, if the storage time of the cached data in the local storage exceeds the specified lifetime, it cannot be accessed, that is, the cached data is in an expired state.
  • the operation of clearing cached data in an expired state may be referred to as life cycle management of cached data.
  • the writing time of the target cache data and the expiration time of the target cache data are obtained first.
  • the above write time refers to the time when the target cache data is first stored in the local storage.
  • the above expiration time refers to the lifetime of the target cached data. If the storage time of the target cached data in the local storage is longer than the expiration time, it means that the target cached data has expired, that is, it has no actual use value. Then, based on the writing time and the expiration time, the expiration time point corresponding to the target cache data is calculated. Wherein, the sum value between the writing time and the expiration time can be calculated, and the time corresponding to the sum value is the above-mentioned expiration time point.
  • the current time is obtained, and it is judged whether the above-mentioned current time exceeds the above-mentioned expiration time point. If the above-mentioned current time exceeds the above-mentioned expiration time point, the above-mentioned target cache data is cleared. And if the current time does not exceed the expiration time point, the difference between the expiration time point and the current time is calculated. Then, based on the above-mentioned target cache data and the above-mentioned difference, the corresponding expired reminder information is generated, and the above-mentioned expired reminder information is displayed. Wherein, the above-mentioned expiration reminder information includes at least the target cache data and the above-mentioned difference.
  • the target cached data after detecting the target cached data that has not been cleared, when it is determined that the target cached data is currently in an expired state, the target cached data will be cleared intelligently, so as to effectively save precious local storage resources , to avoid data problems in subsequent links or even project code errors due to the fact that expired cached data has not been cleaned up in time.
  • the target cached data if the target cached data is currently in an unexpired state, the remaining valid lifetime of the target cached data will also be calculated and the corresponding expiration reminder information will be generated, so that the relevant users can clearly understand the current status of the target cached data based on the expiration reminder information. Survival information, so that the clear processing work for the target cache data can be performed in a timely manner.
  • step S2 before the above step S2, it includes:
  • a generation process of generating the above cache detection script may also be included. Specifically, first, based on the above cache detection request, a pre-stored detection script template is obtained. Among them, for the operation processing of the cache detection request, a detection script template corresponding to the cache detection will be preset. The above detection script template can be written and generated by the developer according to the actual cache detection requirements, and the item field in the detection script template The corresponding variable parameter is the state to be filled. Then, the above-mentioned cache detection request is analyzed and processed, and the above-mentioned item information is extracted.
  • the above-mentioned detection script template is filled with the above-mentioned item information to obtain a filled-processed detection script template.
  • the above-mentioned detection script template contains detection code for performing the detection of item cache data, by first determining the information filling position corresponding to the item field in the detection template, and then filling the above-mentioned item information to the information filling position.
  • the cache detection script corresponding to the target project is generated, so that the cache detection script corresponding to the different projects is generated by filling in the project variable parameters corresponding to different projects in the detection script template.
  • the above processed detection script template is used as the above cache detection script.
  • the detection script by using the detection script to realize the automatic processing of the cache detection, the manual detection time of the developer can be effectively saved, and the processing efficiency of the cache data detection can be improved.
  • step S9 it includes:
  • S911 Obtain preset email login information, and obtain a preset email address
  • S913 Send the alarm information to the preset email address through the email server.
  • the above-mentioned third key corresponding to the above-mentioned third key is obtained and displayed based on the matching result between the second key contained in the above-mentioned first array and the second key in the above-mentioned second array being that the matching fails
  • the step of generating the target cached data it may further include a generating process of generating alarm information corresponding to the above-mentioned target cached data. Specifically, first, based on the above-mentioned target cache data, alarm information corresponding to the above-mentioned target cache data is generated.
  • the above-mentioned alarm information includes at least the above-mentioned target cache data, and the above-mentioned alarm information can be generated by filling the target cache data into a pre-created alarm information template.
  • the above-mentioned alarm information templates are written and generated by developers according to actual usage requirements. Then obtain the default email login information, and obtain the default email address.
  • the email login information is information used to log in to the email server, and the preset email address is email address information of a relevant user for receiving the alarm information. Then log in to the corresponding mail server based on the above mail login information.
  • the above-mentioned alarm information is sent to the above-mentioned preset email address through the above-mentioned mail server.
  • the email server is used to send the alarm information corresponding to the target cached data to a preset email address, so that the relevant users can timely learn the target cached data corresponding to the target item that has not been cleared, and then can follow up
  • the expired cached data in the target cached data contained in the local storage is cleaned up in a timely manner, which effectively saves local storage resources and avoids data problems or even data problems in subsequent links due to the fact that the expired cached data is not cleaned up in time.
  • the project code reports an error.
  • the method for detecting cached data in the embodiments of the present application can also be applied to the blockchain field, for example, the above-mentioned target cached data and other data are stored on the blockchain.
  • the blockchain By using the blockchain to store and manage the above-mentioned target cache data, the security and immutability of the above-mentioned target cache data can be effectively guaranteed.
  • an embodiment of the present application also provides a detection device for cached data, including:
  • the first judgment module 1 is used for judging whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the A request for cached data corresponding to the target item that has not been cleared;
  • the first acquisition module 2 is used to obtain a pre-stored cache detection script corresponding to the item information based on the cache detection request if an input cache detection request is received;
  • the second acquisition module 3 is used to run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
  • the first generation module 4 is used to generate the abstract syntax tree corresponding to the js code
  • the first storage module 5 is used to traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cached data contained in the js code through a preset first obtaining method, and store the All the first keys are stored in a preset first array; and,
  • the second storage module 6 is used for the first judgment module, and is used to obtain the second key corresponding to the second cached data in the js code that has undergone the cache clearing process through the preset second obtaining method, and store all the The second key is stored in the preset second array;
  • a processing module 7 configured to perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key identical to the specified key in the second array, A corresponding matching result is obtained, wherein the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
  • the determination module 8 is used to determine that the specified cache data corresponding to the specified key has not been cleared if the matching result is a matching failure;
  • the display module 9 is used for obtaining and displaying the third key corresponding to the third key based on the matching result between the second key contained in the first array and the second key in the second array that fails to match.
  • Target cache data is used for obtaining and displaying the third key corresponding to the third key based on the matching result between the second key contained in the first array and the second key in the second array that fails to match.
  • the first determination module the first acquisition module, the second acquisition module, the first generation module, the first storage module, the second storage module, the processing module, the determination module and the display
  • the implementation process corresponding to steps S1 to S9 in the above-mentioned method for detecting cached data please refer to the implementation process corresponding to steps S1 to S9 in the above-mentioned method for detecting cached data, which will not be repeated here.
  • the above-mentioned detection device for cached data includes:
  • the second judgment module is used to judge whether there are other task requests to be processed other than the cache detection request
  • a third obtaining module configured to obtain the number of requests of the other task requests if there are other task requests to be processed other than the cache detection request;
  • a third judging module configured to judge whether the requested quantity is greater than a preset quantity threshold
  • a screening module configured to screen out a specified number of target task requests from the other task requests according to preset rules if the number of requests is greater than the number threshold;
  • a fourth judging module for judging whether there is a specific task request whose processing time cannot be adjusted in the target task
  • a culling module configured to cull the specific task from the target task request if the specific task request exists in the target task, to obtain the culled target task request;
  • An adjustment module configured to adjust the eliminated target task request to a preset idle time period for processing, wherein the idle time period is different from the processing time period of the cache detection request.
  • the implementation process of the functions and functions of the second judgment module, the third acquisition module, the third judgment module, the screening module, the fourth judgment module, the elimination module and the adjustment module in the above-mentioned cached data detection device is detailed in detail. See the implementation process corresponding to steps S200 to S206 in the above-mentioned method for detecting cached data, which will not be repeated here.
  • the above-mentioned screening module includes:
  • a first determining unit configured to determine the resource consumption requested by each of the other tasks
  • a first sorting unit configured to sort all the other task requests in descending order of the resource consumption to obtain a corresponding first sorting result
  • a first obtaining unit configured to sequentially obtain a plurality of first task requests that are the same as the specified number, starting from other task requests ranked first in the first sorting result;
  • the second determining unit is configured to use all the first task requests as the target task requests.
  • the implementation process of the functions and functions of the first determination unit, the first sorting unit, the first acquisition unit, and the second determination unit in the above-mentioned cached data detection device are detailed in the corresponding cached data detection method.
  • the implementation process of steps S2030 to S2033 will not be repeated here.
  • the above-mentioned screening module includes:
  • a second obtaining unit configured to obtain the processing priority of each of the other task requests based on a preset task request priority table
  • a second sorting unit configured to sort all the other task requests according to the order of the processing priority from low to high to obtain a corresponding second sorting result
  • a third acquiring unit configured to sequentially acquire a plurality of second task requests that are the same as the specified number, starting from other task requests ranked first in the second sorting result;
  • a third determining unit configured to use the second task request as the target task request.
  • the implementation process of the functions and functions of the second acquisition unit, the second sorting unit, the third acquisition unit, and the third determination unit in the above-mentioned cached data detection device are detailed in the corresponding cached data detection method.
  • the implementation process of steps S2034 to S2037 will not be repeated here.
  • the above-mentioned detection device for cached data includes:
  • the fourth acquisition module for acquiring the write time of the target cache data
  • a fifth obtaining module used for obtaining the expiration time of the target cache data
  • a first calculation module configured to calculate the expiration time point corresponding to the target cache data based on the writing time and the expiration time
  • a fifth judgment module used to obtain the current time, and judge whether the current time exceeds the expiration time point
  • a clearing module configured to clear the target cache data if the current time exceeds the expiration time point
  • a second calculation module configured to calculate the difference between the expiration time and the current time if the current time does not exceed the expiration time
  • the second generating module is configured to generate corresponding expiration reminder information based on the target cache data and the difference, and display the expiration reminder information.
  • the functions and functions of the fourth acquisition module, the fifth acquisition module, the first calculation module, the fifth judgment module, the clearing module, the second calculation module and the second generation module in the above-mentioned cached data detection device please refer to the implementation process corresponding to steps S900 to S906 in the above-mentioned method for detecting cached data, which will not be repeated here.
  • the above-mentioned detection device for cached data includes:
  • a sixth acquisition module configured to acquire a pre-stored detection script template based on the cache detection request
  • an extraction module configured to perform parsing processing on the cache detection request, and extract the item information
  • a filling module for filling the detection script template with the project information to obtain the detection script template after filling
  • a determination module configured to use the processed detection script template as the cache detection script.
  • the above-mentioned detection device for cached data includes:
  • a third generating module configured to generate alarm information corresponding to the target cache data based on the target cache data
  • the seventh obtaining module is used to obtain the preset email login information and obtain the preset email address;
  • a login module configured to log in to the corresponding mail server based on the email login information
  • a sending module configured to send the alarm information to the preset mail address through the mail server.
  • the implementation process of the functions and functions of the third generation module, the seventh acquisition module, the login module and the sending module in the above-mentioned cached data detection device can be found in the corresponding steps S910 to S913 in the above-mentioned cached data detection method for details. The implementation process is not repeated here.
  • an embodiment of the present application further provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in FIG. 3 .
  • the computer equipment includes a processor, memory, a network interface, a display screen, an input device and a database connected by a system bus.
  • the processor of the computer equipment is designed to provide computing and control capabilities.
  • the memory of the computer device includes a storage medium and an internal memory.
  • the storage medium stores an operating system, a computer program and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the storage medium.
  • the database of the computer device is used for storing data such as cache detection script, abstract syntax tree, first key, second key, first array, second array and target cache data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the display screen of the computer equipment is an indispensable graphic and text output device in the computer, which is used to convert digital signals into optical signals, so that text and graphics can be displayed on the screen of the display screen.
  • the input device of the computer equipment is the main device for information exchange between the computer and the user or other devices, and is used to transmit data, instructions and certain flag information to the computer. When the computer program is executed by the processor, a method for detecting cached data is implemented.
  • the above-mentioned processor executes the steps of the above-mentioned method for detecting cached data:
  • the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
  • the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
  • the target cache data corresponding to the third key is acquired and displayed.
  • FIG. 3 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the apparatus or computer equipment to which the solution of the present application is applied.
  • An embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium may be non-volatile or volatile, and a computer program is stored thereon, and the computer program is implemented when executed by a processor
  • the method for detecting cached data shown in any of the above exemplary embodiments, the method for detecting cached data includes the following steps:
  • the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
  • the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
  • the target cache data corresponding to the third key is acquired and displayed.
  • any reference to memory, storage, database or other medium provided in this application and used in the embodiments may include non-volatile and/or volatile memory.
  • Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

The present application relates to the technical field of data processing, and provides a cache data detection method and apparatus, a computer device and a storage medium. The method comprises: when an input cache detection request is received, acquiring a cache detection script corresponding to item information; running the cache detection script, and acquiring a js code of a target item; generating an abstract syntax tree corresponding to the js code; traversing all objects in the abstract syntax tree, and acquiring a first key of each first cache data comprised in the js code; acquiring a second key of second cache data subjected to cache clearing; and on the basis of a third key which is comprised in a first array and fails to match the second key, acquiring and displaying target cache data corresponding to the third key. By means of the present application, target cache data in a local cache which is not cleared can be quickly detected. The present application can also be applied to the field of blockchains. Data such as the target cache data can be stored on a blockchain.

Description

缓存数据的检测方法、装置、计算机设备和存储介质Cached data detection method, device, computer equipment and storage medium
本申请要求于2020年12月15日提交中国专利局、申请号为2020114798243,发明名称为“缓存数据的检测方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on December 15, 2020 with the application number 2020114798243 of the China Patent Office, and the invention name is "cached data detection method, device, computer equipment and storage medium", the entire content of which is approved by Reference is incorporated in this application.
技术领域technical field
本申请涉及数据处理技术领域,具体涉及一种缓存数据的检测方法、装置、计算机设备和存储介质。The present application relates to the technical field of data processing, and in particular, to a detection method, device, computer equipment and storage medium for cached data.
背景技术Background technique
自HTML5推出Localstorage(可称为本地存储)以来,本地存储在前端领域得到了广泛的应用。Since HTML5 introduced Localstorage (which can be called local storage), local storage has been widely used in the front-end field.
本地存储主要通过js代码进行操作,用于将项目中部分常用且不经常变的数据,例如用户信息、静态数据等直接存储到浏览器本地,以方便项目中的多个地方进行调用。然而发明人意识到,在开发人员对本地存储内的项目缓存数据使用过后,如果本地存储中的项目缓存数据永久存在于浏览器本地而没有得到及时的清除处理,则可能会出现项目代码报错等问题。当用户具有检测本地存储中是否存在未进行过清除处理的项目缓存数据的需求时,如何实现快速地检测出本地存储中未进行过清除处理的项目缓存数据以满足用户需求,成为了目前一个亟待解决的问题。Local storage is mainly operated through js code, and is used to store some commonly used and infrequently changed data in the project, such as user information, static data, etc. directly to the browser locally, so as to facilitate calls in multiple places in the project. However, the inventor realizes that after the developer uses the project cache data in the local storage, if the project cache data in the local storage permanently exists locally in the browser and is not cleared in time, the project code may report an error, etc. question. When the user has the need to detect whether there is project cache data that has not been cleared in the local storage, how to quickly detect the project cache data that has not been cleared in the local storage to meet the user's needs has become an urgent need at present. solved problem.
技术问题technical problem
本申请的主要目的为提供一种缓存数据的检测方法、装置、计算机设备和存储介质,旨在解决现有如何实现快速地检测出本地存储中未进行过清除处理的项目缓存数据的技术问题。The main purpose of this application is to provide a method, device, computer equipment and storage medium for detecting cached data, aiming to solve the existing technical problem of how to quickly detect the cached data of items in local storage that have not been cleared.
技术解决方案technical solutions
本申请提出一种缓存数据的检测方法,所述方法包括步骤:The present application proposes a method for detecting cached data, the method comprising the steps of:
判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the unfinished process corresponding to the target item contained in the local storage. requests to clear processed cached data;
若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;If an input cache detection request is received, based on the cache detection request, obtain a pre-stored cache detection script corresponding to the item information;
运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;Run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
生成与所述js代码对应的抽象语法树;generating an abstract syntax tree corresponding to the js code;
遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cache data contained in the js code through the preset first obtaining method, and store all the first keys in within the preset first array; and,
通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;Obtain the second keys corresponding to the second cache data one-to-one in the js code through the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array;
将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;Perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding matching result, Wherein, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;If the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。Based on the matching result between the second key contained in the first array and the second key in the second array being a third key that fails to match, the target cache data corresponding to the third key is acquired and displayed.
本申请还提供一种缓存数据的检测装置,包括:The application also provides a detection device for cached data, including:
第一判断模块,用于判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;The first judgment module is used for judging whether an input cache detection request is received, wherein the cache detection request carries the item information corresponding to the target item, and the cache detection request is used to detect the data contained in the local storage and the target item. A request for cached data corresponding to the target item that has not been cleared;
第一获取模块,用于若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;The first acquisition module is used to obtain a pre-stored cache detection script corresponding to the item information based on the cache detection request if an input cache detection request is received;
第二获取模块,用于运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;The second acquisition module is used for running the cache detection script, and based on the running logic of the cache detection script, acquires the js code of the target project;
第一生成模块,用于生成与所述js代码对应的抽象语法树;The first generation module is used to generate the abstract syntax tree corresponding to the js code;
第一存储模块,用于遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,The first storage module is used to traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cached data contained in the js code through a preset first acquisition method, and store all the objects in the js code. The first key is stored in the preset first array; And,
第二存储模块,用于第一判断模块,用于通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;The second storage module is used for the first judgment module, and is used to obtain the second key corresponding to the second cache data in the js code that has undergone the cache clearing process through a preset second obtaining method, and store all the second keys in the js code. The second key is stored in the preset second array;
处理模块,用于将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key 为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;A processing module, configured to perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain A corresponding matching result, wherein the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
判定模块,用于若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;A determination module, configured to determine that the specified cache data corresponding to the specified key has not been cleared if the matching result is a matching failure;
展示模块,用于基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。A display module, configured to acquire and display a target corresponding to the third key based on the third key that fails to match based on the matching result between the second key contained in the first array and the second key in the second array cache data.
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序时实现一种缓存数据的检测方法,其中,所述缓存数据的检测方法包括以下步骤:The present application also provides a computer device, including a memory and a processor, where a computer program is stored in the memory, and the processor implements a method for detecting cached data when the processor executes the computer program, wherein the cached data is The detection method includes the following steps:
判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the unfinished process corresponding to the target item contained in the local storage. requests to clear processed cached data;
若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;If an input cache detection request is received, based on the cache detection request, obtain a pre-stored cache detection script corresponding to the item information;
运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;Run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
生成与所述js代码对应的抽象语法树;generating an abstract syntax tree corresponding to the js code;
遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cache data contained in the js code through the preset first obtaining method, and store all the first keys in within the preset first array; and,
通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;Obtain the second keys corresponding to the second cache data one-to-one in the js code through the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array;
将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;Perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding matching result, Wherein, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;If the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。Based on the matching result between the second key contained in the first array and the second key in the second array being a third key that fails to match, the target cache data corresponding to the third key is acquired and displayed.
本申请还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现一种缓存数据的检测方法,其中,所述缓存数据的检测方法包括以下步骤:The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, a method for detecting cached data is implemented, wherein the method for detecting cached data includes the following steps:
判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the unfinished process corresponding to the target item contained in the local storage. requests to clear processed cached data;
若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;If an input cache detection request is received, based on the cache detection request, obtain a pre-stored cache detection script corresponding to the item information;
运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;Run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
生成与所述js代码对应的抽象语法树;generating an abstract syntax tree corresponding to the js code;
遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cache data contained in the js code through the preset first obtaining method, and store all the first keys in within the preset first array; and,
通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;Obtain the second keys corresponding to the second cache data one-to-one in the js code through the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array;
将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;Perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding matching result, Wherein, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;If the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。Based on the matching result between the second key contained in the first array and the second key in the second array being a third key that fails to match, the target cache data corresponding to the third key is acquired and displayed.
有益效果beneficial effect
本申请中提供的缓存数据的检测方法、装置、计算机设备和存储介质,可以实现快速地检测出本地缓存中未进行过清除处理的缓存数据,提高缓存数据的检测效率,有利于降低因缓存未清除的问题而导致的程序bug,提高项目代码的质量。The detection method, device, computer equipment and storage medium for cached data provided in the present application can quickly detect the cached data that has not been cleared in the local cache, improve the detection efficiency of cached data, and help to reduce the number of cached data that has not been cleared. Eliminate program bugs caused by problems and improve the quality of project code.
附图说明Description of drawings
图1是本申请一实施例的缓存数据的检测方法的流程示意图;1 is a schematic flowchart of a method for detecting cached data according to an embodiment of the present application;
图2是本申请一实施例的缓存数据的检测装置的结构示意图;2 is a schematic structural diagram of an apparatus for detecting cached data according to an embodiment of the present application;
图3是本申请一实施例的计算机设备的结构示意图。FIG. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
本发明的最佳实施方式BEST MODE FOR CARRYING OUT THE INVENTION
应当理解,此处所描述的具体实施例仅仅用于解释本申请,并不用于限定本申请。It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
参照图1,本申请一实施例的缓存数据的检测方法,包括:1 , a method for detecting cached data according to an embodiment of the present application includes:
S1:判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;S1: Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the cache detection request included in the local storage and corresponding to the target item Requests for cached data that have not been cleared;
S2:若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;S2: if an input cache detection request is received, based on the cache detection request, obtain a pre-stored cache detection script corresponding to the item information;
S3:运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;S3: run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
S4:生成与所述js代码对应的抽象语法树;S4: generate an abstract syntax tree corresponding to the js code;
S5:遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,S5: Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cached data contained in the js code through a preset first obtaining method, and retrieve all the first keys stored in a preset first array; and,
S6:通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;S6: Acquire the second keys corresponding to the second cache data in the js code that have undergone the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array ;
S7:将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;S7: Perform matching processing on the specified key with each of the second keys included in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding match As a result, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
S8:若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;S8: if the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
S9:基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。S9: Based on the matching result between the second key in the first array and the second key in the second array being a third key that fails to match, acquire and display the target cache data corresponding to the third key.
浏览器在使用本地存储对项目中的相关数据进行数据缓存时,会以key/value对的格式存储。一个key/value对可以称为一个“缓存数据”,或者也可称为缓存项,例如,“key1-value1”是一个缓存项,“key2-value2”是另一个缓存项。对于key/value的缓存项,其中的key可称为索引key,可以是用于检索value时使用;其中的value可称为数据对象,数据对象可以是客户端实际要存储至本地存储的数据,举例地,该数据可以是1001,若某个客户端需要获取数据1001,就可以使用该数据对应的key进行检索。When the browser uses local storage to cache the relevant data in the project, it will be stored in the format of key/value pairs. A key/value pair can be called a "cache data", or it can also be called a cache item, for example, "key1-value1" is one cache item and "key2-value2" is another cache item. For key/value cache items, the key can be called the index key, which can be used when retrieving the value; the value can be called the data object, and the data object can be the data that the client actually wants to store in the local storage. For example, the data can be 1001. If a client needs to obtain data 1001, it can use the key corresponding to the data to retrieve it.
如上述步骤S1至S9所述,本方法实施例的执行主体为一种缓存数据的检测装置。在实际应用中,上述缓存数据的检测装置可以通过虚拟装置,例如软件代码实现,也可以通过写入或集成有相关执行代码的实体装置实现,且可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。上述缓存数据的检测装置具体可为浏览器。本实施例中的缓存数据的检测装置,能够快速地检测出本地缓存中未进行过清除处理的缓存数据。具体地,首先判断是否接收到输入的缓存检测请求,其中,上述缓存检测请求携带有与目标项目对应的项目信息,上述目标项目可为任意的业务项目,上述项目信息具体可包括目标项目的项目名称。另外,上述缓存请求是用于检测出浏览器的本地存储中包含的与上述目标项目对应的未进行过清除处理的项目缓存数据的请求。如果接收到输入的缓存检测请求,基于上述缓存检测请求,获取与上述项目信息对应的预存储的缓存检测脚本。其中,可先解析出上述缓存检测请求中的项目信息,再将该项目信息填充至预设的检测脚本模板内以生成上述缓存检测脚本。然后运行上述缓存检测脚本,基于上述缓存检测脚本的运行逻辑,获取上述目标项目的js代码。其中,可以通过查询相关的代码数据库,例如GitHub来获取与目标项目的js代码。在得到了上述js代码后,生成与上述js代码对应的抽象语法树。其中,抽象语法树(Abstract Syntax Tree,AST),或简称语法树(Syntax tree),是源代码语法结构的一种抽象表示。它以树状的形式表现编程语言的语法结构,树上的每个节点都表示源代码中的一种结构。另外,可基于相关的生成工具,如通过esprima工具来生成与上述js代码对应的抽象语法树。之后遍历上述抽象语法树中的所有对象,通过预设的第一获取方法获取上述js代码中包含的各第一缓存数据一一对应的第一key,并将所有上述第一key存储于预设的第一数组内。其中,上述抽象语法树是多个对象形成的数组,把JavaScript语句拆分成一个一个零件,即对象,通过使用抽象语法树来分析上述js代码,可对整个js代码中包含的缓存数据进行全面检索,以快速识别出该js代码中所有使用过的缓存数据,避免出现遗漏现象。另外,上述第一获取方法为setItem()方法,通过该setItem()方法能够获取到上述js代码中包含的各第一缓存数据一一对应的第一key,以便后续根据该第一key来快速检测出js代码中没有进行过清除处理的缓存数据。此外,预先设置的上述第一数组内不包含有数据。以及通过预设的第二获取方法获取上述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有上述第二key存储于预设的第二数组内。其中,上述第二获取方法为removeItem()方法,基于抽象语法树对目标项目的js代码进行分析,能够快速识别出该js代码中所有使用过的缓存数据是否进行过清除处理,并能够提取出该js代码中包含的未经过清除处理的缓存数据所分别对应的第二key,以便后续根据该第二key来快速检测出js代码中没有进行过清除处理的缓存数据。然后将指定key分别与上述第二数组中包含的每一个上述第二key进行匹配处理,以检测上述第二数组内是否存在与上述指定key相同的目标key,得到对应的匹配结果,其中,上述指定key 为上述第一数组内包含的所有上述第一key中的任意一个key,上述匹配结果包括匹配成功或匹配失败,且预先设置的上述第二数组内不包含有数据。另外,可基于并行数据比较指令比较上述指定key与上述第二数组中包含的任意一个第二key是否相同。上述并行数据比较指令具体可为单指令流多数据流(single instruction multiple data,SIMD)指令,通过利用并行比较指令的并行计算能力来同时进行该上述指定key与上述第二数组中包含的任意一个第二key的数据匹配处理,有助于进一步提高数据匹配的处理速率,以及提高生成数据匹配结果的生成速度。如果上述匹配结果为匹配失败,则判定与上述指定key对应的指定缓存数据未进行过清除处理。其中,如果指定key只存在于第一数组内而不存在于第二数组内,则可判定与上述指定key对应的指定缓存数据未进行过清除处理。只有当指定key同时存在于上述第一数组与上述第二数组内时,才可判定与该指定key对应的指定缓存数据为已进行过清除处理的数据。最后基于上述第一数组内包含的与上述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与上述第三key对应的目标缓存数据。其中,上述匹配失败的匹配结果是指对于第一数组内包含的第三key,在第二数组内包含的所有第二key中不存在与该第三key相同的key。本实施例通过使用抽象语法树分析与目标项目对应的js代码,进而利用缓存检测脚本实现对于缓存检测的自动化处理,可以实现快速地检测出本地缓存中未进行过清除处理的缓存数据,提高缓存数据的检测效率。另外,通过展示该目标缓存数据,以使得相关用户能够及时了解到本地存储中未进行过清除处理的目标缓存数据,进而后续能够根据实际情况来对本地存储包含的目标缓存数据中已过期的缓存数据进行及时的清理处理,有利于降低因缓存未清除的问题而导致的程序bug,提高项目代码的质量。As described in the above steps S1 to S9, the execution body of this embodiment of the method is a detection device for cached data. In practical applications, the above-mentioned detection device for cached data can be implemented by a virtual device, such as software code, or by a physical device written or integrated with relevant execution codes, and can communicate with the user through a keyboard, mouse, remote control, touch Human-computer interaction is carried out by means of board or voice control device. The detection device for the above cached data may specifically be a browser. The device for detecting cached data in this embodiment can quickly detect cached data that has not been cleared in the local cache. Specifically, first determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, the target item may be any business item, and the item information may specifically include the item of the target item name. In addition, the above-mentioned cache request is a request for detecting the item cache data corresponding to the above-mentioned target item, which is included in the local storage of the browser and has not been cleared. If an input cache detection request is received, based on the cache detection request, a pre-stored cache detection script corresponding to the item information is acquired. Wherein, the item information in the cache detection request may be parsed first, and then the item information may be filled into a preset detection script template to generate the cache detection script. Then, the above cache detection script is run, and based on the running logic of the above cache detection script, the js code of the above target project is obtained. Among them, the js code related to the target project can be obtained by querying a related code database, such as GitHub. After the above js code is obtained, an abstract syntax tree corresponding to the above js code is generated. Among them, the abstract syntax tree (Abstract Syntax Tree, AST), or simply syntax tree (Syntax tree), is an abstract representation of the source code syntax structure. It represents the syntax structure of the programming language in the form of a tree, and each node on the tree represents a structure in the source code. In addition, an abstract syntax tree corresponding to the above js code can be generated based on a related generation tool, such as an esprima tool. Then traverse all the objects in the above abstract syntax tree, obtain the first key corresponding to each first cache data contained in the above js code through the preset first acquisition method, and store all the above first keys in the preset in the first array of . Among them, the above abstract syntax tree is an array formed by multiple objects. The JavaScript statement is divided into one part, that is, the object. By using the abstract syntax tree to analyze the above js code, the cache data contained in the entire js code can be comprehensively analyzed. Retrieval to quickly identify all used cached data in the js code to avoid omissions. In addition, the above-mentioned first obtaining method is the setItem() method, through which the first key corresponding to each first cached data contained in the above-mentioned js code can be obtained by the setItem() method, so that the following can be quickly used according to the first key. Detected cached data that has not been cleared in the js code. In addition, the preset first array does not contain data. and obtaining the second keys corresponding to the second cache data in the js code that have undergone the cache clearing process by using a preset second obtaining method, and storing all the second keys in the preset second array. Among them, the above-mentioned second acquisition method is the removeItem() method, which analyzes the js code of the target item based on the abstract syntax tree, can quickly identify whether all the used cache data in the js code has been cleared, and can extract the The second key corresponding to the cached data that has not been cleared in the js code, so that the cached data that has not been cleared in the js code can be quickly detected according to the second key subsequently. Then, the specified key is matched with each of the above-mentioned second keys contained in the above-mentioned second array to detect whether there is a target key that is the same as the above-mentioned designated key in the above-mentioned second array, and a corresponding matching result is obtained, wherein the above-mentioned The specified key is any one of all the above-mentioned first keys contained in the above-mentioned first array, and the above-mentioned matching result includes matching success or matching failure, and the preset second array does not contain data. In addition, whether the specified key and any one of the second keys included in the second array can be compared based on the parallel data comparison instruction. The above-mentioned parallel data comparison instruction may specifically be a single instruction stream multiple data stream (single instruction multiple data, SIMD) instruction, by utilizing the parallel computing capability of the parallel comparison instruction to carry out the above-mentioned designated key and any one contained in the above-mentioned second array at the same time. The data matching processing of the second key helps to further improve the processing rate of the data matching and the generation speed of the generated data matching result. If the above matching result is a matching failure, it is determined that the designated cache data corresponding to the above designated key has not been cleared. Wherein, if the specified key exists only in the first array but not in the second array, it can be determined that the specified cache data corresponding to the above specified key has not been cleared. Only when the specified key exists in the first array and the second array at the same time, it can be determined that the specified cached data corresponding to the specified key is the data that has been cleared. Finally, based on the matching result between the second key contained in the first array and the second key in the second array being the third key that fails to match, the target cache data corresponding to the third key is acquired and displayed. Wherein, the matching result that the above-mentioned matching fails means that for the third key included in the first array, there is no key identical to the third key in all the second keys included in the second array. In this embodiment, by using the abstract syntax tree to analyze the js code corresponding to the target project, and then using the cache detection script to realize the automatic processing of the cache detection, it is possible to quickly detect the cache data that has not been cleared in the local cache, and improve the cache performance. Data detection efficiency. In addition, by displaying the target cache data, the relevant users can timely know the target cache data that has not been cleared in the local storage, and then follow the actual situation. Timely cleaning of data is beneficial to reduce program bugs caused by uncleared caches and improve the quality of project code.
进一步地,本申请一实施例中,上述步骤S2之前,包括:Further, in an embodiment of the present application, before the above step S2, it includes:
S200:判断是否存在除所述缓存检测请求之外的待处理的其他任务请求;S200: Determine whether there are other task requests to be processed other than the cache detection request;
S201:若存在除所述缓存检测请求之外的待处理的其他任务请求,则获取所述其他任务请求的请求数量;S201: If there are other task requests to be processed other than the cache detection request, obtain the request quantity of the other task requests;
S202:判断所述请求数量是否大于预设的数量阈值;S202: Determine whether the requested quantity is greater than a preset quantity threshold;
S203:若所述请求数量大于所述数量阈值,按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求;S203: If the number of requests is greater than the number threshold, filter out a specified number of target task requests from the other task requests according to a preset rule;
S204:判断所述目标任务中是否存在处理时间不可调整的特定任务请求;S204: Determine whether there is a specific task request whose processing time cannot be adjusted in the target task;
S205:若所述目标任务中存在所述特定任务请求,则将所述特定任务从所述目标任务请求中剔除,得到剔除后的目标任务请求;S205: if the specific task request exists in the target task, then remove the specific task from the target task request to obtain the removed target task request;
S206:将所述剔除后的目标任务请求调整至预设的空闲时间段内进行处理,其中,所述空闲时间段与所述缓存检测请求的处理时间段不同。S206: Adjust the eliminated target task request to be processed within a preset idle time period, wherein the idle time period is different from the processing time period of the cache detection request.
如上述步骤S200至S206所述,在进行对于上述缓存检测请求的处理过程中,还会智能地将当前存在的待处理的部分其他任务请求分配至不同于当前时间段的其他时间段内进行处理,以避免其他任务请求对当前的缓存检测请求的正常处理造成影响,从而有效保证上述缓存检测请求的正常处理。具体地,上述基于上述缓存检测请求,获取与上述项目信息对应的预存储的缓存检测脚本的步骤之前还可包括:首先判断是否存在除上述缓存检测请求之外的待处理的其他任务请求。如果存在除上述缓存检测请求之外的待处理的其他任务请求,则获取上述其他任务请求的请求数量。然后判断上述请求数量是否大于预设的数量阈值。其中,对于上述数量阈值不作具体限定,可根据实际需求进行设置,例如可根据统计分析相关历史数据后得到的经验值来生成。如果上述请求数量大于上述数量阈值,按照预设规则从上述其他任务请求中筛选出指定数量的目标任务请求。其中,对于上述指定数量不作具体限定,可根据实际需求确定,只需保证指定数量不大于上述其他任务请求的数量即可。另外,对于上述预设规则不作具体限定,例如该预设规则可包括:基于各上述其他任务请求的资源消耗量,从上述其他任务请求中筛选出处理资源消耗量最大的指定数量的任务请求作为上述目标任务请求;或者该预设规则还可包括:基于各上述其他任务请求的处理优先级,从上述其他任务请求中筛选出处理优先级最低的指定数量的任务请求作为上述目标任务请求。之后判断上述目标任务中是否存在处理时间不可调整的特定任务请求。其中,可基于任务请求的任务属性来判断该任务请求是否属于任务时间不可调整的特定任务请求,具体可以预先设定相应的规则,如果任务请求的任务属性满足预设条件,则确定其属于任务时间不可调整的特定任务请求。上述预设条件可根据实际需求进行设置,举例地,上述预设条件可为任务请求所属业务为预设的指定业务,或者任务请求属于预设的指定业务类型。如果上述目标任务中存在上述特定任务请求,则将上述特定任务从上述目标任务请求中剔除,得到剔除后的目标任务请求。最后将上述剔除后的目标任务请求调整至预设的空闲时间段内进行处理,其中,上述空闲时间段与上述缓存检测请求的处理时间段不同。As described in the above steps S200 to S206, in the process of processing the above cache detection request, some other task requests currently to be processed will also be intelligently allocated to other time periods different from the current time period for processing. , so as to avoid other task requests from affecting the normal processing of the current cache detection request, thereby effectively ensuring the normal processing of the above cache detection request. Specifically, before the step of acquiring a pre-stored cache detection script corresponding to the above item information based on the above cache detection request, the step may further include: firstly judging whether there are other task requests to be processed other than the above cache detection request. If there are other pending task requests other than the above cache detection request, obtain the request quantity of the above other task requests. Then, it is determined whether the above-mentioned number of requests is greater than a preset number threshold. The above-mentioned quantity threshold is not specifically limited, and can be set according to actual needs, for example, it can be generated according to an empirical value obtained after statistical analysis of relevant historical data. If the above-mentioned number of requests is greater than the above-mentioned quantity threshold, a specified number of target task requests are selected from the above-mentioned other task requests according to preset rules. The above specified number is not specifically limited, and can be determined according to actual needs, as long as it is ensured that the specified number is not greater than the number requested by the other tasks mentioned above. In addition, the above preset rules are not specifically limited. For example, the preset rules may include: based on the resource consumption of each of the above other task requests, screening out the specified number of task requests with the largest processing resource consumption from the above other task requests as The above-mentioned target task request; or the preset rule may further include: based on the processing priority of each of the above-mentioned other task requests, screening out the specified number of task requests with the lowest processing priority from the above-mentioned other task requests as the above-mentioned target task request. Then, it is determined whether there is a specific task request whose processing time cannot be adjusted in the above target task. Among them, whether the task request belongs to a specific task request whose task time cannot be adjusted can be determined based on the task attribute of the task request. Specifically, corresponding rules can be preset. If the task attribute of the task request satisfies the preset conditions, it is determined that it belongs to the task. A specific task request whose time is not adjustable. The above preset conditions may be set according to actual needs. For example, the above preset conditions may be that the service to which the task request belongs is a preset designated service, or the task request belongs to a preset designated service type. If the above-mentioned specific task request exists in the above-mentioned target task, the above-mentioned specific task is eliminated from the above-mentioned target task request, and the eliminated target task request is obtained. Finally, the deleted target task request is adjusted to a preset idle time period for processing, wherein the idle time period is different from the processing time period of the cache detection request.
进一步地,本申请一实施例中,上述步骤S203,包括:Further, in an embodiment of the present application, the above step S203 includes:
S2030:确定各所述其他任务请求的资源消耗量;S2030: Determine the resource consumption requested by each of the other tasks;
S2031:按照所述资源消耗量从大到小的顺序对所有所述其他任务请求进行排序,得到对应的第一 排序结果;S2031: sort all the other task requests in descending order of the resource consumption to obtain a corresponding first sorting result;
S2032:从所述第一排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第一任务请求;S2032: Starting from other task requests ranked first in the first sorting result, sequentially acquiring multiple first task requests that are the same as the specified number;
S2033:将所有所述第一任务请求作为所述目标任务请求。S2033: Use all the first task requests as the target task requests.
如上述步骤S2030至S2033所述,上述按照预设规则从上述其他任务请求中筛选出指定数量的目标任务请求的步骤,具体可包括:首先确定各上述其他任务请求的资源消耗量。其中,上述资源消耗量是指执行任务请求时所需消耗的存储空间或CPU或流量。另外,可通过查询历史任务请求所对应的资源消耗统计数据来查询出各上述其他任务请求的历史资源消耗量,具体的,可基于该资源消耗统计数据查询出在预设时间周期内指定其他任务请求每一次的指定历史资源消耗量,再计算所有指定历史资源消耗量的平均值来作为与指定其他任务请求对应的资源消耗量,上述指定其他任务请求为所有上述其他任务请求中的任意一个任务请求。然后按照上述资源消耗量从大到小的顺序对所有上述其他任务请求进行排序,得到对应的第一排序结果。之后从上述第一排序结果中排在首位的其他任务请求开始,依次获取与上述指定数量相同的多个第一任务请求。最后将所有上述第一任务请求作为上述目标任务请求。本实施例通过基于资源消耗量从所有其他任务请求中提取出资源消耗量较大的第一任务请求来作为上述目标任务请求,使得后续智能地会将处理资源消耗量较大的任务请求调整至不同于当前时间段的空闲时间进行处理,能够避免此部分任务请求会对当前的缓存检测请求的正常处理造成影响,有效保证上述缓存检测请求的正常处理,提高了缓存检测请求处理的智能性。As described in the above steps S2030 to S2033, the above-mentioned step of selecting a specified number of target task requests from the above-mentioned other task requests according to a preset rule may specifically include: firstly determining the resource consumption of each of the above-mentioned other task requests. The above-mentioned resource consumption refers to the storage space, CPU, or traffic required to execute the task request. In addition, the historical resource consumption of each of the above-mentioned other task requests can be queried by querying the resource consumption statistics corresponding to the historical task requests. Specifically, other tasks specified within a preset time period can be queried based on the resource consumption statistics. Request the specified historical resource consumption each time, and then calculate the average of all specified historical resource consumption as the resource consumption corresponding to the specified other task request. The above specified other task request is any one of all the above other task requests. ask. Then, sort all the above-mentioned other task requests in descending order of the above-mentioned resource consumption to obtain a corresponding first sorting result. Then, starting from other task requests ranked first in the first sorting result, multiple first task requests that are the same as the above-specified number are sequentially acquired. Finally, all the above-mentioned first task requests are regarded as the above-mentioned target task requests. In this embodiment, the first task request with a large amount of resource consumption is extracted from all other task requests based on the amount of resource consumption as the target task request, so that the subsequent task request with a large amount of processing resource consumption will be intelligently adjusted to Different from the idle time of the current time period, the processing can prevent this part of the task request from affecting the normal processing of the current cache detection request, effectively ensure the normal processing of the above cache detection request, and improve the intelligence of the cache detection request processing.
进一步地,本申请一实施例中,上述步骤S203,包括:Further, in an embodiment of the present application, the above step S203 includes:
S2034:基于预设的任务请求优先级表获取各所述其他任务请求的处理优先级;S2034: Obtain the processing priority of each of the other task requests based on a preset task request priority table;
S2035:根据所述处理优先级从低到高的顺序对所有所述其他任务请求进行排序,得到对应的第二排序结果;S2035: Sort all the other task requests according to the order of the processing priority from low to high to obtain a corresponding second sorting result;
S2036:从所述第二排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第二任务请求;S2036: Starting from other task requests ranked first in the second sorting result, successively obtain a plurality of second task requests that are the same as the specified number;
S2037:将所述第二任务请求作为所述目标任务请求。S2037: Use the second task request as the target task request.
如上述步骤S2034至S2037所述,上述按照预设规则从上述其他任务请求中筛选出指定数量的目标任务请求的步骤,包括:基于预设的任务请求优先级表获取各上述其他任务请求的处理优先级。其中,预先创建有一个任务请求优先级表,该任务请求优先级表记录有不同任务请求的请求标识,以及与各请求标识一一对应的处理优先级序号。请求标识对应的处理优先级序号越小,则该请求标识对应的任务请求的处理优先级越高。根据上述处理优先级从低到高的顺序对所有上述其他任务请求进行排序,得到对应的第二排序结果;从上述第二排序结果中排在首位的其他任务请求开始,依次获取与上述指定数量相同的多个第二任务请求;将上述第二任务请求作为上述目标任务请求。本实施例通过基于处理优先级从所有其他任务请求中提取出处理优先级较低的第二任务请求来作为上述目标任务请求,使得后续会智能地将处理优先级较低的任务请求调整至不同于当前时间段的空闲时间内进行处理,能够避免此部分任务请求会对当前的缓存检测请求的正常处理造成影响,有效保证上述缓存检测请求的正常处理,提高了缓存检测请求处理的智能性。As described in the above steps S2034 to S2037, the above-mentioned step of selecting a specified number of target task requests from the above-mentioned other task requests according to a preset rule includes: acquiring each of the above-mentioned other task requests based on a preset task request priority table. priority. Wherein, a task request priority table is pre-created, and the task request priority table records request identifiers of different task requests and processing priority serial numbers corresponding to each request identifier one-to-one. The smaller the processing priority sequence number corresponding to the request identifier is, the higher the processing priority of the task request corresponding to the request identifier is. Sort all the above other task requests in the order of the above processing priority from low to high, and obtain the corresponding second sorting result; starting from the other task requests ranked first in the above second sorting result, sequentially obtain the above specified number of tasks The same multiple second task requests; the above-mentioned second task requests are used as the above-mentioned target task requests. In this embodiment, a second task request with a lower processing priority is extracted from all other task requests based on the processing priority as the target task request, so that the task request with a lower processing priority will be intelligently adjusted to be different in the future. Processing in the idle time of the current time period can prevent this part of the task request from affecting the normal processing of the current cache detection request, effectively ensure the normal processing of the above cache detection request, and improve the intelligence of the cache detection request processing.
进一步地,本申请一实施例中,上述步骤S9之后,包括:Further, in an embodiment of the present application, after the above step S9, it includes:
S900:获取所述目标缓存数据的写入时间;以及,S900: obtaining the write time of the target cache data; and,
S901:获取所述目标缓存数据的过期时长;S901: Obtain the expiration time of the target cache data;
S902:基于所述写入时间与所述过期时长,计算与所述目标缓存数据对应的过期时间点;S902: Calculate the expiration time point corresponding to the target cache data based on the writing time and the expiration time;
S903:获取当前时间,并判断所述当前时间是否超过所述过期时间点;S903: Obtain the current time, and determine whether the current time exceeds the expiration time point;
S904:若所述当前时间超过所述过期时间点,则对所述目标缓存数据进行清除处理;S904: If the current time exceeds the expiration time point, clear the target cache data;
S905:若所述当前时间未超过所述过期时间点,则计算所述过期时间点与所述当前时间的差值;S905: If the current time does not exceed the expiration time point, calculate the difference between the expiration time point and the current time;
S906:基于所述目标缓存数据与所述差值生成相应的过期提醒信息,并展示所述过期提醒信息。S906: Generate corresponding expiration reminder information based on the target cache data and the difference, and display the expiration reminder information.
如上述步骤S900至S906所述,缓存数据在本地存储中的存储时间如果超过了指定的生存时长,就不能被访问到,即缓存数据已处于过期状态。对处于过期状态的缓存数据进行的清除处理操作可称为对于缓存数据的生命周期管理。在执行完上述基于上述第一数组内包含的与上述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与上述第三key对应的目标缓存数据的步骤之后,还可对上述目标缓存数据进行相应的生命周期管理合理。具体地,首先获取上述目标缓存数据的写入时间,以及获取上述目标缓存数据的过期时长。其中,上述写入时间是指目标缓存数据首次存储于本地存储内的时间。上述过期时长是指该目标缓存数据的生存时间长度,如果目标缓存数据在本地存储中的存储时长大于该过期时长,则表示该目标缓存数据已处于过期状态,即没有了实际的使用价值。然后基于上述写入时间与上述过期时长,计算与上述目标缓存数据对应的过期时间点。其中,可计算写入时间与过期时长之间的和值,该和值所对应的时间便为上述过期时间点。之后获取当前时间,并判断上述当前时间 是否超过上述过期时间点。如果上述当前时间超过上述过期时间点,则对上述目标缓存数据进行清除处理。而如果上述当前时间未超过上述过期时间点,则计算上述过期时间点与上述当前时间的差值。再基于上述目标缓存数据与上述差值生成相应的过期提醒信息,并展示上述过期提醒信息。其中,上述过期提醒信息至少包括目标缓存数据与上述差值。本实施例在检测出了未进行过清除处理的目标缓存数据后,当判定该目标缓存数据当前处于过期状态时,会智能地对该目标缓存数据进行清除处理,以有效节省珍贵的本地存储资源,避免出现由于过期的缓存数据没有得到及时的清理处理导致后续环节出现数据问题甚至项目代码报错的情况。另外,如果目标缓存数据当前处于未过期状态时,还会计算出该目标缓存数据的剩余有效生存时长并生成相应的过期提醒信息,以便相关用户能够基于该过期提醒信息清楚了解到目标缓存数据当前的生存信息,以便后续能够及时执行对于该目标缓存数据的清除处理工作。As described in the above steps S900 to S906, if the storage time of the cached data in the local storage exceeds the specified lifetime, it cannot be accessed, that is, the cached data is in an expired state. The operation of clearing cached data in an expired state may be referred to as life cycle management of cached data. After performing the above-mentioned step of obtaining and displaying the target cache data corresponding to the above-mentioned third key based on the matching result between the second key contained in the above-mentioned first array and the second key in the above-mentioned second array being the third key that fails to match After that, the corresponding life cycle management of the above target cache data can also be performed reasonably. Specifically, the writing time of the target cache data and the expiration time of the target cache data are obtained first. The above write time refers to the time when the target cache data is first stored in the local storage. The above expiration time refers to the lifetime of the target cached data. If the storage time of the target cached data in the local storage is longer than the expiration time, it means that the target cached data has expired, that is, it has no actual use value. Then, based on the writing time and the expiration time, the expiration time point corresponding to the target cache data is calculated. Wherein, the sum value between the writing time and the expiration time can be calculated, and the time corresponding to the sum value is the above-mentioned expiration time point. After that, the current time is obtained, and it is judged whether the above-mentioned current time exceeds the above-mentioned expiration time point. If the above-mentioned current time exceeds the above-mentioned expiration time point, the above-mentioned target cache data is cleared. And if the current time does not exceed the expiration time point, the difference between the expiration time point and the current time is calculated. Then, based on the above-mentioned target cache data and the above-mentioned difference, the corresponding expired reminder information is generated, and the above-mentioned expired reminder information is displayed. Wherein, the above-mentioned expiration reminder information includes at least the target cache data and the above-mentioned difference. In this embodiment, after detecting the target cached data that has not been cleared, when it is determined that the target cached data is currently in an expired state, the target cached data will be cleared intelligently, so as to effectively save precious local storage resources , to avoid data problems in subsequent links or even project code errors due to the fact that expired cached data has not been cleaned up in time. In addition, if the target cached data is currently in an unexpired state, the remaining valid lifetime of the target cached data will also be calculated and the corresponding expiration reminder information will be generated, so that the relevant users can clearly understand the current status of the target cached data based on the expiration reminder information. Survival information, so that the clear processing work for the target cache data can be performed in a timely manner.
进一步地,本申请一实施例中,上述步骤S2之前,包括:Further, in an embodiment of the present application, before the above step S2, it includes:
S210:基于所述缓存检测请求,获取预存储的检测脚本模板;S210: Based on the cache detection request, obtain a pre-stored detection script template;
S211:对所述缓存检测请求进行解析处理,提取出所述项目信息;S211: Perform parsing processing on the cache detection request, and extract the item information;
S212:使用所述项目信息对所述检测脚本模板进行填充处理,得到填充处理后的检测脚本模板;S212: Filling the detection script template with the project information to obtain a filled detection script template;
S213:将所述处理后的检测脚本模板作为所述缓存检测脚本。S213: Use the processed detection script template as the cache detection script.
如上述步骤S210至S213所述,在执行上述基于上述缓存检测请求,获取与上述项目信息对应的预存储的缓存检测脚本的步骤之前,还可包括生成上述缓存检测脚本的生成过程。具体地,首先基于上述缓存检测请求,获取预存储的检测脚本模板。其中,针对于缓存检测请求的操作处理,会预先设置有与缓存检测相对应的检测脚本模板,上述检测脚本模板可由开发人员根据实际的缓存检测需求编写生成,且该检测脚本模板中的项目字段对应的变量参数为待填充状态。然后对上述缓存检测请求进行解析处理,提取出上述项目信息。之后使用上述项目信息对上述检测脚本模板进行填充处理,得到填充处理后的检测脚本模板。其中,上述检测脚本模板内包含有用于执行项目缓存数据检测的检测代码,通过先确定出该检测模板内的项目字段所对应的信息填充位置,再将上述项目信息填充至该信息填充位置便能生成与目标项目对应的缓存检测脚本,以实现通过在检测脚本模板中填入不同项目所对应的项目变量参数,进而生成与不同项目分别对应的缓存检测脚本。最后将上述处理后的检测脚本模板作为上述缓存检测脚本。本实施例通过使用检测脚本实现对于缓存检测的自动化处理,可以有效节省开发人员的人工检测时间,提高缓存数据检测的处理效率。As described in the above steps S210 to S213, before executing the above step of obtaining the pre-stored cache detection script corresponding to the above item information based on the above cache detection request, a generation process of generating the above cache detection script may also be included. Specifically, first, based on the above cache detection request, a pre-stored detection script template is obtained. Among them, for the operation processing of the cache detection request, a detection script template corresponding to the cache detection will be preset. The above detection script template can be written and generated by the developer according to the actual cache detection requirements, and the item field in the detection script template The corresponding variable parameter is the state to be filled. Then, the above-mentioned cache detection request is analyzed and processed, and the above-mentioned item information is extracted. Then, the above-mentioned detection script template is filled with the above-mentioned item information to obtain a filled-processed detection script template. Wherein, the above-mentioned detection script template contains detection code for performing the detection of item cache data, by first determining the information filling position corresponding to the item field in the detection template, and then filling the above-mentioned item information to the information filling position. The cache detection script corresponding to the target project is generated, so that the cache detection script corresponding to the different projects is generated by filling in the project variable parameters corresponding to different projects in the detection script template. Finally, the above processed detection script template is used as the above cache detection script. In this embodiment, by using the detection script to realize the automatic processing of the cache detection, the manual detection time of the developer can be effectively saved, and the processing efficiency of the cache data detection can be improved.
进一步地,本申请一实施例中,上述步骤S9之后,包括:Further, in an embodiment of the present application, after the above step S9, it includes:
S910:基于所述目标缓存数据,生成与所述目标缓存数据对应的警报信息;S910: Based on the target cache data, generate alarm information corresponding to the target cache data;
S911:获取预设的邮件登录信息,以及获取预设邮件地址;S911: Obtain preset email login information, and obtain a preset email address;
S912:基于所述邮件登录信息登录至对应的邮件服务器;S912: Log in to the corresponding mail server based on the mail login information;
S913:通过所述邮件服务器将所述警报信息发送至所述预设邮件地址。S913: Send the alarm information to the preset email address through the email server.
如上述步骤S910至S913所述,上述基于上述第一数组内包含的与上述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与上述第三key对应的目标缓存数据的步骤之后,还可包括生成与上述目标缓存数据相应的警报信息的生成过程。具体地,首先基于上述目标缓存数据,生成与上述目标缓存数据对应的警报信息。其中,上述警报信息至少包括上述目标缓存数据,可将该目标缓存数据填入至预先创建的警报信息模板内来生成上述警报信息。另外,上述警报信息模板由开发人员根据实际的使用需求编写生成。然后获取预设的邮件登录信息,以及获取预设邮件地址。其中,上述邮件登录信息是用于登录邮件服务器的信息,上述预设邮件地址是用于接收上述警报信息的相关用户的邮件地址信息。之后基于上述邮件登录信息登录至对应的邮件服务器。最后通过上述邮件服务器将上述警报信息发送至上述预设邮件地址。本实施例通过使用邮件服务器将该上述目标缓存数据对应的警报信息发送至预设邮件地址,以使得相关用户能够及时了解到与目标项目对应的未进行过清除处理的目标缓存数据,进而后续能够根据实际情况来对本地存储包含的目标缓存数据中已过期的缓存数据进行及时的清理处理,有效节省本地存储资源,避免出现由于过期的缓存数据没有得到及时的清理处理导致后续环节出现数据问题甚至项目代码报错的情况。As described in the above steps S910 to S913, the above-mentioned third key corresponding to the above-mentioned third key is obtained and displayed based on the matching result between the second key contained in the above-mentioned first array and the second key in the above-mentioned second array being that the matching fails After the step of generating the target cached data, it may further include a generating process of generating alarm information corresponding to the above-mentioned target cached data. Specifically, first, based on the above-mentioned target cache data, alarm information corresponding to the above-mentioned target cache data is generated. Wherein, the above-mentioned alarm information includes at least the above-mentioned target cache data, and the above-mentioned alarm information can be generated by filling the target cache data into a pre-created alarm information template. In addition, the above-mentioned alarm information templates are written and generated by developers according to actual usage requirements. Then obtain the default email login information, and obtain the default email address. The email login information is information used to log in to the email server, and the preset email address is email address information of a relevant user for receiving the alarm information. Then log in to the corresponding mail server based on the above mail login information. Finally, the above-mentioned alarm information is sent to the above-mentioned preset email address through the above-mentioned mail server. In this embodiment, the email server is used to send the alarm information corresponding to the target cached data to a preset email address, so that the relevant users can timely learn the target cached data corresponding to the target item that has not been cleared, and then can follow up According to the actual situation, the expired cached data in the target cached data contained in the local storage is cleaned up in a timely manner, which effectively saves local storage resources and avoids data problems or even data problems in subsequent links due to the fact that the expired cached data is not cleaned up in time. The project code reports an error.
本申请实施例中的缓存数据的检测方法还可以应用于区块链领域,如将上述目标缓存数据等数据存储于区块链上。通过使用区块链来对上述目标缓存数据进行存储和管理,能够有效地保证上述目标缓存数据的安全性与不可篡改性。The method for detecting cached data in the embodiments of the present application can also be applied to the blockchain field, for example, the above-mentioned target cached data and other data are stored on the blockchain. By using the blockchain to store and manage the above-mentioned target cache data, the security and immutability of the above-mentioned target cache data can be effectively guaranteed.
参照图2,本申请一实施例中还提供了一种缓存数据的检测装置,包括:Referring to FIG. 2, an embodiment of the present application also provides a detection device for cached data, including:
第一判断模块1,用于判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;The first judgment module 1 is used for judging whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the A request for cached data corresponding to the target item that has not been cleared;
第一获取模块2,用于若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;The first acquisition module 2 is used to obtain a pre-stored cache detection script corresponding to the item information based on the cache detection request if an input cache detection request is received;
第二获取模块3,用于运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;The second acquisition module 3 is used to run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
第一生成模块4,用于生成与所述js代码对应的抽象语法树;The first generation module 4 is used to generate the abstract syntax tree corresponding to the js code;
第一存储模块5,用于遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,The first storage module 5 is used to traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cached data contained in the js code through a preset first obtaining method, and store the All the first keys are stored in a preset first array; and,
第二存储模块6,用于第一判断模块,用于通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;The second storage module 6 is used for the first judgment module, and is used to obtain the second key corresponding to the second cached data in the js code that has undergone the cache clearing process through the preset second obtaining method, and store all the The second key is stored in the preset second array;
处理模块7,用于将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;A processing module 7, configured to perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key identical to the specified key in the second array, A corresponding matching result is obtained, wherein the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
判定模块8,用于若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;The determination module 8 is used to determine that the specified cache data corresponding to the specified key has not been cleared if the matching result is a matching failure;
展示模块9,用于基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。The display module 9 is used for obtaining and displaying the third key corresponding to the third key based on the matching result between the second key contained in the first array and the second key in the second array that fails to match. Target cache data.
本实施例中,上述缓存数据的检测装置中的第一判断模块、第一获取模块、第二获取模块、第一生成模块、第一存储模块、第二存储模块、处理模块、判定模块与展示模块的功能和作用的实现过程具体详见上述缓存数据的检测方法中对应步骤S1至S9的实现过程,在此不再赘述。In this embodiment, the first determination module, the first acquisition module, the second acquisition module, the first generation module, the first storage module, the second storage module, the processing module, the determination module and the display For details of the implementation process of the functions and functions of the modules, please refer to the implementation process corresponding to steps S1 to S9 in the above-mentioned method for detecting cached data, which will not be repeated here.
进一步地,本申请一实施例中,上述缓存数据的检测装置,包括:Further, in an embodiment of the present application, the above-mentioned detection device for cached data includes:
第二判断模块,用于判断是否存在除所述缓存检测请求之外的待处理的其他任务请求;The second judgment module is used to judge whether there are other task requests to be processed other than the cache detection request;
第三获取模块,用于若存在除所述缓存检测请求之外的待处理的其他任务请求,则获取所述其他任务请求的请求数量;a third obtaining module, configured to obtain the number of requests of the other task requests if there are other task requests to be processed other than the cache detection request;
第三判断模块,用于判断所述请求数量是否大于预设的数量阈值;a third judging module, configured to judge whether the requested quantity is greater than a preset quantity threshold;
筛选模块,用于若所述请求数量大于所述数量阈值,按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求;A screening module, configured to screen out a specified number of target task requests from the other task requests according to preset rules if the number of requests is greater than the number threshold;
第四判断模块,用于判断所述目标任务中是否存在处理时间不可调整的特定任务请求;a fourth judging module for judging whether there is a specific task request whose processing time cannot be adjusted in the target task;
剔除模块,用于若所述目标任务中存在所述特定任务请求,则将所述特定任务从所述目标任务请求中剔除,得到剔除后的目标任务请求;A culling module, configured to cull the specific task from the target task request if the specific task request exists in the target task, to obtain the culled target task request;
调整模块,用于将所述剔除后的目标任务请求调整至预设的空闲时间段内进行处理,其中,所述空闲时间段与所述缓存检测请求的处理时间段不同。An adjustment module, configured to adjust the eliminated target task request to a preset idle time period for processing, wherein the idle time period is different from the processing time period of the cache detection request.
本实施例中,上述缓存数据的检测装置中的第二判断模块、第三获取模块、第三判断模块、筛选模块、第四判断模块、剔除模块与调整模块的功能和作用的实现过程具体详见上述缓存数据的检测方法中对应步骤S200至S206的实现过程,在此不再赘述。In this embodiment, the implementation process of the functions and functions of the second judgment module, the third acquisition module, the third judgment module, the screening module, the fourth judgment module, the elimination module and the adjustment module in the above-mentioned cached data detection device is detailed in detail. See the implementation process corresponding to steps S200 to S206 in the above-mentioned method for detecting cached data, which will not be repeated here.
进一步地,本申请一实施例中,上述筛选模块,包括:Further, in an embodiment of the present application, the above-mentioned screening module includes:
第一确定单元,用于确定各所述其他任务请求的资源消耗量;a first determining unit, configured to determine the resource consumption requested by each of the other tasks;
第一排序单元,用于按照所述资源消耗量从大到小的顺序对所有所述其他任务请求进行排序,得到对应的第一排序结果;a first sorting unit, configured to sort all the other task requests in descending order of the resource consumption to obtain a corresponding first sorting result;
第一获取单元,用于从所述第一排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第一任务请求;a first obtaining unit, configured to sequentially obtain a plurality of first task requests that are the same as the specified number, starting from other task requests ranked first in the first sorting result;
第二确定单元,用于将所有所述第一任务请求作为所述目标任务请求。The second determining unit is configured to use all the first task requests as the target task requests.
本实施例中,上述缓存数据的检测装置中的第一确定单元、第一排序单元、第一获取单元与第二确定单元的功能和作用的实现过程具体详见上述缓存数据的检测方法中对应步骤S2030至S2033的实现过程,在此不再赘述。In this embodiment, the implementation process of the functions and functions of the first determination unit, the first sorting unit, the first acquisition unit, and the second determination unit in the above-mentioned cached data detection device are detailed in the corresponding cached data detection method. The implementation process of steps S2030 to S2033 will not be repeated here.
进一步地,本申请一实施例中,上述筛选模块,包括:Further, in an embodiment of the present application, the above-mentioned screening module includes:
第二获取单元,用于基于预设的任务请求优先级表获取各所述其他任务请求的处理优先级;a second obtaining unit, configured to obtain the processing priority of each of the other task requests based on a preset task request priority table;
第二排序单元,用于根据所述处理优先级从低到高的顺序对所有所述其他任务请求进行排序,得到对应的第二排序结果;a second sorting unit, configured to sort all the other task requests according to the order of the processing priority from low to high to obtain a corresponding second sorting result;
第三获取单元,用于从所述第二排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第二任务请求;a third acquiring unit, configured to sequentially acquire a plurality of second task requests that are the same as the specified number, starting from other task requests ranked first in the second sorting result;
第三确定单元,用于将所述第二任务请求作为所述目标任务请求。A third determining unit, configured to use the second task request as the target task request.
本实施例中,上述缓存数据的检测装置中的第二获取单元、第二排序单元、第三获取单元与第三确定单元的功能和作用的实现过程具体详见上述缓存数据的检测方法中对应步骤S2034至S2037的实现过 程,在此不再赘述。In this embodiment, the implementation process of the functions and functions of the second acquisition unit, the second sorting unit, the third acquisition unit, and the third determination unit in the above-mentioned cached data detection device are detailed in the corresponding cached data detection method. The implementation process of steps S2034 to S2037 will not be repeated here.
进一步地,本申请一实施例中,上述缓存数据的检测装置,包括:Further, in an embodiment of the present application, the above-mentioned detection device for cached data includes:
第四获取模块,用于获取所述目标缓存数据的写入时间;以及,the fourth acquisition module, for acquiring the write time of the target cache data; and,
第五获取模块,用于获取所述目标缓存数据的过期时长;a fifth obtaining module, used for obtaining the expiration time of the target cache data;
第一计算模块,用于基于所述写入时间与所述过期时长,计算与所述目标缓存数据对应的过期时间点;a first calculation module, configured to calculate the expiration time point corresponding to the target cache data based on the writing time and the expiration time;
第五判断模块,用于获取当前时间,并判断所述当前时间是否超过所述过期时间点;A fifth judgment module, used to obtain the current time, and judge whether the current time exceeds the expiration time point;
清除模块,用于若所述当前时间超过所述过期时间点,则对所述目标缓存数据进行清除处理;a clearing module, configured to clear the target cache data if the current time exceeds the expiration time point;
第二计算模块,用于若所述当前时间未超过所述过期时间点,则计算所述过期时间点与所述当前时间的差值;a second calculation module, configured to calculate the difference between the expiration time and the current time if the current time does not exceed the expiration time;
第二生成模块,用于基于所述目标缓存数据与所述差值生成相应的过期提醒信息,并展示所述过期提醒信息。The second generating module is configured to generate corresponding expiration reminder information based on the target cache data and the difference, and display the expiration reminder information.
本实施例中,上述缓存数据的检测装置中的第四获取模块、第五获取模块、第一计算模块、第五判断模块、清除模块、第二计算模块与第二生成模块的功能和作用的实现过程具体详见上述缓存数据的检测方法中对应步骤S900至S906的实现过程,在此不再赘述。In this embodiment, the functions and functions of the fourth acquisition module, the fifth acquisition module, the first calculation module, the fifth judgment module, the clearing module, the second calculation module and the second generation module in the above-mentioned cached data detection device For details of the implementation process, please refer to the implementation process corresponding to steps S900 to S906 in the above-mentioned method for detecting cached data, which will not be repeated here.
进一步地,本申请一实施例中,上述缓存数据的检测装置,包括:Further, in an embodiment of the present application, the above-mentioned detection device for cached data includes:
第六获取模块,用于基于所述缓存检测请求,获取预存储的检测脚本模板;a sixth acquisition module, configured to acquire a pre-stored detection script template based on the cache detection request;
提取模块,用于对所述缓存检测请求进行解析处理,提取出所述项目信息;an extraction module, configured to perform parsing processing on the cache detection request, and extract the item information;
填充模块,用于使用所述项目信息对所述检测脚本模板进行填充处理,得到填充处理后的检测脚本模板;a filling module for filling the detection script template with the project information to obtain the detection script template after filling;
确定模块,用于将所述处理后的检测脚本模板作为所述缓存检测脚本。A determination module, configured to use the processed detection script template as the cache detection script.
本实施例中,上述缓存数据的检测装置中的第六获取模块、提取模块、填充模块与确定模块的功能和作用的实现过程具体详见上述缓存数据的检测方法中对应步骤S210至S213的实现过程,在此不再赘述。In this embodiment, for the implementation process of the functions and functions of the sixth acquisition module, extraction module, filling module and determination module in the above-mentioned cached data detection device, please refer to the implementation of corresponding steps S210 to S213 in the above-mentioned cached data detection method for details. The process is not repeated here.
进一步地,本申请一实施例中,上述缓存数据的检测装置,包括:Further, in an embodiment of the present application, the above-mentioned detection device for cached data includes:
第三生成模块,用于基于所述目标缓存数据,生成与所述目标缓存数据对应的警报信息;a third generating module, configured to generate alarm information corresponding to the target cache data based on the target cache data;
第七获取模块,用于获取预设的邮件登录信息,以及获取预设邮件地址;The seventh obtaining module is used to obtain the preset email login information and obtain the preset email address;
登录模块,用于基于所述邮件登录信息登录至对应的邮件服务器;a login module, configured to log in to the corresponding mail server based on the email login information;
发送模块,用于通过所述邮件服务器将所述警报信息发送至所述预设邮件地址。A sending module, configured to send the alarm information to the preset mail address through the mail server.
本实施例中,上述缓存数据的检测装置中的第三生成模块、第七获取模块、登录模块与发送模块的功能和作用的实现过程具体详见上述缓存数据的检测方法中对应步骤S910至S913的实现过程,在此不再赘述。In this embodiment, the implementation process of the functions and functions of the third generation module, the seventh acquisition module, the login module and the sending module in the above-mentioned cached data detection device can be found in the corresponding steps S910 to S913 in the above-mentioned cached data detection method for details. The implementation process is not repeated here.
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏、输入装置和数据库。其中,该计算机设备设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括存储介质、内存储器。该存储介质存储有操作系统、计算机程序和数据库。该内存储器为存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储缓存检测脚本、抽象语法树、第一key、第二key、第一数组、第二数组以及目标缓存数据等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机设备的显示屏是计算机中必不可少的一种图文输出设备,用于将数字信号转换为光信号,使文字与图形在显示屏的屏幕上显示出来。该计算机设备的输入装置是计算机与用户或其他设备之间进行信息交换的主要装置,用于把数据、指令及某些标志信息等输送到计算机中去。该计算机程序被处理器执行时以实现一种缓存数据的检测方法。Referring to FIG. 3 , an embodiment of the present application further provides a computer device. The computer device may be a server, and its internal structure may be as shown in FIG. 3 . The computer equipment includes a processor, memory, a network interface, a display screen, an input device and a database connected by a system bus. Among them, the processor of the computer equipment is designed to provide computing and control capabilities. The memory of the computer device includes a storage medium and an internal memory. The storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the storage medium. The database of the computer device is used for storing data such as cache detection script, abstract syntax tree, first key, second key, first array, second array and target cache data. The network interface of the computer device is used to communicate with an external terminal through a network connection. The display screen of the computer equipment is an indispensable graphic and text output device in the computer, which is used to convert digital signals into optical signals, so that text and graphics can be displayed on the screen of the display screen. The input device of the computer equipment is the main device for information exchange between the computer and the user or other devices, and is used to transmit data, instructions and certain flag information to the computer. When the computer program is executed by the processor, a method for detecting cached data is implemented.
上述处理器执行上述缓存数据的检测方法的步骤:The above-mentioned processor executes the steps of the above-mentioned method for detecting cached data:
判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the unfinished process corresponding to the target item contained in the local storage. requests to clear processed cached data;
若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;If an input cache detection request is received, based on the cache detection request, obtain a pre-stored cache detection script corresponding to the item information;
运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;Run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
生成与所述js代码对应的抽象语法树;generating an abstract syntax tree corresponding to the js code;
遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cache data contained in the js code through the preset first obtaining method, and store all the first keys in within the preset first array; and,
通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二 key,并将所有所述第二key存储于预设的第二数组内;Obtain the second keys corresponding to the second cache data one-to-one in the js code that has undergone the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array;
将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;Perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding matching result, Wherein, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;If the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。Based on the matching result between the second key contained in the first array and the second key in the second array being a third key that fails to match, the target cache data corresponding to the third key is acquired and displayed.
本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的装置、计算机设备的限定。Those skilled in the art can understand that the structure shown in FIG. 3 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the apparatus or computer equipment to which the solution of the present application is applied.
本申请一实施例还提供一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,其上存储有计算机程序,计算机程序被处理器执行时实现上述任一个示例性实施例所示出的缓存数据的检测方法,所述缓存数据的检测方法包括以下步骤:An embodiment of the present application further provides a computer-readable storage medium, the computer-readable storage medium may be non-volatile or volatile, and a computer program is stored thereon, and the computer program is implemented when executed by a processor The method for detecting cached data shown in any of the above exemplary embodiments, the method for detecting cached data includes the following steps:
判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the unfinished process corresponding to the target item contained in the local storage. requests to clear processed cached data;
若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;If an input cache detection request is received, based on the cache detection request, obtain a pre-stored cache detection script corresponding to the item information;
运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;Run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
生成与所述js代码对应的抽象语法树;generating an abstract syntax tree corresponding to the js code;
遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cache data contained in the js code through the preset first obtaining method, and store all the first keys in within the preset first array; and,
通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;Obtain the second keys corresponding to the second cache data one-to-one in the js code through the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array;
将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;Perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding matching result, Wherein, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;If the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。Based on the matching result between the second key contained in the first array and the second key in the second array being a third key that fails to match, the target cache data corresponding to the third key is acquired and displayed.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM通过多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer When the program is executed, it may include the flow of the embodiments of the above-mentioned methods. Wherein, any reference to memory, storage, database or other medium provided in this application and used in the embodiments may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the present application, and are not intended to limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present application, or directly or indirectly applied to other related The technical field is similarly included in the scope of patent protection of this application.

Claims (20)

  1. 一种缓存数据的检测方法,其中,包括:A detection method for cached data, comprising:
    判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the unfinished process corresponding to the target item contained in the local storage. requests to clear processed cached data;
    若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;If an input cache detection request is received, based on the cache detection request, obtain a pre-stored cache detection script corresponding to the item information;
    运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;Run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
    生成与所述js代码对应的抽象语法树;generating an abstract syntax tree corresponding to the js code;
    遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cache data contained in the js code through the preset first obtaining method, and store all the first keys in within the preset first array; and,
    通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;Obtain the second keys corresponding to the second cache data one-to-one in the js code through the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array;
    将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;Perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding matching result, Wherein, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
    若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;If the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
    基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。Based on the matching result between the second key contained in the first array and the second key in the second array being a third key that fails to match, the target cache data corresponding to the third key is acquired and displayed.
  2. 根据权利要求1所述的缓存数据的检测方法,其中,所述基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本的步骤之前,包括:The detection method for cached data according to claim 1, wherein, before the step of acquiring a pre-stored cache detection script corresponding to the item information based on the cache detection request, comprising:
    判断是否存在除所述缓存检测请求之外的待处理的其他任务请求;Determine whether there are other task requests to be processed other than the cache detection request;
    若存在除所述缓存检测请求之外的待处理的其他任务请求,则获取所述其他任务请求的请求数量;If there are other task requests to be processed other than the cache detection request, obtain the request quantity of the other task requests;
    判断所述请求数量是否大于预设的数量阈值;Determine whether the requested quantity is greater than a preset quantity threshold;
    若所述请求数量大于所述数量阈值,按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求;If the number of requests is greater than the number threshold, filter out a specified number of target task requests from the other task requests according to preset rules;
    判断所述目标任务中是否存在处理时间不可调整的特定任务请求;Judging whether there is a specific task request whose processing time cannot be adjusted in the target task;
    若所述目标任务中存在所述特定任务请求,则将所述特定任务从所述目标任务请求中剔除,得到剔除后的目标任务请求;If the specific task request exists in the target task, then the specific task is eliminated from the target task request to obtain the eliminated target task request;
    将所述剔除后的目标任务请求调整至预设的空闲时间段内进行处理,其中,所述空闲时间段与所述缓存检测请求的处理时间段不同。The eliminated target task request is adjusted to be processed within a preset idle time period, wherein the idle time period is different from the processing time period of the cache detection request.
  3. 根据权利要求2所述的缓存数据的检测方法,其中,所述按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求的步骤,包括:The method for detecting cached data according to claim 2, wherein the step of filtering out a specified number of target task requests from the other task requests according to a preset rule comprises:
    确定各所述其他任务请求的资源消耗量;determining the resource consumption requested by each of the other tasks;
    按照所述资源消耗量从大到小的顺序对所有所述其他任务请求进行排序,得到对应的第一排序结果;Sort all the other task requests in descending order of the resource consumption to obtain a corresponding first sorting result;
    从所述第一排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第一任务请求;Starting from other task requests ranked first in the first sorting result, sequentially acquiring a plurality of first task requests that are the same as the specified number;
    将所有所述第一任务请求作为所述目标任务请求。All the first task requests are used as the target task requests.
  4. 根据权利要求2所述的缓存数据的检测方法,其中,所述按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求的步骤,包括:The method for detecting cached data according to claim 2, wherein the step of filtering out a specified number of target task requests from the other task requests according to a preset rule comprises:
    基于预设的任务请求优先级表获取各所述其他任务请求的处理优先级;Obtain the processing priority of each of the other task requests based on the preset task request priority table;
    根据所述处理优先级从低到高的顺序对所有所述其他任务请求进行排序,得到对应的第二排序结果;Sort all the other task requests according to the order of the processing priority from low to high to obtain a corresponding second sorting result;
    从所述第二排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第二任务请求;Starting from other task requests ranked first in the second sorting result, sequentially acquiring multiple second task requests that are the same as the specified number;
    将所述第二任务请求作为所述目标任务请求。The second task request is used as the target task request.
  5. 根据权利要求1所述的缓存数据的检测方法,其中,所述基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据的步骤之后,包括:The method for detecting cached data according to claim 1, wherein the matching result based on the second key contained in the first array and the second key in the second array is a third key that fails to match, After the step of acquiring and displaying the target cache data corresponding to the third key, it includes:
    获取所述目标缓存数据的写入时间;以及,obtaining the write time of the target cache data; and,
    获取所述目标缓存数据的过期时长;Obtain the expiration time of the target cache data;
    基于所述写入时间与所述过期时长,计算与所述目标缓存数据对应的过期时间点;Based on the writing time and the expiration time, calculating the expiration time point corresponding to the target cache data;
    获取当前时间,并判断所述当前时间是否超过所述过期时间点;Obtain the current time, and determine whether the current time exceeds the expiration time point;
    若所述当前时间超过所述过期时间点,则对所述目标缓存数据进行清除处理;If the current time exceeds the expiration time point, clearing the target cache data;
    若所述当前时间未超过所述过期时间点,则计算所述过期时间点与所述当前时间的差值;If the current time does not exceed the expiration time point, calculate the difference between the expiration time point and the current time;
    基于所述目标缓存数据与所述差值生成相应的过期提醒信息,并展示所述过期提醒信息。Corresponding expiration reminder information is generated based on the target cache data and the difference, and the expiration reminder information is displayed.
  6. 根据权利要求1所述的缓存数据的检测方法,其中,所述基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本的步骤之前,包括:The detection method for cached data according to claim 1, wherein, before the step of acquiring a pre-stored cache detection script corresponding to the item information based on the cache detection request, comprising:
    基于所述缓存检测请求,获取预存储的检测脚本模板;Obtaining a pre-stored detection script template based on the cache detection request;
    对所述缓存检测请求进行解析处理,提取出所述项目信息;Perform parsing processing on the cache detection request, and extract the item information;
    使用所述项目信息对所述检测脚本模板进行填充处理,得到填充处理后的检测脚本模板;Filling the detection script template with the project information to obtain the detection script template after filling;
    将所述处理后的检测脚本模板作为所述缓存检测脚本。The processed detection script template is used as the cache detection script.
  7. 根据权利要求1所述的缓存数据的检测方法,其中,所述基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据的步骤之后,包括:The method for detecting cached data according to claim 1, wherein the matching result based on the second key contained in the first array and the second key in the second array is a third key that fails to match, After the step of acquiring and displaying the target cache data corresponding to the third key, it includes:
    基于所述目标缓存数据,生成与所述目标缓存数据对应的警报信息;generating alarm information corresponding to the target cache data based on the target cache data;
    获取预设的邮件登录信息,以及获取预设邮件地址;Obtain the default email login information, and obtain the default email address;
    基于所述邮件登录信息登录至对应的邮件服务器;Log in to the corresponding mail server based on the email login information;
    通过所述邮件服务器将所述警报信息发送至所述预设邮件地址。The alarm information is sent to the preset mail address through the mail server.
  8. 一种缓存数据的检测装置,其中,包括:A detection device for cached data, comprising:
    第一判断模块,用于判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;The first judgment module is used for judging whether an input cache detection request is received, wherein the cache detection request carries the item information corresponding to the target item, and the cache detection request is used to detect the data contained in the local storage and the target item. A request for cached data corresponding to the target item that has not been cleared;
    第一获取模块,用于若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;The first acquisition module is used to obtain a pre-stored cache detection script corresponding to the item information based on the cache detection request if an input cache detection request is received;
    第二获取模块,用于运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;The second acquisition module is used for running the cache detection script, and based on the running logic of the cache detection script, acquires the js code of the target project;
    第一生成模块,用于生成与所述js代码对应的抽象语法树;The first generation module is used to generate the abstract syntax tree corresponding to the js code;
    第一存储模块,用于遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,The first storage module is used to traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cached data contained in the js code through a preset first acquisition method, and store all the objects in the js code. The first key is stored in the preset first array; And,
    第二存储模块,用于第一判断模块,用于通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;The second storage module is used for the first judgment module, and is used to obtain the second key corresponding to the second cached data in the js code that has undergone the cache clearing process through a preset second obtaining method, and store all the second keys in the js code. The second key is stored in the preset second array;
    处理模块,用于将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;A processing module, configured to perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain A corresponding matching result, wherein the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
    判定模块,用于若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;A determination module, configured to determine that the specified cache data corresponding to the specified key has not been cleared if the matching result is a matching failure;
    展示模块,用于基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。A display module, configured to acquire and display a target corresponding to the third key based on the third key that fails to match based on the matching result between the second key contained in the first array and the second key in the second array cache data.
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,其中,所述处理器执行所述计算机程序时实现一种缓存数据的检测方法:A computer device, comprising a memory and a processor, wherein a computer program is stored in the memory, wherein, when the processor executes the computer program, a method for detecting cached data is implemented:
    其中,所述缓存数据的检测方法包括:Wherein, the detection method of the cached data includes:
    判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the unfinished process corresponding to the target item contained in the local storage. requests to clear processed cached data;
    若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本;If an input cache detection request is received, based on the cache detection request, obtain a pre-stored cache detection script corresponding to the item information;
    运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;Run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
    生成与所述js代码对应的抽象语法树;generating an abstract syntax tree corresponding to the js code;
    遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cache data contained in the js code through the preset first obtaining method, and store all the first keys in within the preset first array; and,
    通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;Obtain the second keys corresponding to the second cache data one-to-one in the js code through the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array;
    将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;Perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding matching result, Wherein, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
    若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;If the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
    基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。Based on the matching result between the second key contained in the first array and the second key in the second array being a third key that fails to match, the target cache data corresponding to the third key is acquired and displayed.
  10. 根据权利要求9所述的计算机设备,其中,所述基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本的步骤之前,包括:The computer device according to claim 9, wherein before the step of acquiring a pre-stored cache detection script corresponding to the item information based on the cache detection request, the method comprises:
    判断是否存在除所述缓存检测请求之外的待处理的其他任务请求;Determine whether there are other task requests to be processed other than the cache detection request;
    若存在除所述缓存检测请求之外的待处理的其他任务请求,则获取所述其他任务请求的请求数量;If there are other task requests to be processed other than the cache detection request, obtain the request quantity of the other task requests;
    判断所述请求数量是否大于预设的数量阈值;Determine whether the requested quantity is greater than a preset quantity threshold;
    若所述请求数量大于所述数量阈值,按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求;If the number of requests is greater than the number threshold, filter out a specified number of target task requests from the other task requests according to preset rules;
    判断所述目标任务中是否存在处理时间不可调整的特定任务请求;Judging whether there is a specific task request whose processing time cannot be adjusted in the target task;
    若所述目标任务中存在所述特定任务请求,则将所述特定任务从所述目标任务请求中剔除,得到剔除后的目标任务请求;If the specific task request exists in the target task, then the specific task is eliminated from the target task request to obtain the eliminated target task request;
    将所述剔除后的目标任务请求调整至预设的空闲时间段内进行处理,其中,所述空闲时间段与所述缓存检测请求的处理时间段不同。The eliminated target task request is adjusted to be processed within a preset idle time period, wherein the idle time period is different from the processing time period of the cache detection request.
  11. 根据权利要求10所述的计算机设备,其中,所述按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求的步骤,包括:The computer device according to claim 10, wherein the step of filtering out a specified number of target task requests from the other task requests according to a preset rule comprises:
    确定各所述其他任务请求的资源消耗量;determining the resource consumption requested by each of the other tasks;
    按照所述资源消耗量从大到小的顺序对所有所述其他任务请求进行排序,得到对应的第一排序结果;Sort all the other task requests in descending order of the resource consumption to obtain a corresponding first sorting result;
    从所述第一排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第一任务请求;Starting from other task requests ranked first in the first sorting result, sequentially acquiring a plurality of first task requests that are the same as the specified number;
    将所有所述第一任务请求作为所述目标任务请求。All the first task requests are used as the target task requests.
  12. 根据权利要求10所述的计算机设备,其中,所述按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求的步骤,包括:The computer device according to claim 10, wherein the step of filtering out a specified number of target task requests from the other task requests according to a preset rule comprises:
    基于预设的任务请求优先级表获取各所述其他任务请求的处理优先级;Obtain the processing priority of each of the other task requests based on the preset task request priority table;
    根据所述处理优先级从低到高的顺序对所有所述其他任务请求进行排序, 得到对应的第二排序结果;Sort all the other task requests according to the order of the processing priority from low to high to obtain a corresponding second sorting result;
    从所述第二排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第二任务请求;Starting from other task requests ranked first in the second sorting result, sequentially acquiring multiple second task requests that are the same as the specified number;
    将所述第二任务请求作为所述目标任务请求。The second task request is used as the target task request.
  13. 根据权利要求9所述的计算机设备,其中,所述基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据的步骤之后,包括:The computer device according to claim 9, wherein, based on the matching result between the second key contained in the first array and the second key in the second array, the third key that fails to match is obtained and displayed. After the step of the target cache data corresponding to the third key, it includes:
    获取所述目标缓存数据的写入时间;以及,obtaining the write time of the target cache data; and,
    获取所述目标缓存数据的过期时长;Obtain the expiration time of the target cache data;
    基于所述写入时间与所述过期时长,计算与所述目标缓存数据对应的过期时间点;Based on the writing time and the expiration time, calculating the expiration time point corresponding to the target cache data;
    获取当前时间,并判断所述当前时间是否超过所述过期时间点;Obtain the current time, and determine whether the current time exceeds the expiration time point;
    若所述当前时间超过所述过期时间点,则对所述目标缓存数据进行清除处理;If the current time exceeds the expiration time point, clearing the target cache data;
    若所述当前时间未超过所述过期时间点,则计算所述过期时间点与所述当前时间的差值;If the current time does not exceed the expiration time point, calculate the difference between the expiration time point and the current time;
    基于所述目标缓存数据与所述差值生成相应的过期提醒信息,并展示所述过期提醒信息。Corresponding expiration reminder information is generated based on the target cache data and the difference, and the expiration reminder information is displayed.
  14. 根据权利要求9所述的计算机设备,其中,所述基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本的步骤之前,包括:The computer device according to claim 9, wherein before the step of acquiring a pre-stored cache detection script corresponding to the item information based on the cache detection request, the method comprises:
    基于所述缓存检测请求,获取预存储的检测脚本模板;Obtaining a pre-stored detection script template based on the cache detection request;
    对所述缓存检测请求进行解析处理,提取出所述项目信息;Perform parsing processing on the cache detection request, and extract the item information;
    使用所述项目信息对所述检测脚本模板进行填充处理,得到填充处理后的检测脚本模板;Filling the detection script template with the project information to obtain the detection script template after filling;
    将所述处理后的检测脚本模板作为所述缓存检测脚本。The processed detection script template is used as the cache detection script.
  15. 根据权利要求9所述的计算机设备,其中,所述基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据的步骤之后,包括:The computer device according to claim 9, wherein, based on the matching result between the second key contained in the first array and the second key in the second array, the third key that fails to match is obtained and displayed. After the step of the target cache data corresponding to the third key, it includes:
    基于所述目标缓存数据,生成与所述目标缓存数据对应的警报信息;generating alarm information corresponding to the target cache data based on the target cache data;
    获取预设的邮件登录信息,以及获取预设邮件地址;Obtain the default email login information, and obtain the default email address;
    基于所述邮件登录信息登录至对应的邮件服务器;Log in to the corresponding mail server based on the email login information;
    通过所述邮件服务器将所述警报信息发送至所述预设邮件地址。The alarm information is sent to the preset mail address through the mail server.
  16. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现一种缓存数据的检测方法,其中,所述缓存数据的检测方法包括以下步骤:A computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, a method for detecting cached data is implemented, wherein the method for detecting cached data comprises the following steps:
    判断是否接收到输入的缓存检测请求,其中,所述缓存检测请求携带有与目标项目对应的项目信息,所述缓存检测请求为用于检测本地存储中包含的与所述目标项目对应的未进行过清除处理的缓存数据的请求;Determine whether an input cache detection request is received, wherein the cache detection request carries item information corresponding to the target item, and the cache detection request is used to detect the unprocessed items corresponding to the target item contained in the local storage. requests to clear processed cached data;
    若接收到输入的缓存检测请求,基于所述缓存检测请求,获取与所述项目 信息对应的预存储的缓存检测脚本;If receiving the cache detection request of input, based on the cache detection request, obtain the pre-stored cache detection script corresponding to the item information;
    运行所述缓存检测脚本,基于所述缓存检测脚本的运行逻辑,获取所述目标项目的js代码;Run the cache detection script, and obtain the js code of the target project based on the running logic of the cache detection script;
    生成与所述js代码对应的抽象语法树;generating an abstract syntax tree corresponding to the js code;
    遍历所述抽象语法树中的所有对象,通过预设的第一获取方法获取所述js代码中包含的各第一缓存数据一一对应的第一key,并将所有所述第一key存储于预设的第一数组内;以及,Traverse all the objects in the abstract syntax tree, obtain the first key corresponding to each first cache data contained in the js code through the preset first obtaining method, and store all the first keys in within the preset first array; and,
    通过预设的第二获取方法获取所述js代码中经过缓存清除处理的第二缓存数据一一对应的第二key,并将所有所述第二key存储于预设的第二数组内;Obtain the second keys corresponding to the second cache data one-to-one in the js code through the cache clearing process by using the preset second acquisition method, and store all the second keys in the preset second array;
    将指定key分别与所述第二数组中包含的每一个所述第二key进行匹配处理,以检测所述第二数组内是否存在与所述指定key相同的目标key,得到对应的匹配结果,其中,所述指定key为所述第一数组内包含的所有所述第一key中的任意一个key,所述匹配结果包括匹配成功或匹配失败;Perform matching processing on the specified key with each of the second keys contained in the second array, to detect whether there is a target key that is the same as the specified key in the second array, and obtain a corresponding matching result, Wherein, the specified key is any one of all the first keys contained in the first array, and the matching result includes matching success or matching failure;
    若所述匹配结果为匹配失败,则判定与所述指定key对应的指定缓存数据未进行过清除处理;If the matching result is a matching failure, it is determined that the specified cache data corresponding to the specified key has not been cleared;
    基于所述第一数组内包含的与所述第二数组内的第二key之间的匹配结果为匹配失败的第三key,获取并展示与所述第三key对应的目标缓存数据。Based on the matching result between the second key contained in the first array and the second key in the second array being a third key that fails to match, the target cache data corresponding to the third key is acquired and displayed.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本的步骤之前,包括:The computer-readable storage medium according to claim 16, wherein before the step of acquiring a pre-stored cache detection script corresponding to the item information based on the cache detection request, the method comprises:
    判断是否存在除所述缓存检测请求之外的待处理的其他任务请求;Determine whether there are other task requests to be processed other than the cache detection request;
    若存在除所述缓存检测请求之外的待处理的其他任务请求,则获取所述其他任务请求的请求数量;If there are other task requests to be processed other than the cache detection request, obtain the request quantity of the other task requests;
    判断所述请求数量是否大于预设的数量阈值;Determine whether the requested quantity is greater than a preset quantity threshold;
    若所述请求数量大于所述数量阈值,按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求;If the number of requests is greater than the number threshold, filter out a specified number of target task requests from the other task requests according to preset rules;
    判断所述目标任务中是否存在处理时间不可调整的特定任务请求;Judging whether there is a specific task request whose processing time cannot be adjusted in the target task;
    若所述目标任务中存在所述特定任务请求,则将所述特定任务从所述目标任务请求中剔除,得到剔除后的目标任务请求;If the specific task request exists in the target task, then the specific task is eliminated from the target task request to obtain the eliminated target task request;
    将所述剔除后的目标任务请求调整至预设的空闲时间段内进行处理,其中,所述空闲时间段与所述缓存检测请求的处理时间段不同。The eliminated target task request is adjusted to be processed within a preset idle time period, wherein the idle time period is different from the processing time period of the cache detection request.
  18. 根据权利要求17所述的计算机可读存储介质,其中,所述按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求的步骤,包括:The computer-readable storage medium according to claim 17, wherein the step of filtering out a specified number of target task requests from the other task requests according to a preset rule comprises:
    确定各所述其他任务请求的资源消耗量;determining the resource consumption requested by each of the other tasks;
    按照所述资源消耗量从大到小的顺序对所有所述其他任务请求进行排序,得到对应的第一排序结果;Sort all the other task requests in descending order of the resource consumption to obtain a corresponding first sorting result;
    从所述第一排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第一任务请求;Starting from other task requests ranked first in the first sorting result, sequentially acquiring a plurality of first task requests that are the same as the specified number;
    将所有所述第一任务请求作为所述目标任务请求。All the first task requests are used as the target task requests.
  19. 根据权利要求17所述的计算机可读存储介质,其中,所述按照预设规则从所述其他任务请求中筛选出指定数量的目标任务请求的步骤,包括:The computer-readable storage medium according to claim 17, wherein the step of filtering out a specified number of target task requests from the other task requests according to a preset rule comprises:
    基于预设的任务请求优先级表获取各所述其他任务请求的处理优先级;Obtain the processing priority of each of the other task requests based on the preset task request priority table;
    根据所述处理优先级从低到高的顺序对所有所述其他任务请求进行排序,得到对应的第二排序结果;Sort all the other task requests according to the order of the processing priority from low to high to obtain a corresponding second sorting result;
    从所述第二排序结果中排在首位的其他任务请求开始,依次获取与所述指定数量相同的多个第二任务请求;Starting from other task requests ranked first in the second sorting result, sequentially acquiring multiple second task requests that are the same as the specified number;
    将所述第二任务请求作为所述目标任务请求。The second task request is used as the target task request.
  20. 根据权利要求16所述的计算机可读存储介质,其中,所述基于所述缓存检测请求,获取与所述项目信息对应的预存储的缓存检测脚本的步骤之前,包括:The computer-readable storage medium according to claim 16, wherein before the step of acquiring a pre-stored cache detection script corresponding to the item information based on the cache detection request, the method comprises:
    基于所述缓存检测请求,获取预存储的检测脚本模板;Obtaining a pre-stored detection script template based on the cache detection request;
    对所述缓存检测请求进行解析处理,提取出所述项目信息;Perform parsing processing on the cache detection request, and extract the item information;
    使用所述项目信息对所述检测脚本模板进行填充处理,得到填充处理后的检测脚本模板;Filling the detection script template with the project information to obtain the detection script template after filling;
    将所述处理后的检测脚本模板作为所述缓存检测脚本。The processed detection script template is used as the cache detection script.
PCT/CN2021/091713 2020-12-15 2021-04-30 Cache data detection method and apparatus, computer device and storage medium WO2022126984A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011479824.3A CN112540811B (en) 2020-12-15 2020-12-15 Cache data detection method and device, computer equipment and storage medium
CN202011479824.3 2020-12-15

Publications (1)

Publication Number Publication Date
WO2022126984A1 true WO2022126984A1 (en) 2022-06-23

Family

ID=75018808

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/091713 WO2022126984A1 (en) 2020-12-15 2021-04-30 Cache data detection method and apparatus, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN112540811B (en)
WO (1) WO2022126984A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599711A (en) * 2022-11-30 2023-01-13 苏州浪潮智能科技有限公司(Cn) Cache data processing method, system, device, equipment and computer storage medium
CN116016261A (en) * 2022-12-26 2023-04-25 广州市保伦电子有限公司 System operation and maintenance method, device and equipment
CN116112561A (en) * 2023-02-14 2023-05-12 江西数字网联信息安全技术有限公司 Visual management method and system for 3d Internet of vehicles based on web browser cache
CN117390072A (en) * 2023-12-07 2024-01-12 深圳市云希谷科技有限公司 Method for improving network request speed in embedded system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112540811B (en) * 2020-12-15 2022-03-18 平安科技(深圳)有限公司 Cache data detection method and device, computer equipment and storage medium
CN113626483B (en) * 2021-08-18 2022-04-26 重庆允成互联网科技有限公司 Front-end caching method, system, equipment and storage medium for filling forms
CN113923002B (en) * 2021-09-29 2024-04-19 山石网科通信技术股份有限公司 Computer network intrusion prevention method, device, storage medium and processor

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104615596A (en) * 2013-11-04 2015-05-13 腾讯科技(深圳)有限公司 Method for clearing history information and browser
US9531829B1 (en) * 2013-11-01 2016-12-27 Instart Logic, Inc. Smart hierarchical cache using HTML5 storage APIs
CN106383748A (en) * 2016-09-05 2017-02-08 Tcl集团股份有限公司 Cloud service-based storage space clearing method and system
CN110688307A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 JavaScript code detection method, apparatus, device and storage medium
CN111897813A (en) * 2020-07-08 2020-11-06 苏宁金融科技(南京)有限公司 Flow control method and device for database resources
CN112540811A (en) * 2020-12-15 2021-03-23 平安科技(深圳)有限公司 Cache data detection method and device, computer equipment and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105122727A (en) * 2013-01-11 2015-12-02 Db网络公司 Systems and methods for detecting and mitigating threats to a structured data storage system
CN107168872B (en) * 2017-05-11 2020-09-11 网易(杭州)网络有限公司 Code checking method, device, storage medium and processor
CN108647156A (en) * 2018-04-10 2018-10-12 平安科技(深圳)有限公司 Cache cleaner method, apparatus, computer installation and storage medium
CN111176754B (en) * 2019-12-25 2023-11-10 北京蓝亚盒子科技有限公司 HTML5 application running method, device, running machine and computer readable storage medium
CN111752975A (en) * 2020-05-28 2020-10-09 中国平安财产保险股份有限公司 Data loading method and device based on Redis, computer equipment and storage medium
CN111563216B (en) * 2020-07-16 2020-11-06 平安国际智慧城市科技股份有限公司 Local data caching method and device and related equipment
CN112035496A (en) * 2020-08-28 2020-12-04 平安科技(深圳)有限公司 Data processing method, related equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9531829B1 (en) * 2013-11-01 2016-12-27 Instart Logic, Inc. Smart hierarchical cache using HTML5 storage APIs
CN104615596A (en) * 2013-11-04 2015-05-13 腾讯科技(深圳)有限公司 Method for clearing history information and browser
CN106383748A (en) * 2016-09-05 2017-02-08 Tcl集团股份有限公司 Cloud service-based storage space clearing method and system
CN110688307A (en) * 2019-09-09 2020-01-14 平安普惠企业管理有限公司 JavaScript code detection method, apparatus, device and storage medium
CN111897813A (en) * 2020-07-08 2020-11-06 苏宁金融科技(南京)有限公司 Flow control method and device for database resources
CN112540811A (en) * 2020-12-15 2021-03-23 平安科技(深圳)有限公司 Cache data detection method and device, computer equipment and storage medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115599711A (en) * 2022-11-30 2023-01-13 苏州浪潮智能科技有限公司(Cn) Cache data processing method, system, device, equipment and computer storage medium
CN115599711B (en) * 2022-11-30 2023-03-10 苏州浪潮智能科技有限公司 Cache data processing method, system, device, equipment and computer storage medium
CN116016261A (en) * 2022-12-26 2023-04-25 广州市保伦电子有限公司 System operation and maintenance method, device and equipment
CN116112561A (en) * 2023-02-14 2023-05-12 江西数字网联信息安全技术有限公司 Visual management method and system for 3d Internet of vehicles based on web browser cache
CN116112561B (en) * 2023-02-14 2024-02-09 江西数字网联信息安全技术有限公司 Visual management method and system for 3d Internet of vehicles based on web browser cache
CN117390072A (en) * 2023-12-07 2024-01-12 深圳市云希谷科技有限公司 Method for improving network request speed in embedded system
CN117390072B (en) * 2023-12-07 2024-03-26 深圳市云希谷科技有限公司 Method for improving network request speed in embedded system

Also Published As

Publication number Publication date
CN112540811B (en) 2022-03-18
CN112540811A (en) 2021-03-23

Similar Documents

Publication Publication Date Title
WO2022126984A1 (en) Cache data detection method and apparatus, computer device and storage medium
US11238069B2 (en) Transforming a data stream into structured data
CN108984155B (en) Data processing flow setting method and device
CN111026779B (en) Data processing method, device and storage medium based on Flink SQL
CN107038222B (en) Database cache implementation method and system
CN106293891B (en) Multidimensional investment index monitoring method
CN110704290A (en) Log analysis method and device
US9930113B2 (en) Data retrieval via a telecommunication network
WO2022053163A1 (en) Distributed trace anomaly detection with self-attention based deep learning
CN114385763A (en) Data blood margin analysis method, device and system and readable storage medium
US11182386B2 (en) Offloading statistics collection
CN107330031B (en) Data storage method and device and electronic equipment
CN112613176A (en) Slow SQL statement prediction method and system
CN113190237B (en) Data processing method, system and device
CN115658635A (en) Log analysis method and device
CN111767288B (en) Project declaration data processing method and device
US20140136274A1 (en) Providing multiple level process intelligence and the ability to transition between levels
CN114510708A (en) Real-time data warehouse construction and anomaly detection method, device, equipment and product
CN112435151A (en) Government affair information data processing method and system based on correlation analysis
EP2990960A1 (en) Data retrieval via a telecommunication network
CN114157515B (en) Response-based network flow high-speed analysis method and system
US11327938B2 (en) Method to improve prediction accuracy of business data with enhanced data filtering and data reduction mechanism
US11822459B2 (en) Automated function category detection
CN111930545B (en) SQL script processing method, SQL script processing device and SQL script processing server
CN117971908A (en) Method and device for entering lake in real time by data, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21904923

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21904923

Country of ref document: EP

Kind code of ref document: A1