CN110688401A - Dynamic cache processing method and device, storage medium and electronic equipment - Google Patents

Dynamic cache processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110688401A
CN110688401A CN201910853969.6A CN201910853969A CN110688401A CN 110688401 A CN110688401 A CN 110688401A CN 201910853969 A CN201910853969 A CN 201910853969A CN 110688401 A CN110688401 A CN 110688401A
Authority
CN
China
Prior art keywords
data
score
time
determining
historical
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.)
Granted
Application number
CN201910853969.6A
Other languages
Chinese (zh)
Other versions
CN110688401B (en
Inventor
林勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201910853969.6A priority Critical patent/CN110688401B/en
Publication of CN110688401A publication Critical patent/CN110688401A/en
Application granted granted Critical
Publication of CN110688401B publication Critical patent/CN110688401B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Educational Administration (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Game Theory and Decision Science (AREA)
  • Data Mining & Analysis (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a dynamic cache processing method, a dynamic cache processing device, a storage medium and electronic equipment, and belongs to the technical field of information processing. The method comprises the following steps: acquiring writing time, writer information and historical access information when data in a cache is written into the cache; determining a first score of the data based on the write time of the data, determining a second score of the data based on the writer information of the data, determining a third score of the data based on the historical access information of the data; determining an importance score of the data based on the first score, the second score, and the third score of the data; and deleting the data with the importance scores lower than a preset threshold value in the cache according to the importance scores of the data. The method specifically deletes the data with low importance degree in the cache, improves the accuracy of cleaning the data in the cache, improves the data processing efficiency and improves the user experience.

Description

Dynamic cache processing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a dynamic cache processing method and apparatus, a storage medium, and an electronic device.
Background
The cache is a buffer storage area for promoting the processor to read data quickly, and the cache capacity is very limited. With the development of computer technology, especially with the upgrade of system software, the increase of various application software and its functions and the richness of contents, the amount of data to be processed by the processor is more and more huge, and the cache capacity cannot meet the huge data exchange requirement. In the related art, the cache is cleared by adopting a method of deleting the first written data, but the method can cause deletion of data frequently used by some users, so that important data is lost, useless data still occupies the cache, and the data processing efficiency and the user experience are reduced.
Therefore, it is desirable to provide a new dynamic cache processing method and apparatus.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure provides a dynamic cache processing method, apparatus, storage medium, and electronic device, so as to overcome, at least to some extent, the problem of reduced data processing efficiency due to the occupation of cache resources by useless data.
According to an aspect of the present disclosure, a dynamic cache processing method is provided, including:
acquiring writing time, writer information and historical access information when data in a cache is written into the cache; determining a first score of the data based on the write time of the data, determining a second score of the data based on the writer information of the data, determining a third score of the data based on the historical access information of the data; determining an importance score of the data based on the first score, the second score, and the third score of the data; and deleting the data with the importance scores lower than a preset threshold value in the cache according to the importance scores of the data.
In an exemplary embodiment of the present disclosure, the determining a first fraction of the data based on the write time of the data includes:
calculating a time difference between the write time of the data and a current time, wherein a formula is as follows: Δ t ═ td-tx(formula 1); determining a first score based on a time difference between the write time and a current time,the formula is as follows:
Figure BDA0002197759030000021
in equation 1: t is tdRepresenting the current time, txRepresents the writing time, Δ t represents the length between the data writing time and the current time; in equation 2: s1Represents a first score, a1And b1Is a normal number.
In an exemplary embodiment of the present disclosure, the determining a second score of the data based on the writer information of the data includes:
the writer information comprises a writer grade, and the writer grade is inquired; determining the second score based on the writer rank by:
Figure BDA0002197759030000022
in equation 3: s2Representing a second score, d1Indicates writer level, a2Is a positive constant and R is a constant greater than 1.
In an exemplary embodiment of the disclosure, the determining a third score of the data based on the historical access information of the data includes:
the historical access information comprises historical access times, and the historical access times of the data are inquired; determining the third score based on the historical access times, wherein the formula is as follows: s3=a3C (formula 4); in equation 4: s3Represents a third score, c represents a number of historical accesses, a3Is a normal number.
In an exemplary embodiment of the present disclosure, the historical access information includes a historical number of accesses, and determining a third score based on the historical number of accesses includes:
the time difference between the writing time and the current time of the data is divided into a plurality of time intervals, and a first weight value corresponding to each time interval is assigned; counting the historical access times falling into each time interval; based on the first weight value of each time interval and the history of the time intervalsAsking times, calculating a third score, and the formula is as follows:
Figure BDA0002197759030000023
Figure BDA0002197759030000024
in equation 5: s3Denotes a third fraction, n denotes the number of time intervals, k denotes the kth, γkA first weight value representing the kth time interval, ckRepresenting the number of historical visits that fall into the kth time interval and omega representing the adjustment factor.
In an exemplary embodiment of the disclosure, the determining a third score of the data based on the historical access information of the data includes:
the historical access information also comprises historical access time and the duration of each historical access; dividing the time difference between the data writing time and the current time into a plurality of time intervals, and assigning a second weight value corresponding to each time interval; calculating the sum of the duration of each historical visit falling into the time interval based on the historical visit time and the duration of the historical visit; determining a third score based on the sum of a second weight value corresponding to the time interval and the duration of each historical access falling into the time interval, wherein the formula is as follows: t is tk=∑ti(equation 6),
Figure BDA0002197759030000031
In equation 6: t is tiIndicates the length of time, t, of the ith historical visit falling within the kth time intervalkA sum representing the duration of each historical visit falling within the kth time interval; in equation 7: s3Denotes the third fraction, pkRepresents a second weight value corresponding to the k-th time interval, a4Is the adjustment factor.
In an exemplary embodiment of the disclosure, the determining the importance score of the data based on the first score, the second score, and the third score of the data includes:
the first score, the second score and the third score are calledDividing by three; the importance score of the data is a weighted sum of a first score, a second score, and a third score of the data, and the formula is: s ═ s1*m1+s2*m2+s3*m3(equation 8); in equation 8: s represents the importance score, m1Representing a first weight, m, assigned to a first score2Representing a second weight, m, assigned to a second fraction3Representing a third weight, s, assigned to a third fraction1Denotes the first fraction, s2Representing a second score, s3Representing a third score.
According to an aspect of the present disclosure, there is provided a dynamic cache processing apparatus, including:
the acquisition unit is used for acquiring the writing time, the writer information and the historical access information when the data in the cache is written into the cache; a first calculation unit that determines a first score of the data based on the write time of the data, determines a second score of the data based on the writer information of the data, and determines a third score of the data based on the historical access information of the data; the second calculation unit is used for determining the importance scores of the data based on the first scores, the second scores and the third scores of the data; and the deleting unit is used for deleting the data with the importance scores lower than a preset threshold value in the cache according to the importance scores of the data.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the dynamic cache processing method of any one of the above.
According to an aspect of the present disclosure, there is provided an electronic device including:
a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the above dynamic cache processing methods via execution of the executable instructions.
The technical scheme provided by the disclosure can bring the following beneficial effects:
the method and the device correspondingly determine the first score, the second score and the third score by acquiring the writing time, the writer information and the historical access information when the data in the cache is written into the cache. The first score, the second score and the third score accurately measure the importance degree of data in a writing time dimension, a writer dimension and a historical access information dimension. The importance scores of the data in the cache are calculated through the first score, the second score and the third score, so that the importance degrees of the data in the cache can be comprehensively and quantitatively investigated by integrating three dimensions of writers, writing time and historical access information, the data with high importance degrees to users can be stored, and the data with low importance degrees to the users can be cleaned. The purposes of saving cache resources and improving the efficiency of calling cache data by the processor are achieved. The accuracy of clearing the data with low importance degree in the cache is improved, meanwhile, the data useful for the user are accurately reserved, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 schematically illustrates a flow diagram of a dynamic cache processing method according to an embodiment;
FIG. 2 schematically illustrates a flowchart of step S120 of FIG. 1 in one embodiment;
FIG. 3 schematically shows a flowchart of step S120 in FIG. 1 in another embodiment;
FIG. 4 schematically illustrates a flowchart of step S120 of FIG. 1 in one embodiment;
FIG. 5 schematically shows a flowchart of step S120 in FIG. 1 in another embodiment;
FIG. 6 schematically illustrates a flowchart of step S120 of FIG. 1 in one embodiment;
FIG. 7 schematically shows a flowchart of step S120 in FIG. 1 in another embodiment;
FIG. 8 schematically illustrates a flowchart of step S120 of FIG. 1 in yet another embodiment;
FIG. 9 schematically illustrates a flowchart of step S130 of FIG. 1 in one embodiment;
fig. 10 schematically shows a dynamic cache processing apparatus diagram for implementing the above dynamic cache processing method;
FIG. 11 schematically illustrates an example block diagram of an electronic device for implementing the dynamic cache processing method described above;
fig. 12 schematically illustrates a computer-readable storage medium for implementing the above-described dynamic cache processing method.
Detailed Description
Exemplary embodiments will now be described more fully with reference to the accompanying drawings. The exemplary embodiments, however, may be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
According to one aspect of the present disclosure, a dynamic cache processing method is provided. In an exemplary embodiment of the disclosure, the dynamic cache processing method may be executed in a terminal such as a computer, a mobile phone, a tablet computer, or the like, or may be executed in a server, a server cluster, a cloud server, or the like. Of course, those skilled in the art may also operate the method of the present invention on other platforms as needed, and this is not particularly limited in this exemplary embodiment.
Referring to fig. 1, the dynamic cache processing method may include the following steps:
s110, acquiring writing time, writer information and historical access information when data in a cache is written into the cache;
step S120, determining a first score of the data based on the writing time of the data, determining a second score of the data based on the writer information of the data, and determining a third score of the data based on the historical access information of the data;
s130, determining an importance score of the data based on the first score, the second score and the third score of the data;
and S140, deleting the data with the importance scores lower than a preset threshold value in the cache according to the importance scores of the data.
In the dynamic cache processing method, the first score, the second score and the third score are correspondingly determined by acquiring the writing time, the writer information and the historical access information when the data in the cache is written into the cache. The first score, the second score and the third score accurately measure the importance degree of data in a writing time dimension, a writer dimension and a historical access information dimension. The importance scores of the data in the cache are calculated through the first score, the second score and the third score, so that the importance degrees of the data in the cache can be comprehensively and quantitatively investigated by integrating three dimensions of writers, writing time and historical access information, the data with high importance degrees to users can be stored, and the data with low importance degrees to the users can be cleaned. The purposes of saving cache resources and improving the efficiency of calling cache data by the processor are achieved. The accuracy of clearing the data with low importance degree in the cache is improved, meanwhile, the data useful for the user are accurately reserved, and the user experience is improved.
Hereinafter, each step in the above dynamic cache processing method in the present exemplary embodiment will be explained and explained in detail with reference to the drawings.
In step S110, the write time, writer information, and history access information when the data in the cache is written in the cache are acquired.
In this step, the cache refers to a storage capable of high-speed data exchange, and is between the processor and the memory. When the processor needs to process certain data, the data can be preferentially and quickly acquired from the cache, so that the processing efficiency of the processor on the data is improved. Specifically, the cache may be a cache applied in a user terminal (for example, a mobile phone, a computer, a tablet computer, a game machine, a printer, or the like), or may also be a cache applied in a server, a server group, or a cloud server, which is not limited in this example; the write time refers to the time for calling data into the cache, and specifically may include time information such as hour/minute/second/millisecond. Writer information refers to information of the user who writes data into the cache and may include information of the writer's job, position, level, etc. The historical access information refers to the historical condition of the data stored in the cache accessed by writers or other users, and may include the historical access times of the data, the historical access time of each time and the like.
The importance degree of the data is obtained through comprehensive calculation according to the importance degrees of three dimensions, namely the writing time when the data is written into the cache, the information of a writer who writes into the cache and the historical access information of the data subsequently accessed by the writer or other users, and the importance degree of the data is used as the basis for subsequently processing the data. It should be noted that the importance of the data refers to the possibility of the data stored in the cache being used later. The greater the likelihood that the data in the cache will be used later, the greater the importance of the data is considered. Conversely, the less likely the data in the cache is to be used subsequently, the less important the data is considered to be.
In step S120, a first score of the data is determined based on the writing time of the data, a second score of the data is determined based on the writer information of the data, and a third score of the data is determined based on the historical access information of the data. This step comprises three small steps: step S121 (not shown), step S122 (not shown), and step S123 (not shown), which will be described in detail below:
in step S121, a first fraction of data is determined based on the write time of the data. Experience investigating the data used by a large number of users shows that: the longer the data writing time is from the current, the smaller the probability of being used subsequently is possibly, and the lower the importance degree of the data is; conversely, the closer the data writing time is to the current, the higher the probability of being used later may be, and the higher the importance of the data. In the technical scheme of the disclosure, the importance degree of the data in the dimension of the writing time is represented by a first score.
In an exemplary embodiment, determining the first score of the data based on the writing time of the data in step S121 may include steps S210 to S220. Please refer to fig. 2, in which:
in step S210, a time difference between the writing time of the data and a current time is calculated, and a formula is:
Δt=td-txequation 1
In equation 1: t is tdRepresenting the current time, txWhich indicates the time of writing the data,Δ t represents the length between the data writing time and the current time;
in step S220, a first score is determined according to a time difference between the writing time and the current time, and the formula is:
Figure BDA0002197759030000081
in equation 2: s1Represents a first score, a1And b1Is a normal number.
In this exemplary embodiment, the writing time txWith the current time tdThe difference Δ t between them is an independent variable with a first fraction s1As a dependent variable, an inverse proportional functional relationship is constructed. The importance degree of the data in the writing time dimension is quantized into a first fraction by a mathematical model, and the accuracy of the description of the importance degree of the data is improved because the inverse proportion function is a continuous function in other definition domains with denominators not equal to zero.
Next, step S210 and step S220 will be explained and explained in detail.
First, the writing time t of data is calculated by equation 1xWith the current time tdThen the first fraction s, using the length between the write time and the current time deltat as an argument1As a dependent variable, an inverse proportion function (formula 2) is constructed, and the importance degree of data in the dimension of writing time is quantized to s1. Writing time t of dataxFrom the current time tdThe longer (i.e. t ═ t)d-txThe larger the value of) the less important the data is to the user, the greater the probability that the data should be deleted. When the write time of the data is long from the current time, the first score is nearly equal to 0, and the probability of retaining the data is nearly 0 only from the dimension of the write time. Conversely, when the writing time is closer to the current time, the higher the importance of the data to the user, the higher the probability that the data should be retained. If b is1Set to 0, the first score approaches infinity as the write time of the data approaches infinity to the current timeIndicating that the user may be using the data, the data must not be automatically deleted at the present time. b1Can be adjusted according to the application environment if b1If the number is positive, when Δ t approaches 0, the first score has a maximum value and does not approach infinity, thereby ensuring that the data is not necessarily retained, but the importance score of the data can be calculated in the subsequent step S130 by combining the second score and the third score, and the data is determined to be retained or deleted in step S140.
Example 1: the write time of data a is 9:21:05, and the current time is 12:21: 05. The difference Δ t between the writing time of the data a and the current time is 3 hours. Will be the parameter a1Configured to 10, parameter b1Configured as 1, calculating a first score s by equation 21Is 2.5.
In another exemplary embodiment, determining the first score of the data based on the writing time of the data in step S120 may include steps S310 to S330. Please refer to fig. 3, in which:
in step S310, calculating a time difference between the writing time of the data and a current time;
in step S320, storing the time difference between the writing time of the data and the current time in a first score relation table in advance corresponding to the first score;
in step S330, the first score relation table is queried to determine the first score of the data corresponding to the time difference between the writing time and the current time.
In the exemplary embodiment, the first score is determined by looking up a table, so that computing resources for computing the first score through a functional relation according to the writing time are saved, and the efficiency of data processing is improved.
Next, step S310, step S320, and step S330 will be explained and explained in detail.
In this embodiment, only the time difference between the writing time of the data and the current time needs to be calculated, and the time difference and the first fraction of the aforementioned scheme are not involvedAnd (4) calculating an inverse proportion function. But by previously corresponding the time difference between the write time of the data and the current time to the first fraction s1Stored in the first score relation table, and the first score S is required to be called in the subsequent step S1301Then, the first score s of the data is determined and called by inquiring the first score relation table1
Example 2: the current time is 2019, 5, 15, 13:30: 21. The write time for data B to be written to the buffer is 2019, 5, 15, 13:21: 21. The time difference between the data B writing time and the current time is 9 minutes, and the first score of the data B is 40 by querying the first score relation table (see below). The write time for data C to be written to the cache is 2019, 2, 15, 13:30: 21. The time difference between the data C writing time and the current time is 3 months, and the first score of the data C is 0.5 by querying the first score relation table (see below).
The first score relation table is as follows:
Figure BDA0002197759030000101
in step S122, a second score for the data is determined based on the writer information for the data. Experience investigating the data used by a large number of users shows that: some users write data with a high degree of importance because the data are used a large number of times in the following process. On the contrary, the data written by some users are used less frequently, and the importance degree of the data written by the users is low. In the technical scheme of the disclosure, the importance degree of the data on the dimension of the writer is represented by a second score.
In an exemplary embodiment, determining the second score of the data based on the writer information of the data in step S122 may include steps S410 to S420. Please refer to fig. 4, in which:
in step S410, the writer information includes a writer level, and the writer level is queried;
in step S420, the second score is determined based on the writer level, with the formula:
in equation 3: s2Representing a second score, d1Indicates writer level, a2Is a positive constant and R is a constant greater than 1.
In this exemplary implementation, at writer level d1As independent variable, with a second score s2And constructing an exponential functional relation as a dependent variable. The importance degree of the data on the writer level dimension is quantized into a second score by a mathematical model, and the accuracy of the description of the importance degree of the data is improved because the exponential function is a continuous function.
Next, step S410 and step S420 will be explained and explained in detail.
Binding data and writer information written in the data in advance and storing the data and the writer information in a one-to-one correspondence mode, wherein the writer information comprises a writer grade d1. Firstly, inquiring the writer grade d of the data by inquiring the data in the cache1. And then at the writer level d of the data1As an argument, the second fraction s of the data2As a dependent variable, an exponential function (equation 3) is constructed. The base number R of the exponential function is configured to be a value greater than 1. Writer level d1The higher the second score s2The exponential increase, and in the subsequent step S130, the influence of the writer having a higher rank on the importance score S of the data to be written becomes larger, and the influence of the writer can be reflected more. Of course, the parameters R and a2The data writing method can be adjusted according to the requirements, so that the influence of users with various identities in the user group on the data written into the cache can be met.
Example 3: in a company, relevant data issued by a chief manager can be accessed by most managers and employees in all departments, the number of times of access is large, and the importance degree is high. The related data issued by the manager can be accessed by the personnel in the department, the access frequency is high, and the importance degree is high. The related data recorded by the staff can be accessed by the staff or the manager and is rarely accessedOther staff visit, visit the number of times less, its importance is lower. Therefore, the chief deputy can be identified as three levels, the manager can be identified as two levels, and the employee can be identified as one level. Assume that the value of the parameter R is configured to be 3, a2The configuration is 0.5. Calculated by equation 3: second fraction s of relevant data written by the chief213.5, second score s of the manager's write related data24.5, second score s of related data written by employee2Is 1.5.
In another exemplary embodiment, determining the second score of the data based on the writer information of the data in step S122 may include steps S510 to S520. Please refer to fig. 5, in which:
in step S510, the writer information of the data and the second score are stored in a second score relation table in a corresponding manner in advance;
in step S520, a second score relation table is queried to determine the second score corresponding to the writer information.
In the exemplary embodiment, the second score is determined by looking up the table, so that the computing resource for computing the second score through the functional relationship according to the writer level is saved, and the efficiency of data processing is improved.
Next, step S510 and step S520 will be explained and explained in detail.
The writer information of the data is added with an identifier of a writer level in advance, and the writer information of the data is stored in the second score relation table in correspondence with the second score. In this embodiment, the writer level of the data is stored in the second score relation table in advance in association with the second score, and the second score S needs to be used in the subsequent step S1302Then, the second score relation table is inquired through the step, and the second score s of the data is determined2And a second fraction s of the data2Call to step S130.
Example 4: the second score relationship table is as follows:
writer level Second fraction s2
First stage 10
Second stage 8
Three-stage 6
Four stages 4
Five stages 2
In other embodiments, other information (such as identity information) in the writer information of the data may be stored in the second score relation table in correspondence with the second score.
Example 5: the second score relationship table is as follows:
writer level Second fraction s2
President 10
General manager of head office 8
General manager of branch company 6
Division manager 4
Staff member 2
In step S123, a third score of the data is determined based on the historical access information of the data. Experience investigating the data used by a large number of users shows that: from the past use of some data, the probability that data that is used frequently in the past is used later is high. Conversely, data that has been rarely used over a period of time has a low probability of being subsequently used. In the technical scheme of the disclosure, the importance degree of the data in the dimension of the historical access information is represented by a third score.
In an exemplary embodiment, determining the third fraction of the data based on the historical access information of the data in step S123 may include steps S610-S620. Please refer to fig. 6, in which:
in step S610, the historical access information includes historical access times, and the historical access times of the data are queried;
determining the third score based on the historical access times in step S620 by:
s3=a3c formula 4
In equation 4: s3Represents a third score, c represents a number of historical accesses, a3Is a normal number.
In this exemplary embodiment, the historical access times c are used as arguments, and the third score is useds3As a dependent variable, a direct proportional functional relationship is constructed. The importance degree of the data on the dimension of the historical access times is quantized into a third score by using a mathematical model, and the accuracy of the description of the importance degree of the data is improved because the direct proportional function is a continuous function.
Next, step S410 and step S420 will be explained and explained in detail.
And acquiring the historical access times c of the data by inquiring the historical access information of the data. The number c of historical accesses to the data is used as an argument, and the third score s3As a dependent variable, a direct proportional functional relationship (equation 4) is constructed. The more the number of historical accesses to the data is, the larger the third score of the data is, the higher the importance of the data is, and the higher the probability that the data should be saved is. Conversely, the smaller the number of historical accesses to the data, the smaller the third score of the data, the lower the importance of the data, and the greater the probability that the data will be deleted.
In an exemplary embodiment, determining the third fraction of the data based on the historical access information of the data in step S123 may include steps S710-S730. Please refer to fig. 7, in which:
in step S710, a time difference between the writing time of the data and a current time is divided into a plurality of time intervals, and a first weight value corresponding to each time interval is assigned;
in step S720, counting the number of historical visits falling into each of the time intervals;
in step S730, a third score is calculated based on the first weight value of each time interval and the number of historical visits falling into each time interval, where the formula is:
Figure BDA0002197759030000131
in equation 5: s3Denotes a third fraction, n denotes the number of time intervals, k denotes the kth, γkA first weight value representing the Kth time interval, ckRepresenting the number of historical visits that fall into the kth time interval and omega representing the adjustment factor.
In this exemplary embodiment, the historical access distribution of the data is obtained by dividing the time difference between the write time of the data and the current time into a plurality of time intervals and counting the number of historical accesses falling into each time interval. Based on historical access distribution of the data in different time intervals, the historical access distribution of the data is converted into a mathematical model for quantitative investigation, and accuracy of description of the importance degree of the data is improved.
Next, step S710, step S720, and step S730 will be explained and explained in detail.
First, the time difference between the data writing time and the current time is divided into a plurality of (n) time intervals, and a second weight value corresponding to each time interval is assigned. For example, the weight value of the k-th time interval is assigned as γk. Wherein: a time interval adjacent to the current time is given a larger weight value, and a time interval far away from the current time is given a smaller weight value. And counting the historical access times falling into each time interval. For example, the number of historical visits falling within the kth time interval is ck. Then based on the weight value gamma of each time intervalkAnd the historical access times c falling into the corresponding time intervalkThe third score is calculated by equation 5. This embodiment is an optimization of the aforementioned "determine the third score based on the historical number of accesses" embodiment. The description is as follows:
example 6: the write time of data a is 9:21:05, and the current time is 12:21: 05. The length (3 hours) of the data writing time and the current time is divided into 3 time intervals, and each time interval is assigned with a corresponding weight value. The method comprises the following steps: the weight value for the 1 st time interval (9:21:05- -10:21:05) is 0.5, the weight value for the 2 nd time interval (10:21:05- -11:21:05) is 1, and the weight value for the 3 rd time interval (11:21:05- -12:21:05) is 1.5. The adjustment factor ω is configured to be 0.8. The number of historical accesses to the data falling within the 1 st time interval is 2, the number of historical accesses to the data falling within the 2 nd time interval is 3, and the number of historical accesses to the data falling within the 3 rd time interval is 3The historical number of accesses to this data for the interval is 5. A third score s is calculated according to equation 53It was 11.2.
In order to facilitate understanding of the influence of the distribution of the historical access times on the data in different time intervals on the importance degree of the data, the distribution of the historical access times in different time intervals is changed based on the partial conditions of the above example. The following were used:
example 7: the write time of data a is 9:21:05, and the current time is 12:21: 05. The length (3 hours) of the data writing time and the current time is divided into 3 time intervals, and each time interval is assigned with a corresponding weight value. The method comprises the following steps: the weight value for the 1 st time interval (9:21:05- -10:21:05) is 0.5, the weight value for the 2 nd time interval (10:21:05- -11:21:05) is 1, and the weight value for the 3 rd time interval (11:21:05- -12:21:05) is 1.5. The adjustment factor ω is configured to be 0.8. The number of historical accesses to the data falling within the 1 st time interval is 8, the number of historical accesses to the data falling within the 2 nd time interval is 0, and the number of historical accesses to the data falling within the 3 rd time interval is 2. According to the formula
Figure BDA0002197759030000141
Calculating to obtain a third fraction s3Is 5.6.
In another exemplary embodiment, determining the third fraction of the data based on the historical access information of the data in step S123 may include steps S810-S840. Please refer to fig. 8, in which:
in step S810, the historical access information further includes historical access time and duration of each historical access;
in step S820, dividing the time difference between the data writing time and the current time into a plurality of time intervals, and assigning a second weight value corresponding to each time interval;
in step S830, based on the historical access time and the duration of the historical access, calculating the sum of the duration of each historical access falling within the time interval;
in step S840, a third score is determined based on a sum of a second weight value corresponding to the time interval and a duration of each historical access falling within the time interval, where the formula is:
tk=∑tiequation 6
Figure BDA0002197759030000151
In equation 6: t is tiIndicates the length of time, t, of the ith historical visit falling within the kth time intervalkA sum representing the duration of each historical visit falling within the kth time interval;
in equation 7: s3Denotes the third fraction, pkRepresents a second weight value corresponding to the Kth time interval, a4Is the adjustment factor.
In this exemplary embodiment, the total length of the history access time falling into each time interval is counted by dividing the time difference between the data write time and the current time into a plurality of time intervals, assigning a second weight value corresponding to each time interval, and counting the total length of the history access time falling into each time interval. The distribution of the historical access time length of the data in different time intervals is obtained. Based on the distribution of the historical access duration of the data in different time intervals, the historical access duration distribution of the data is converted into a mathematical model for quantitative investigation, and the accuracy of the description of the importance degree of the data is improved.
Next, step S810, step S820, step S830, and step S840 are explained and explained in detail.
The historical access information for the data also includes the time of each historical access to the data and the duration of each historical access. And the time difference between the data writing time and the current time is divided into a plurality of time intervals, and a second weight value corresponding to each time interval is assigned. For example, the weight value of the kth time interval is assigned as ρk. Wherein: a time interval adjacent to the current time is given a larger weight value, and a time interval far away from the current time is given a smaller weight value. Calculating the time length t of each historical visit falling into the time intervaliAnd t iskWhen that isLong sum tkCalculated by formula 6. Based on the corresponding second weight value rho of each time intervalkAnd the sum t of the duration of each historical visit falling within each time intervalkThe third score is determined by equation 7.
Example 8: the length (3 hours) between the data writing time (9:21:05) and the current time (12:21:05) is divided into 3 time intervals, and each time interval is assigned with a corresponding weight value. The weight value for the 1 st time interval (9:21:05- -10:21:05) is 0.2, the weight value for the 2 nd time interval (10:21:05- -11:21:05) is 0.7, and the weight value for the 3 rd time interval (11:21:05- -12:21:05) is 1.2. Adjustment factor a4The configuration is 0.1. The sum of the durations of each historical access to the data falling within the 1 st time interval tk10 minutes, the sum of the time duration of each historical visit to the data falling into interval 2k5 minutes, the sum of the time duration of each historical visit to the data falling within the 3 rd time interval, tkWas 30 minutes. A third score s is calculated according to equation 73Is 4.15.
In step S130, determining the importance score of the data based on the first score, the second score, and the third score of the data may include steps S910-S920. Please refer to fig. 8, in which:
in step S910, the first score, the second score and the third score are called;
in step S920, the importance score of the data is a weighted sum of the first score, the second score and the third score of the data, and the formula is:
s=s1*m1+s2*m2+s3*m3equation 8
In equation 8: s represents the importance score, m1Representing a first weight, m, assigned to a first score2Representing a second weight, m, assigned to a second fraction3Representing a third weight, s, assigned to a third fraction1Denotes the first fraction, s2Representing a second score, s3Representing a third score.
In the embodiment, the importance degree of the data is comprehensively considered from three dimensions of writing time, writer information and historical access information of the data based on the first score, the second score and the third score, so that scientific and reasonable targeted theoretical support is provided for judging whether the data is continuously stored. The identification accuracy of important data in the cache is improved, so that the important data can be accurately reserved and unimportant data can be deleted, and the use experience of a user is improved.
Next, step S910 and step S920 will be explained and explained in detail.
Based on the step S120, the first score, the second score, and the third score of the data are retrieved, and the first score, the second score, and the third score of the data are weighted and calculated according to the formula 8, and the obtained result is the importance score representing the comprehensive importance degree of the data.
Example 9: with reference to examples 1, 3 and 6, the employee of a company writes data a into the cache of the personal computer at a time of 9:21:05, and accesses data a 2 times in a 1 st time interval (9:21: 05-10: 21:05) with a weight of 0.5, accesses data a 3 times in a 2 nd time interval (10:21: 05-11: 21:05) with a weight of 1, and accesses data a 5 times in a 3 rd time interval (11:21: 05-12: 21:05) with a weight of 1.5, respectively. The first score S of the data A is calculated by the step S1201Is 2.5, the second fraction s2Is 1.5, third fraction s3It was 11.2.
In step S130, the first weight of the first score is set to 0.3, the second weight of the second score is set to 0.2, and the third weight of the third score is set to 0.5, and the importance score S of the data a written by the employee is obtained as 6.65 according to formula 8.
In step S140, according to the importance scores of the data, the data in the cache with the importance scores lower than a preset threshold value is deleted.
In an exemplary embodiment, the importance score of the data is compared to a preset threshold and if the importance score of the data is greater than the preset threshold, the data is retained in the cache. Otherwise, if the importance score of the data is smaller than the preset threshold value, the data is deleted from the cache. In other embodiments, other calculation methods may be used to compare the relationship between the importance scores and the preset threshold value to determine whether to delete or retain the data in the cache.
Example 10: in connection with example 9, the preset threshold is set to 1. The importance score of the data a written into the cache by the employee is 6.65 which is greater than the preset threshold value 1. So data a continues to be held in the cache.
According to one aspect of the present disclosure, a dynamic cache processing apparatus is provided. The dynamic cache processing apparatus may include an obtaining unit 1010, a first calculating unit 1020, a second calculating unit 1030, and a deleting unit 1040. Referring to fig. 10, wherein:
an obtaining unit 1010 configured to obtain write time, writer information, and history access information when data in the cache is written in the cache;
a first calculation unit 1020 that determines a first score of the data based on the writing time of the data, determines a second score of the data based on the writer information of the data, and determines a third score of the data based on the historical access information of the data;
a second calculating unit 1030, configured to determine an importance score of the data based on the first score, the second score, and the third score of the data;
the deleting unit 1040 is configured to delete the data in the cache, where the importance score of the data is lower than a preset threshold, according to the importance score of the data.
The specific details of each module in the dynamic cache processing apparatus have been described in detail in the corresponding dynamic cache processing method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
According to an aspect of the present disclosure, an electronic device capable of implementing the above dynamic cache processing method is provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 1100 according to this embodiment of the invention is described below with reference to fig. 11. The electronic device 1100 shown in fig. 11 is only an example and should not bring any limitations to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 11, electronic device 1100 is embodied in the form of a general purpose computing device. The components of the electronic device 1100 may include, but are not limited to: the at least one processing unit 1110, the at least one memory unit 1120, and a bus 1130 that couples various system components including the memory unit 1120 and the processing unit 1110.
Wherein the storage unit stores program code that is executable by the processing unit 1110 to cause the processing unit 1110 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 1110 may perform step s110 as shown in fig. 1. obtain write time, writer information, and history access information when data in the cache is written to the cache; step S120, determining a first score of the data based on the writing time of the data, determining a second score of the data based on the writer information of the data, and determining a third score of the data based on the historical access information of the data; s130, determining an importance score of the data based on the first score, the second score and the third score of the data; and S140, deleting the data with the importance scores lower than a preset threshold value in the cache according to the importance scores of the data and the importance scores of the data.
The storage unit 1120 may include a readable medium in the form of a volatile memory unit, such as a random access memory unit (RAM)11201 and/or a cache memory unit 11202, and may further include a read only memory unit (ROM) 11203.
Storage unit 1120 may also include a program/utility 11204 having a set (at least one) of program modules 11205, such program modules 11205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1130 may be representative of one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1100 may also communicate with one or more external devices 1200 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 1100, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1100 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 1150. Also, the electronic device 1100 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 1160. As shown, the network adapter 1160 communicates with the other modules of the electronic device 1100 over the bus 1130. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
According to an aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described dynamic caching method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 12, a program product 1300 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A dynamic cache processing method is characterized by comprising the following steps:
acquiring writing time, writer information and historical access information when data in a cache is written into the cache;
determining a first score of the data based on the write time of the data, determining a second score of the data based on the writer information of the data, determining a third score of the data based on the historical access information of the data;
determining an importance score of the data based on the first score, the second score, and the third score of the data;
and deleting the data with the importance scores lower than a preset threshold value in the cache according to the importance scores of the data.
2. The dynamic cache processing method of claim 1, wherein said determining a first fraction of the data based on the write time of the data comprises:
calculating a time difference between the write time of the data and a current time, wherein a formula is as follows:
Δt=td-txequation 1
Determining a first score according to the time difference between the writing time and the current time, wherein the formula is as follows:
in equation 1: t is tdRepresenting the current time, txRepresents the writing time, Δ t represents the length between the data writing time and the current time;
in equation 2: s1Represents a first score, a1And b1Is a normal number.
3. The dynamic cache processing method of claim 1, wherein said determining a second score for the data based on the writer information for the data comprises:
the writer information comprises a writer grade, and the writer grade is inquired;
determining the second score based on the writer rank by:
Figure FDA0002197759020000012
in equation 3: s2Representing a second score, d1Indicates writer level, a2Is a positive constant and R is a constant greater than 1.
4. The dynamic cache processing method of claim 1, wherein said determining a third score for the data based on the historical access information for the data comprises:
the historical access information comprises historical access times, and the historical access times of the data are inquired;
determining the third score based on the historical access times, wherein the formula is as follows:
s3=a3c formula 4
In equation 4: s3Represents a third score, c represents a number of historical accesses, a3Is a normal number.
5. The dynamic cache processing method of claim 1, wherein said determining a third score for the data based on the historical access information for the data comprises:
the time difference between the writing time and the current time of the data is divided into a plurality of time intervals, and a first weight value corresponding to each time interval is assigned;
counting the historical access times falling into each time interval;
calculating a third score based on the first weight value of each time interval and the historical access times falling into each time interval, wherein the formula is as follows:
Figure FDA0002197759020000021
in equation 5: s3Represents the third divisionNumber, n denotes the number of time intervals, k denotes the kth, γkA first weight value representing the Kth time interval, ckRepresenting the number of historical visits that fall into the kth time interval and omega representing the adjustment factor.
6. The dynamic cache processing method of claim 1, wherein said determining a third score for the data based on the historical access information for the data comprises:
the historical access information also comprises historical access time and the duration of each historical access;
dividing the time difference between the data writing time and the current time into a plurality of time intervals, and assigning a second weight value corresponding to each time interval;
calculating the sum of the duration of each historical visit falling into the time interval based on the historical visit time and the duration of the historical visit;
determining a third score based on the sum of a second weight value corresponding to the time interval and the duration of each historical access falling into the time interval, wherein the formula is as follows:
tk=∑tiequation 6
Figure FDA0002197759020000022
In equation 6: t is tiIndicates the length of time, t, of the ith historical visit falling within the kth time intervalkA sum representing the duration of each historical visit falling within the kth time interval;
in equation 7: s3Denotes the third fraction, pkRepresents a second weight value corresponding to the Kth time interval, a4Is the adjustment factor.
7. The dynamic cache processing method of claim 1, wherein determining the importance score of the data based on the first score, the second score, and the third score of the data comprises:
calling the first score, the second score and the third score;
the importance score of the data is a weighted sum of a first score, a second score, and a third score of the data, and the formula is:
s=s1*m1+s2*m2+s3*m3equation 8
In equation 8: s represents the importance score, m1Representing a first weight, m, assigned to a first score2Representing a second weight, m, assigned to a second fraction3Representing a third weight, s, assigned to a third fraction1Denotes the first fraction, s2Representing a second score, s3Representing a third score.
8. A dynamic cache processing apparatus, comprising:
the acquisition unit is used for acquiring the writing time, the writer information and the historical access information when the data in the cache is written into the cache;
a first calculation unit to determine a first score of the data based on the write time of the data, determine a second score of the data based on the writer information of the data, and determine a third score of the data based on the historical access information of the data;
the second calculation unit is used for determining the importance scores of the data based on the first scores, the second scores and the third scores of the data;
and the deleting unit is used for deleting the data with the importance scores lower than a preset threshold value in the cache according to the importance scores of the data.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the dynamic cache processing method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor; wherein the processor is configured to perform the dynamic cache processing method of any of claims 1-7 via execution of the executable instructions.
CN201910853969.6A 2019-09-10 2019-09-10 Dynamic cache processing method and device, storage medium and electronic equipment Active CN110688401B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910853969.6A CN110688401B (en) 2019-09-10 2019-09-10 Dynamic cache processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910853969.6A CN110688401B (en) 2019-09-10 2019-09-10 Dynamic cache processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110688401A true CN110688401A (en) 2020-01-14
CN110688401B CN110688401B (en) 2023-11-03

Family

ID=69107948

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910853969.6A Active CN110688401B (en) 2019-09-10 2019-09-10 Dynamic cache processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110688401B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696528A (en) * 2020-06-20 2020-09-22 龙马智芯(珠海横琴)科技有限公司 Voice quality inspection method and device, quality inspection equipment and readable storage medium
CN113836457A (en) * 2021-09-29 2021-12-24 德州职业技术学院(德州市技师学院) Mobile internet terminal cache management method, system and storage medium based on information identification and analysis
CN117573357A (en) * 2023-11-27 2024-02-20 北京宝联之星科技股份有限公司 Cloud edge collaborative caching method, system and medium based on perceptual redundancy
CN118570990A (en) * 2024-08-01 2024-08-30 深圳市平方科技股份有限公司 Intelligent quay crane operation monitoring large screen system and visual management method thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102511043A (en) * 2011-11-26 2012-06-20 华为技术有限公司 Method for replacing cache files, device and system thereof
US20150019567A1 (en) * 2013-07-12 2015-01-15 Alibaba Group Holding Limited Providing history-based data processing
US20160062900A1 (en) * 2014-08-29 2016-03-03 International Business Machines Corporation Cache management for map-reduce applications
CN105635319A (en) * 2016-03-03 2016-06-01 北京邮电大学 Data caching method and device
CN106681830A (en) * 2016-12-21 2017-05-17 深圳先进技术研究院 Task cache space monitoring method and device
CN108491450A (en) * 2018-02-26 2018-09-04 平安普惠企业管理有限公司 Data cache method, device, server and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102511043A (en) * 2011-11-26 2012-06-20 华为技术有限公司 Method for replacing cache files, device and system thereof
US20150019567A1 (en) * 2013-07-12 2015-01-15 Alibaba Group Holding Limited Providing history-based data processing
US20160062900A1 (en) * 2014-08-29 2016-03-03 International Business Machines Corporation Cache management for map-reduce applications
CN105635319A (en) * 2016-03-03 2016-06-01 北京邮电大学 Data caching method and device
CN106681830A (en) * 2016-12-21 2017-05-17 深圳先进技术研究院 Task cache space monitoring method and device
CN108491450A (en) * 2018-02-26 2018-09-04 平安普惠企业管理有限公司 Data cache method, device, server and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111696528A (en) * 2020-06-20 2020-09-22 龙马智芯(珠海横琴)科技有限公司 Voice quality inspection method and device, quality inspection equipment and readable storage medium
CN113836457A (en) * 2021-09-29 2021-12-24 德州职业技术学院(德州市技师学院) Mobile internet terminal cache management method, system and storage medium based on information identification and analysis
CN117573357A (en) * 2023-11-27 2024-02-20 北京宝联之星科技股份有限公司 Cloud edge collaborative caching method, system and medium based on perceptual redundancy
CN117573357B (en) * 2023-11-27 2024-08-27 北京宝联之星科技股份有限公司 Cloud edge collaborative caching method, system and medium based on perceptual redundancy
CN118570990A (en) * 2024-08-01 2024-08-30 深圳市平方科技股份有限公司 Intelligent quay crane operation monitoring large screen system and visual management method thereof
CN118570990B (en) * 2024-08-01 2024-10-11 深圳市平方科技股份有限公司 Intelligent quay crane operation monitoring large screen system and visual management method thereof

Also Published As

Publication number Publication date
CN110688401B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN110688401A (en) Dynamic cache processing method and device, storage medium and electronic equipment
CN105281981B (en) The data traffic monitoring method and device of network service
US8229999B2 (en) Analyzing anticipated value and effort in using cloud computing to process a specified workload
US20180144251A1 (en) Server and cloud computing resource optimization method thereof for cloud big data computing architecture
US9031914B2 (en) Tier-based data management
US20200334615A1 (en) Predicting Business-Agnostic Contact Center Expected Wait Times With Deep Neural Networks
US20130139152A1 (en) Cloud provisioning accelerator
JP4910804B2 (en) Business process estimation program, business process estimation method, and business process estimation apparatus
CN110321694B (en) Operation authority allocation method based on label updating system and related equipment
CN109815405B (en) Gray level shunting method and system
CN108292162A (en) Software definition fifo buffer for multi-thread access
CN111400600A (en) Message pushing method, device, equipment and storage medium
CN110162518B (en) Data grouping method, device, electronic equipment and storage medium
CN112015562A (en) Resource allocation method and device based on transfer learning and electronic equipment
CN112860706A (en) Service processing method, device, equipment and storage medium
CN111967543A (en) User resource quota determining method and device and electronic equipment
CN112017062B (en) Resource quota distribution method and device based on guest group subdivision and electronic equipment
CN115202847A (en) Task scheduling method and device
CN110033242B (en) Working time determining method, device, equipment and medium
CN115238588A (en) Graph data processing method, risk prediction model training method and device
CN115016735A (en) Control method, device and medium for distributed cache system
CN112348658A (en) Resource allocation method and device and electronic equipment
CN113672834A (en) Data processing method and device, electronic equipment and computer readable medium
CN111125467A (en) Method, system and equipment for outputting log file and readable storage medium
CN115016890A (en) Virtual machine resource allocation method and device, electronic equipment and storage medium

Legal Events

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