CN117216103A - Method, device, computer equipment and storage medium for determining cache failure time - Google Patents

Method, device, computer equipment and storage medium for determining cache failure time Download PDF

Info

Publication number
CN117216103A
CN117216103A CN202310928815.5A CN202310928815A CN117216103A CN 117216103 A CN117216103 A CN 117216103A CN 202310928815 A CN202310928815 A CN 202310928815A CN 117216103 A CN117216103 A CN 117216103A
Authority
CN
China
Prior art keywords
target
time
flow value
determining
data flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310928815.5A
Other languages
Chinese (zh)
Inventor
代浩翔
张晓明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
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 Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202310928815.5A priority Critical patent/CN117216103A/en
Publication of CN117216103A publication Critical patent/CN117216103A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application relates to a method, a device, computer equipment and a storage medium for determining cache failure time, which relate to the technical field of artificial intelligence and can be applied to the financial field or other technical fields. The method comprises the following steps: according to the target access time of target transaction data under the target service, determining a target access time period corresponding to the target access time from at least two access time periods, acquiring a target accumulated data flow value of the target service in the target access time period, and determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through an expiration time determination model. By adopting the method, the accuracy of determining the cache failure time can be improved.

Description

Method, device, computer equipment and storage medium for determining cache failure time
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a method and a device for determining cache failure time, computer equipment and a storage medium, which can be applied to the financial field or other technical fields.
Background
With the increasing of the data volume of the transaction data, the accessed transaction data can be kept in the cache to reduce the access pressure of the database, namely, when a new access request occurs, whether the needed data exists in the cache can be firstly inquired, and when the needed data does not exist in the cache, the database is inquired.
In order to realize the timing update of the data in the cache, a corresponding cache expiration time may be set for each transaction data in the cache. However, it is common at present to set the same cache expiration time for all data in the cache.
Because the access amount of the transaction data fluctuates, the mode of setting the unified cache expiration time for all the transaction data in the cache can reduce the accuracy of determining the cache expiration time, and further cause the problems of delayed cache data update or larger access pressure of the database.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a method, an apparatus, a computer device, and a storage medium for determining a cache expiration time, which can improve the accuracy of determining the cache expiration time.
In a first aspect, the present application provides a method for determining a cache expiration time. The method comprises the following steps:
determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service;
acquiring a target accumulated data flow value of a target service in a target access period;
and determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model.
In one embodiment, the method further comprises:
acquiring a historical data flow value of a target service at each sampling moment in a historical period; and determining at least two access periods according to the historical data flow value of each sampling moment.
In one embodiment, determining at least two access periods based on historical data flow values for each sampling instant includes:
drawing a distribution curve between the data flow value and time according to the historical data flow value of each sampling moment; dividing the distribution curve to obtain at least two dividing areas; wherein, the total historical data flow value in each dividing area is the same; and determining at least two access time periods according to sampling moments corresponding to the dividing time points of each dividing area.
In one embodiment, obtaining a target cumulative data flow value for a target service over a target access period includes:
and acquiring a target accumulated data flow value of the target service between the starting time of the target access period and the target access time.
In one embodiment, the dead time determination model is trained by:
acquiring a sample accumulated data flow value corresponding to sample transaction data under sample service; and training the initial neural network model by adopting a sample accumulated data flow value and sample buffer dead time corresponding to sample transaction data to obtain a dead time determination model.
In one embodiment, determining, by the expiration time determining model, a target cache expiration time corresponding to target transaction data according to a target accumulated data flow value includes:
acquiring the data buffering quantity of a buffering area under the target access time; determining a failure time coefficient according to the data buffering quantity; and determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value and the expiration time coefficient by an expiration time determination model.
In a second aspect, the application further provides a device for determining the cache expiration time. The device comprises:
the time period determining module is used for determining a target access time period corresponding to the target access time from at least two access time periods according to the target access time of the target transaction data under the target service;
the flow value determining module is used for obtaining a target accumulated data flow value of the target service in the target access period;
and the expiration time determining module is used for determining the expiration time of the target cache corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determining model.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service;
acquiring a target accumulated data flow value of a target service in a target access period;
and determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service;
acquiring a target accumulated data flow value of a target service in a target access period;
and determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service;
acquiring a target accumulated data flow value of a target service in a target access period;
and determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model.
The method, the device, the computer equipment and the storage medium for determining the cache expiration time determine a target access time period corresponding to the target access time according to the target access time of target transaction data under the target service, and a target accumulated data flow value in the target access time period; and then, determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value by an expiration time determination model. Compared with the prior art that uniform cache expiration time is configured for all transaction data, the method can be used for configuring target cache expiration time suitable for target transaction data according to the target accumulated data flow value when the target transaction data is accessed, and further accuracy of determining the cache expiration time is improved.
Drawings
FIG. 1 is an application environment diagram of a method for determining a cache expiration time in one embodiment;
FIG. 2 is a flow chart illustrating a method for determining a cache expiration time according to one embodiment;
FIG. 3 is a flow diagram of partitioning access periods in one embodiment;
FIG. 4 is a flow chart illustrating determining a target cache expiration time according to one embodiment;
FIG. 5 is a flowchart illustrating a method for determining a cache expiration time according to another embodiment;
FIG. 6 is a block diagram of a device for determining a cache expiration time in one embodiment;
FIG. 7 is a block diagram illustrating a configuration of an apparatus for determining a cache expiration time according to another embodiment;
fig. 8 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The method for determining the cache expiration time provided by the embodiment of the application can be applied to an application environment as shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. Such as historical data flow values, etc. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. For example, the terminal 102 sends an access request to the server 104 for the target transaction data; further, the server 104 determines a target access period corresponding to the target access time from at least two access periods according to the target access time to the target transaction data under the target service, obtains a target accumulated data flow value of the target service in the target access period, and determines a target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through an expiration time determination model. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and internet of things devices. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
With the increasing of the data volume of the transaction data, the accessed transaction data can be kept in the cache to reduce the access pressure of the database, namely, when a new access request occurs, whether the needed data exists in the cache can be firstly inquired, and when the needed data does not exist in the cache, the database is inquired.
In order to realize the timing update of the data in the cache, a corresponding cache expiration time may be set for each transaction data in the cache. However, it is common at present to set the same cache expiration time for all data in the cache.
Because the access amount of the transaction data fluctuates, the mode of setting the unified cache expiration time for all the transaction data in the cache can reduce the accuracy of determining the cache expiration time, and further cause the problems of delayed cache data update or larger access pressure of the database.
Based on this, in one embodiment, as shown in fig. 2, a method for determining a cache expiration time is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
s201, determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service.
Wherein the target access time refers to a time of accessing the target transaction data; the access period refers to at least two periods divided according to the transaction data access condition.
It can be understood that, in order to facilitate the query of the transaction data under the target service, all the transaction data may be stored in the target database corresponding to the target transaction, and a corresponding cache area may be allocated to the target database, for storing the cache data generated when the transaction data under the target service is accessed.
Optionally, the data access request may be sent to the server through a terminal embedded with the data access tool; and then, after receiving the data access request, the server searches the required target transaction data in the cache area, and when the target transaction data does not exist in the cache area, the server continues to search in the target database until the target transaction data is successfully accessed.
Further, after the target transaction data access is finished, a target access period corresponding to the target access time can be determined according to the target access time of the target transaction data. For example, the access period is divided into [00:00, 12:00) and [12:00, 24:00), and if the target access time is 9:00, the target access period corresponding to the target access time is [00:00, 12:00).
S202, acquiring a target accumulated data flow value of a target service in a target access period.
The accumulated data flow value refers to the total data flow value generated by accessing the database corresponding to the target service in a certain period.
Optionally, the target accumulated data flow value of the target service in the target access period may be obtained according to the data access condition of the database corresponding to the target service in the target access period. For example, the total access amount to the database corresponding to the target service in the target access period is taken as the target accumulated data flow value.
For example, a target cumulative data flow value for the target traffic is obtained between a start time of the target access period and the target access time. Alternatively, the target cumulative data flow value of the target service in the target access period may be obtained according to the data access condition between the start time of the target access period and the target access time.
S203, determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model.
The dead time determining model refers to a trained neural network model, and can determine the buffer dead time corresponding to the transaction data.
Alternatively, the target accumulated data flow value corresponding to the target transaction data may be input to the dead time determining model, and the dead time determining model determines the target cache dead time corresponding to the target transaction data according to the target accumulated data flow value and the model parameter.
Further, a target cache expiration time is set for the cache data generated by accessing the target transaction data, so that the cache data generated by accessing the target transaction data can be automatically cleared when the target cache expiration time is reached.
In the method for determining the cache expiration time, the target access time period corresponding to the target access time and the target accumulated data flow value in the target access time period are determined according to the target access time of the target transaction data under the target service; and then, determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value by an expiration time determination model. Compared with the prior art that uniform cache expiration time is configured for all transaction data, the method can be used for configuring target cache expiration time suitable for target transaction data according to the target accumulated data flow value when the target transaction data is accessed, and further accuracy of determining the cache expiration time is improved.
In order to ensure the accuracy of the access period division, in this embodiment, an alternative way of dividing the access period is provided, as shown in fig. 3, and specifically includes the following steps:
s301, acquiring historical data flow values of the target service at each sampling moment in a historical period.
Optionally, each sampling time may be determined according to a preset sampling frequency; and then, under each sampling time, acquiring a historical data flow value of the target service, and storing the historical data flow value corresponding to each sampling time in a data storage system.
Further, the historical data flow value of each sampling time of the target service in the historical period can be directly obtained in the data storage system.
S302, determining at least two access periods according to the historical data flow value of each sampling time.
Alternatively, the historical data flow value at each sampling time may be input into a trained time-interval-division model, and at least two access time intervals may be determined by the time-interval-division model based on the historical data flow value at each sampling time and the model parameters.
Alternatively, the following steps are employed to determine the access period.
And a first step of drawing a distribution curve between the data flow value and time according to the historical data flow value of each sampling moment.
Optionally, after the historical data flow value of each sampling time is obtained, a distribution curve between the data flow value and time may be drawn according to the corresponding relationship between the sampling time and the historical data flow value.
And a second step of dividing the distribution curve to obtain at least two divided areas.
Wherein the total historical data flow value in each dividing area is the same.
It can be understood that in order to avoid the situation that the determination of the cache failure time is inaccurate due to the fact that the access amount of transaction data under the target service is large in a certain period, the total historical data flow value in each period needs to be ensured to be the same.
And a third step of determining at least two access periods according to sampling moments corresponding to the dividing time points of each dividing area.
Optionally, after determining each divided area, the start-stop time of the access period may be determined according to the sampling time corresponding to the dividing point of each divided area, so as to determine at least two access periods.
In this embodiment, the historical data flow values of each sampling time are introduced, so that the access time periods can be reasonably allocated according to the historical data flow values of each sampling time, and the accuracy of division of the access time periods is further ensured.
In order to ensure the accuracy of the dead time determining model, in the embodiment, an optional mode of model training is provided, specifically, a sample accumulated data flow value corresponding to sample transaction data under sample service is obtained, and the initial neural network model is trained by adopting the sample accumulated data flow value and the sample buffer dead time corresponding to the sample transaction data to obtain the dead time determining model.
Wherein, any business with corresponding database can be used as sample business; sample transaction data refers to transaction data that is already under the sample business.
Optionally, referring to step S202, a sample accumulated data flow value corresponding to each sample transaction data under the sample service may be determined according to the access condition of each sample transaction data under the sample service.
Furthermore, sample cache expiration time corresponding to each sample transaction data can be marked in advance; then, for each sample transaction data, the sample buffer expiration time corresponding to the sample transaction data can be used as supervision data, and the sample accumulated data flow value corresponding to the sample transaction data is input into the initial neural network model together for training, so that an expiration time determination model is obtained.
In this embodiment, the initial neural network model is trained by using the sample accumulated data flow value and the sample buffer expiration time corresponding to the sample transaction data, so that the accuracy of the expiration time determination model can be ensured.
In order to ensure the accuracy of the target cache expiration time, in this embodiment, an alternative way of determining the target cache expiration time is provided, as shown in fig. 4, which specifically includes the following steps:
s401, acquiring the data buffering quantity of the buffering area under the target access time.
Wherein the data buffering amount refers to the total amount of data in the buffering area.
Optionally, the data buffering amount of the buffering area under the target access time can be determined according to the use condition of the buffering area.
S402, determining a failure time coefficient according to the data buffering quantity.
Wherein, the expiration time coefficient refers to a value for adjusting the expiration time of the cache.
It can be understood that, in the case that the amount of data buffered in the buffer area is large, in order to avoid the situation that the buffer area is completely used, the buffer expiration time corresponding to the buffered data to be stored in the buffer area needs to be shortened.
Therefore, the dead time coefficient can be determined according to the data buffering quantity, and then the buffer dead time is adjusted through the dead time coefficient, for example, in the case of large data buffering quantity, the dead time coefficient can be adjusted to be smaller; in the case of a small data buffer, the time-to-failure coefficient can be scaled up.
S403, determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value and the expiration time coefficient through an expiration time determination model.
Optionally, after determining the dead time coefficient corresponding to the target transaction data, the target accumulated data flow value and the dead time coefficient may be input into the dead time determining model at the same time, and the dead time determining model determines the target cache dead time corresponding to the target transaction data according to the target accumulated data flow value, the dead time coefficient and the model parameter.
In this embodiment, an expiration time coefficient is introduced, and the expiration time of the target cache is adjusted by the expiration time coefficient, so that the accuracy of the expiration time of the target cache can be ensured.
Fig. 5 is a flowchart of a method for determining a cache expiration time in another embodiment, and on the basis of the foregoing embodiment, an alternative example of the method for determining a cache expiration time is provided in this embodiment. With reference to fig. 5, the specific implementation procedure is as follows:
s501, acquiring historical data flow values of the target service at each sampling time in a historical period.
S502, determining at least two access periods according to the historical data flow value of each sampling time.
Optionally, according to the historical data flow value of each sampling time, drawing a distribution curve between the data flow value and time; dividing the distribution curve to obtain at least two dividing areas; wherein, the total historical data flow value in each dividing area is the same; and determining at least two access time periods according to sampling moments corresponding to the dividing time points of each dividing area.
S503, determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service.
S504, acquiring a target accumulated data flow value of the target service between the starting time of the target access period and the target access time.
S505, obtaining the data buffering quantity of the buffering area under the target access time.
S506, determining a failure time coefficient according to the data buffering quantity.
S507, determining target cache expiration time corresponding to target transaction data according to the target accumulated data flow value and the expiration time coefficient through an expiration time determination model.
Optionally, acquiring a sample accumulated data flow value corresponding to sample transaction data under the sample service; and training the initial neural network model by adopting a sample accumulated data flow value and sample buffer dead time corresponding to sample transaction data to obtain a dead time determination model.
The specific process of S501-S507 may be referred to the description of the above method embodiment, and its implementation principle and technical effect are similar, and are not repeated here.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a device for determining the cache expiration time for implementing the above-mentioned method for determining the cache expiration time. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiment of the determining apparatus for the cache expiration time provided below may refer to the limitation of the determining method for the cache expiration time hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 6, there is provided a cache expiration time determining apparatus 1, including: a period determination module 10, a flow value determination module 20, and a time to failure determination module 30, wherein:
the period determining module 10 is configured to determine, from at least two access periods, a target access period corresponding to the target access time according to the target access time to the target transaction data under the target service;
a flow value determining module 20, configured to obtain a target cumulative data flow value of the target service in the target access period;
the dead time determining module 30 is configured to determine, according to the target accumulated data flow value, a target cache dead time corresponding to the target transaction data according to the dead time determining model.
In one embodiment, as shown in fig. 7, the apparatus 1 for determining a cache expiration time further includes a period dividing module 40, where the period dividing module 40 includes:
a flow value obtaining unit 41, configured to obtain a historical data flow value of each sampling time of the target service in a historical period;
a period dividing unit 42 for determining at least two access periods according to the historical data flow value of each sampling time.
In one embodiment, the period determining unit 42 is specifically configured to:
drawing a distribution curve between the data flow value and time according to the historical data flow value of each sampling moment; dividing the distribution curve to obtain at least two dividing areas; wherein, the total historical data flow value in each dividing area is the same; and determining at least two access time periods according to sampling moments corresponding to the dividing time points of each dividing area.
In one embodiment, the flow value determination module 20 is specifically configured to:
and acquiring a target accumulated data flow value of the target service between the starting time of the target access period and the target access time.
In one embodiment, the apparatus 1 for determining a cache expiration time further includes a model training module, where the model training module is specifically configured to:
acquiring a sample accumulated data flow value corresponding to sample transaction data under sample service; and training the initial neural network model by adopting a sample accumulated data flow value and sample buffer dead time corresponding to sample transaction data to obtain a dead time determination model.
In one embodiment, the dead time determination module 30 is specifically configured to:
acquiring the data buffering quantity of a buffering area under the target access time; determining a failure time coefficient according to the data buffering quantity; and determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value and the expiration time coefficient by an expiration time determination model.
The above-mentioned determination means of the buffer expiration time may be implemented in whole or in part by software, hardware or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 8. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing historical data flow values. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a method of determining a cache expiration time.
It will be appreciated by those skilled in the art that the structure shown in FIG. 8 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service;
acquiring a target accumulated data flow value of a target service in a target access period;
and determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model.
In one embodiment, the following steps are embodied when the processor executes logic in a computer program:
acquiring a historical data flow value of a target service at each sampling moment in a historical period; and determining at least two access periods according to the historical data flow value of each sampling moment.
In one embodiment, when the processor executes logic in the computer program to determine at least two access periods according to the historical data flow value at each sampling time, the following steps are specifically implemented:
drawing a distribution curve between the data flow value and time according to the historical data flow value of each sampling moment; dividing the distribution curve to obtain at least two dividing areas; wherein, the total historical data flow value in each dividing area is the same; and determining at least two access time periods according to sampling moments corresponding to the dividing time points of each dividing area.
In one embodiment, the logic for obtaining a target cumulative data flow value for a target service within a target access period in a computer program is executed by a processor to implement the steps of:
and acquiring a target accumulated data flow value of the target service between the starting time of the target access period and the target access time.
In one embodiment, the processor, when executing logic in a computer program for training a dead time true model, performs the steps of:
acquiring a sample accumulated data flow value corresponding to sample transaction data under sample service; and training the initial neural network model by adopting a sample accumulated data flow value and sample buffer dead time corresponding to sample transaction data to obtain a dead time determination model.
In one embodiment, when the processor executes logic for determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value by using the expiration time determination model in the computer program, the following steps are specifically implemented:
acquiring the data buffering quantity of a buffering area under the target access time; determining a failure time coefficient according to the data buffering quantity; and determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value and the expiration time coefficient by an expiration time determination model.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service;
acquiring a target accumulated data flow value of a target service in a target access period;
and determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model.
In one embodiment, the code logic in the computer program, when executed by the processor, performs the steps of:
acquiring a historical data flow value of a target service at each sampling moment in a historical period; and determining at least two access periods according to the historical data flow value of each sampling moment.
In one embodiment, this code logic in the computer program for determining at least two access periods based on historical data flow values for each sampling instant, when executed by the processor, performs the steps of:
drawing a distribution curve between the data flow value and time according to the historical data flow value of each sampling moment; dividing the distribution curve to obtain at least two dividing areas; wherein, the total historical data flow value in each dividing area is the same; and determining at least two access time periods according to sampling moments corresponding to the dividing time points of each dividing area.
In one embodiment, this code logic in the computer program for obtaining a target cumulative data flow value for a target service over a target access period, when executed by the processor, specifically performs the steps of:
and acquiring a target accumulated data flow value of the target service between the starting time of the target access period and the target access time.
In one embodiment, this code logic in the computer program that trains the dead time true model, when executed by the processor, embodies the steps of:
acquiring a sample accumulated data flow value corresponding to sample transaction data under sample service; and training the initial neural network model by adopting a sample accumulated data flow value and sample buffer dead time corresponding to sample transaction data to obtain a dead time determination model.
In one embodiment, the code logic in the computer program for determining the target cache expiration time corresponding to the target transaction data according to the target cumulative data flow value by using an expiration time determination model is executed by the processor, and specifically implements the following steps:
acquiring the data buffering quantity of a buffering area under the target access time; determining a failure time coefficient according to the data buffering quantity; and determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value and the expiration time coefficient by an expiration time determination model.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
determining a target access period corresponding to the target access time from at least two access periods according to the target access time of the target transaction data under the target service;
acquiring a target accumulated data flow value of a target service in a target access period;
and determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model.
In one embodiment, the computer program is executed by a processor to implement the steps of:
acquiring a historical data flow value of a target service at each sampling moment in a historical period; and determining at least two access periods according to the historical data flow value of each sampling moment.
In one embodiment, the computer program is executed by the processor to determine at least two access periods based on historical data flow values for each sampling instant, and specifically implement the steps of:
drawing a distribution curve between the data flow value and time according to the historical data flow value of each sampling moment; dividing the distribution curve to obtain at least two dividing areas; wherein, the total historical data flow value in each dividing area is the same; and determining at least two access time periods according to sampling moments corresponding to the dividing time points of each dividing area.
In one embodiment, the computer program, when executed by the processor, performs the operation of obtaining a target cumulative data flow value for a target service within a target access period, specifically implements the steps of:
and acquiring a target accumulated data flow value of the target service between the starting time of the target access period and the target access time.
In one embodiment, the computer program is executed by the processor to perform the operations of training the dead time determination model, specifically implementing the steps of:
acquiring a sample accumulated data flow value corresponding to sample transaction data under sample service; and training the initial neural network model by adopting a sample accumulated data flow value and sample buffer dead time corresponding to sample transaction data to obtain a dead time determination model.
In one embodiment, when the computer program is executed by the processor to determine the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through the expiration time determination model, the following steps are specifically implemented:
acquiring the data buffering quantity of a buffering area under the target access time; determining a failure time coefficient according to the data buffering quantity; and determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value and the expiration time coefficient by an expiration time determination model.
The data (including but not limited to the historical data flow value and the like) related to the present application is information and data authorized by the user or fully authorized by each party.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for determining the cache expiration time is characterized by comprising the following steps:
determining a target access period corresponding to target access time from at least two access periods according to target access time of target transaction data under target service;
acquiring a target accumulated data flow value of the target service in the target access period;
and determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through an expiration time determination model.
2. The method according to claim 1, wherein the method further comprises:
acquiring a historical data flow value of the target service at each sampling moment in a historical period;
and determining at least two access periods according to the historical data flow value of each sampling moment.
3. The method of claim 2, wherein determining at least two access periods based on the historical data flow values for each sampling instant comprises:
drawing a distribution curve between the data flow value and time according to the historical data flow value of each sampling moment;
dividing the distribution curve to obtain at least two divided areas; wherein, the total historical data flow value in each dividing area is the same;
and determining at least two access time periods according to sampling moments corresponding to the dividing time points of each dividing area.
4. The method of claim 1, wherein the obtaining the target cumulative data flow value for the target traffic for the target access period comprises:
and acquiring a target accumulated data flow value of the target service between the starting time of the target access period and the target access time.
5. The method of claim 1, wherein the time to failure determination model is trained by:
acquiring a sample accumulated data flow value corresponding to sample transaction data under sample service;
and training an initial neural network model by adopting the sample accumulated data flow value and the sample buffer expiration time corresponding to the sample transaction data to obtain the expiration time determination model.
6. The method of claim 1, wherein the determining, by a dead time determination model, a target cache dead time corresponding to the target transaction data according to the target accumulated data flow value comprises:
acquiring the data buffering quantity of a buffering area under the target access time;
determining a failure time coefficient according to the data buffering quantity;
and determining target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value and the expiration time coefficient through an expiration time determination model.
7. A device for determining a cache expiration time, the device comprising:
the time period determining module is used for determining a target access time period corresponding to the target access time from at least two access time periods according to the target access time of the target transaction data under the target service;
the flow value determining module is used for obtaining a target accumulated data flow value of the target service in the target access period;
and the expiration time determining module is used for determining the target cache expiration time corresponding to the target transaction data according to the target accumulated data flow value through an expiration time determining model.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310928815.5A 2023-07-26 2023-07-26 Method, device, computer equipment and storage medium for determining cache failure time Pending CN117216103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310928815.5A CN117216103A (en) 2023-07-26 2023-07-26 Method, device, computer equipment and storage medium for determining cache failure time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310928815.5A CN117216103A (en) 2023-07-26 2023-07-26 Method, device, computer equipment and storage medium for determining cache failure time

Publications (1)

Publication Number Publication Date
CN117216103A true CN117216103A (en) 2023-12-12

Family

ID=89046920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310928815.5A Pending CN117216103A (en) 2023-07-26 2023-07-26 Method, device, computer equipment and storage medium for determining cache failure time

Country Status (1)

Country Link
CN (1) CN117216103A (en)

Similar Documents

Publication Publication Date Title
US8904149B2 (en) Parallelization of online learning algorithms
CN108763398B (en) Database configuration parameter processing method and device, computer equipment and storage medium
EP3825861A2 (en) Method and apparatus of user clustering, computer device
EP3401807B1 (en) Synopsis based advanced partition elimination
US11734258B2 (en) Constraint data statistics
US20130173509A1 (en) Method and arrangement for processing data
CN106453444A (en) Cache data sharing method and equipment
US11729268B2 (en) Computer-implemented method, system, and storage medium for prefetching in a distributed graph architecture
US20170017574A1 (en) Efficient cache warm up based on user requests
CN113377789A (en) Processing method and device for database change data, computer equipment and medium
CN116800671A (en) Data transmission method, apparatus, computer device, storage medium, and program product
CN115168499B (en) Database table fragmentation method and device, computer equipment and storage medium
CN117216103A (en) Method, device, computer equipment and storage medium for determining cache failure time
CN112711739A (en) Data processing method and device, server and storage medium
CN116932779B (en) Knowledge graph data processing method and device
CN115168409B (en) Data query method and device for database sub-tables and computer equipment
CN117455501A (en) Request processing method, apparatus, computer device and storage medium
CN117216009A (en) File processing method, apparatus, device, storage medium and computer program product
CN114201271A (en) Node determination method and device, computer equipment and storage medium
CN114461659A (en) Searching and killing method and device, computer equipment and storage medium
CN117891824A (en) Data table adjustment method, device, equipment and storage medium
CN117216102A (en) Cache data management method, device, equipment, storage medium and program product
CN117076721A (en) Data query method, device, equipment, medium and product
CN114238954A (en) Intrusion detection method, device, equipment and medium for secondary system of intelligent substation
CN116881543A (en) Financial resource object recommendation method, device, equipment, storage medium and product

Legal Events

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