A recommended method, device and medium for creating a virtual cache disk

By creating a cache disk data table and using linear equations to recommend the cache disk creation quantity, the time and labor cost problems of users when creating a virtual cache disk are solved, and the user experience is improved.

CN115129259BActive Publication Date: 2025-08-19JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210867299.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2025-08-19
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

In the era of big data, users do not know the type and quantity required when creating virtual cache disks, which consumes time and labor costs, and have a poor user experience.

Method used

By reading historical log information, establishing a cache disk data table, determining the correlation between virtual cache disks and similarity between systems, and using linear equations to recommend the number of cache disks to create.

Benefits of technology

Save time and labor costs for creating virtual cache disks and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115129259B_ABST
    Figure CN115129259B_ABST
Patent Text Reader

Abstract

The present application relates to the field of virtual cache disk creation, and discloses a method, device, and medium for recommending virtual cache disk creation, including: reading a cache disk data table pre-established based on historical log information, and if the cache disk data table determines that a first virtual cache disk is associated with a second virtual cache disk, recommending the number of second virtual cache disks to be created based on a linear equation between the two virtual cache disks when creating the first virtual cache disk. When creating a virtual cache disk for a target system, if the similarity between the target system and a reference system is greater than a preset threshold, recommending the number of virtual cache disks to be created for the target system based on the virtual cache disk situation in the reference system. Thus, the correlation between virtual cache disks or the similarity between two systems is determined based on historical log information, so that when creating a certain virtual cache disk, the number of virtual cache disks of other types can be recommended, and the number of creations for the target system can be recommended based on the reference system, saving time and labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtual cache disk creation, and in particular to a recommended method, device, and medium for creating a virtual cache disk. Background Art

[0002] In the era of big data, an incalculable amount of data is generated every day, which leads to an increasing demand for storage devices. Different types and quantities of data often require different types and quantities of cache disks for storage.

[0003] Currently, when users are not clear about the type and number of cache disks they need, they need to constantly create virtual cache disks in the management interface for use. This large number of operations consumes time and manpower costs, and also brings a very poor user experience.

[0004] Therefore, it can be seen that how to predict and recommend the type and quantity of virtual cache disks to be created, save time and labor costs, and improve user experience is an urgent problem to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a recommendation method, device and medium for creating a virtual cache disk, predict and recommend the creation type and quantity of virtual cache disks, save creation time and labor costs, and improve user experience.

[0006] To solve the above technical problems, the present application provides a recommended method for creating a virtual cache disk, including:

[0007] Read the cache disk data table pre-established based on historical log information;

[0008] Upon receiving a creation instruction for any type of virtual cache disk, determining the association between the virtual cache disks according to the cache disk data table;

[0009] When a first virtual cache disk in the cache disk data table is associated with a second virtual cache disk, a linear equation between the first virtual cache disk and the second virtual cache disk is calculated, so that when the first virtual cache disk is created, the number of the second virtual cache disks to be created is recommended according to the linear equation;

[0010] Upon receiving a creation instruction to create the virtual cache disk for a target system, determining a similarity between the target system and a reference system;

[0011] When the similarity is greater than a preset threshold, a quantity of each virtual cache disk created for the target system is recommended according to the virtual cache disk status in the reference system.

[0012] Preferably, determining the association between the virtual cache disks according to the cache disk data table includes:

[0013] Determining a non-zero first total number of records of the first virtual cache disk and a non-zero second total number of records of the second virtual cache disk;

[0014] Determine whether the value of the second total number of records divided by the first total number of records is greater than a preset value;

[0015] If it is greater than the preset value, it is determined that the first virtual cache disk is associated with the second virtual cache disk.

[0016] Preferably, the calculating of the linear equation between the first virtual cache disk and the second virtual cache disk comprises:

[0017] Obtain all records of the first virtual cache disk and the second virtual cache disk in the cache disk data table to obtain a target data set;

[0018] Calculating the linear equation based on the target data set and the principle of calculus;

[0019] Correspondingly, the recommending the number of second virtual cache disks to be created according to the linear equation includes:

[0020] The number of the first virtual cache disks currently targeted for creation is input into the linear equation to obtain the recommended number of the second virtual cache disks to be created.

[0021] Preferably, determining the similarity between the target system and the reference system comprises:

[0022] Obtaining a first eigenvector of the target system and a second eigenvector of the reference system based on pre-established parameter values corresponding to various influencing factors of the system; wherein the influencing factors include at least CPU model, hard disk type, device model, and usage scenario;

[0023] determining a distance between the first eigenvector and the second eigenvector;

[0024] The similarity between the target system and the reference system is calculated based on the distance.

[0025] Preferably, the cache disk data table is established according to the following steps, including:

[0026] Obtain historical log information within a preset time period from the current moment in the database;

[0027] Collecting the number of virtual cache disks effectively created during each time interval from logging into the system to logging out of the system from the historical log information within the preset time period to obtain a record set;

[0028] Each of the record sets is stored in the cache disk data table.

[0029] Preferably, the creating a recommendation of the number of virtual cache disks for the target system according to the virtual cache disk status in the reference system includes:

[0030] Calculating a ratio of hard disk storage capacity between the reference system and the target system;

[0031] The number of virtual cache disks recommended to be created for the target system is determined according to the hard disk storage capacity ratio and the virtual cache disk status in the reference system.

[0032] Preferably, the recommended method for creating a virtual cache disk further includes:

[0033] Every preset period, the step of acquiring historical log information within a preset time period from the current moment in the database is re-entered to update the cache disk data table.

[0034] In order to solve the above technical problems, the present application also provides a recommendation device for creating a virtual cache disk, including:

[0035] A reading module is used to read the cache disk data table pre-established based on historical log information;

[0036] A first determining module is configured to, upon receiving a creation instruction for any type of virtual cache disk, determine the association between the virtual cache disks according to the cache disk data table;

[0037] a calculation module, configured to, when a first virtual cache disk in the cache disk data table is associated with a second virtual cache disk, calculate a linear equation between the first virtual cache disk and the second virtual cache disk, so as to recommend, when creating the first virtual cache disk, a number of the second virtual cache disks to be created based on the linear equation;

[0038] a second determining module, configured to determine a similarity between the target system and a reference system upon receiving a creation instruction to create the virtual cache disk for the target system;

[0039] The recommendation module is configured to recommend the number of virtual cache disks to be created for the target system according to the virtual cache disk status in the reference system when the similarity is greater than a preset threshold.

[0040] In order to solve the above technical problems, the present application also provides a recommended device for creating a virtual cache disk, comprising a memory for storing a computer program;

[0041] A processor is configured to implement the steps of the recommended method for creating a virtual cache disk when executing the computer program.

[0042] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the recommended method for creating a virtual cache disk are implemented.

[0043] The present invention provides a method for recommending virtual cache disk creation, comprising: reading a cache disk data table pre-established based on historical log information; upon receiving a creation instruction for any type of virtual cache disk, determining the association between each virtual cache disk based on the cache disk data table; and when a first virtual cache disk in the cache disk data table has an association with a second virtual cache disk, calculating a linear equation between the first virtual cache disk and the second virtual cache disk, so that when the first virtual cache disk is created, the number of second virtual cache disks to be created is recommended based on the linear equation. Furthermore, upon receiving a creation instruction to create a virtual cache disk for a target system, determining the similarity between the target system and a reference system; and when the similarity is greater than a preset threshold, recommending the number of virtual cache disks to be created for the target system based on the virtual cache disk situation in the reference system. Thus, the technical solution provided by the present application determines the association between each virtual cache disk or the similarity between two systems based on historical log information, establishes a linear equation for the associated first virtual cache disk and the second virtual cache disk, so that when the first virtual cache disk is created, the number of second virtual cache disks to be created is recommended based on the linear equation. At the same time, the number of virtual cache disks created for the target system is recommended based on the virtual cache disk situation in the reference system, saving time and labor costs for creating virtual cache disks and improving user experience.

[0044] In addition, the present application also provides a recommendation device and medium for creating a virtual cache disk, which corresponds to the above-mentioned recommendation method for creating a virtual cache disk and has the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0046] Figure 1A flowchart of a recommended method for creating a virtual cache disk provided in an embodiment of the present application;

[0047] Figure 2 A structural diagram of a recommended device for creating a virtual cache disk provided in an embodiment of the present application;

[0048] Figure 3 A structural diagram of a recommended apparatus for creating a virtual cache disk provided in another embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0050] The core of this application is to provide a recommended method, device and medium for creating a virtual cache disk.

[0051] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0052] In the era of big data, an incalculable amount of data is generated every day, which leads to an increasing demand for storage devices. Different types and quantities of data often require different types and quantities of cache disks for storage.

[0053] Currently, when users are not clear about the type and number of cache disks they need, they need to constantly create virtual cache disks in the management interface for use. This large number of operations consumes time and manpower costs, and also brings a very poor user experience.

[0054] To predict and recommend the type and number of virtual cache disks to be created, saving time and labor, an embodiment of the present application provides a virtual cache disk creation recommendation method. When creating a certain type of virtual cache disk, the method predicts and recommends the number of other types of virtual cache disks to be created based on the historical log information of previous virtual cache disks. Furthermore, when creating virtual cache disks for a system, the method recommends the number of virtual cache disks to be created for that system based on the historical log information of previous virtual cache disks in the reference system.

[0055] Figure 1 A flowchart of a recommended method for creating a virtual cache disk provided in an embodiment of the present application is shown as follows: Figure 1 As shown, the method includes:

[0056] S10: Reading a cache disk data table pre-established based on historical log information;

[0057] In a specific embodiment, a user selects a preset time period, obtains historical log information of the virtual cache disk within the preset time period starting from the current moment from the database, and uses the number of different types of virtual cache disks effectively created within the time interval from each login to the system logout in the historical log information as a record set, and stores all record sets within the preset time period in the cache disk data table, thereby obtaining a pre-established cache disk data table.

[0058] After the cache disk data table is obtained, historical log information within a preset time period is re-acquired every preset period to update the cache disk data table.

[0059] S11: upon receiving a creation instruction for a virtual cache disk of any type, determining the association between the virtual cache disks according to the cache disk data table;

[0060] S12: When a first virtual cache disk in the cache disk data table is associated with a second virtual cache disk, a linear equation between the first virtual cache disk and the second virtual cache disk is calculated, so that when the first virtual cache disk is created, the number of second virtual cache disks to be created is recommended according to the linear equation;

[0061] Upon receiving an instruction to create any type of virtual cache disk, the association between different types of virtual cache disks is determined based on the cache disk data table read in step S10. When a first virtual cache disk in the cache disk data table has an association with a second virtual cache disk, a linear equation is calculated between the first virtual cache disk and the second virtual cache disk, where the first virtual cache disk and the second virtual cache disk are any two types of cache disks in the cache disk data table. After obtaining the linear equation between the first virtual cache disk and the second virtual cache disk, when creating the first virtual cache disk, the linear equation is used to determine whether to recommend the second virtual cache disk and the recommended number of second virtual cache disks to be created.

[0062] In fact, when determining that the first virtual cache disk is associated with the second virtual cache disk, the total number of second records of the second virtual cache disk that are not 0 in the cache disk data table is divided by the total number of first records of the first virtual cache disk that are not 0. If the obtained ratio is greater than the preset value, it is determined that the first virtual cache disk is associated with the second virtual cache disk. At this time, when creating the first virtual cache disk, the number of second virtual cache disks to be created can be recommended based on the linear equation between the first virtual cache disk and the second virtual cache disk.

[0063] When calculating the linear equation between the first virtual cache disk and the second virtual cache disk, all data of the first virtual cache disk and the second virtual cache disk in the cache disk data table are read to obtain the target data set, and then the linear equation is obtained based on the principles of calculus and the target data set. It should be noted that the linear equation can be a linear linear equation, a quadratic linear equation, or a cubic linear equation, and this application does not limit this.

[0064] Furthermore, after obtaining the linear equation, the number of first virtual cache disks currently targeted for creation is input as the value of an unknown variable into the linear equation and then solved to obtain the recommended number of second virtual cache disks for creation.

[0065] S13: upon receiving a creation instruction to create a virtual cache disk for a target system, determining a similarity between the target system and a reference system;

[0066] S14: When the similarity is greater than a preset threshold, a recommendation is made on the number of virtual cache disks created for the target system according to the virtual cache disk conditions in the reference system.

[0067] When the received creation instruction is to create a virtual cache disk for a target system, a first eigenvector of the target system and a second eigenvector of the reference system are obtained based on parameter values corresponding to various pre-established influencing factors of the system, where the influencing factors include at least CPU model, hard disk type, device model, and usage scenario. It is understood that the first eigenvector and the second eigenvector are composed of parameter values corresponding to influencing factors such as CPU model, hard disk type, device model, and usage scenario.

[0068] After obtaining the first eigenvector and the second eigenvector, the distance between the two eigenvectors is determined, and the similarity between the target system and the reference system is determined based on the obtained distance. If the similarity is greater than a preset threshold, it is determined that different types of virtual cache disks can be created for the target system based on the conditions of each virtual cache disk in the reference system for recommendation. When making recommendations, the ratio of the hard disk storage capacity of the reference system and the target system is first determined, and recommendations are made according to the ratio.

[0069] The recommendation method for creating a virtual cache disk provided in an embodiment of the present application includes: reading a cache disk data table pre-established based on historical log information, and when receiving a creation instruction for any type of virtual cache disk, determining the correlation between each virtual cache disk based on the cache disk data table. When a first virtual cache disk in the cache disk data table has a correlation with a second virtual cache disk, calculating a linear equation between the first virtual cache disk and the second virtual cache disk, so that when creating the first virtual cache disk, the number of second virtual cache disks to be created is recommended based on the linear equation. In addition, when receiving a creation instruction to create a virtual cache disk for a target system, determining the similarity between the target system and a reference system, and when the similarity is greater than a preset threshold, recommending the number of virtual cache disks to be created for the target system based on the virtual cache disk situation in the reference system. It can be seen that the technical solution provided by the present application determines the correlation between each virtual cache disk or the similarity between two systems based on historical log information, establishes a linear equation for the first virtual cache disk and the second virtual cache disk that have a correlation, so that when creating the first virtual cache disk, the number of second virtual cache disks to be created is recommended based on the linear equation. At the same time, the number of virtual cache disks created for the target system is recommended based on the virtual cache disk situation in the reference system, saving time and labor costs for creating virtual cache disks and improving user experience.

[0070] In a specific embodiment, determining the association between each virtual cache disk according to the cache disk data table includes:

[0071] Determining a non-zero first total number of records of the first virtual cache disk and a non-zero second total number of records of the second virtual cache disk;

[0072] Determine whether the value of the total number of the second records divided by the total number of the first records is greater than a preset value;

[0073] If it is greater than a preset value, it is determined that the first virtual cache disk is associated with the second virtual cache disk.

[0074] In the cache disk data table, if the total number of non-zero first records of the first virtual cache disk divided by the total number of non-zero second records of the second virtual cache disk is greater than a preset value, it is determined that the first virtual cache disk is associated with the second virtual cache disk.

[0075] It should be noted that if a second virtual cache disk is currently being created and a recommendation is needed on the number of first virtual cache disks to be created, it is necessary to determine whether the second virtual cache disk is associated with the first virtual cache disk. In other words, it is necessary to determine whether the total number of non-zero second records of the second virtual cache disk divided by the total number of non-zero first records of the first virtual cache disk is greater than a preset value. To facilitate understanding, the following example will be used to illustrate this.

[0076] For example, the first virtual cache disk is a data cache disk (dDisk), the second virtual cache disk is a metadata cache disk (mDisk), and the preset value is K. When determining the relevance of dDisk to mDisk, if there are N records in the cache disk data table, of which A records have dDisk values that are not zero, i.e., the total number of first non-zero records of the first virtual cache disk dDisk is A. And if there are B records with mDisk values that are not zero, i.e., the total number of second non-zero records of the second virtual cache disk mDisk is B, then the relevance of dDisk to mDisk is W = B / A. When W>K, it is determined that dDisk is relevant to mDisk.

[0077] Of course, if it is necessary to determine the relevance of mDisk to dDisk, then W=A / B. Similarly, when W>K, it is determined that there is a relevance between mDisk and dDisk.

[0078] The recommended method for creating a virtual cache disk provided in an embodiment of the present application determines whether the total number of second non-zero records of the second virtual cache disk in the cache disk data table divided by the total number of first non-zero records of the first virtual cache disk is greater than a preset value. If so, it is determined that the first virtual cache disk is associated with the second virtual cache disk, so as to further recommend the number of second virtual cache disks to be created when creating the first virtual cache disk based on the linear equation between the first virtual cache disk and the second virtual cache disk, thereby saving time in creating virtual cache disks.

[0079] Based on the above embodiment, after determining that the first virtual cache disk is associated with the second virtual cache disk, calculating the linear equation between the first virtual cache disk and the second virtual cache disk includes:

[0080] Obtain all records of the first virtual cache disk and the second virtual cache disk in the cache disk data table to obtain a target data set;

[0081] The linear equation is calculated based on the target data set and the principles of calculus;

[0082] Correspondingly, the number of second virtual cache disks recommended for creation based on the linear equation includes:

[0083] The number of first virtual cache disks currently targeted for creation is input into the linear equation to obtain the recommended number of second virtual cache disks to be created.

[0084] During implementation, after determining that the first virtual cache disk is associated with the second virtual cache disk, it is necessary to further calculate the linear equation between the first virtual cache disk and the second virtual cache disk, so that when creating the first virtual cache disk, it is determined based on the linear equation whether to recommend creating the second virtual cache disk.

[0085] When calculating a linear equation, all records for the first virtual cache disk and the second virtual cache disk are retrieved from the cache disk data table to obtain a target data set. Then, based on the target data set and the principles of calculus, the linear equation is calculated. It should be noted that the linear equation can be a linear equation, a quadratic equation, or a cubic equation, and this application does not limit this. For ease of understanding, this will be further explained below.

[0086] For example, the first virtual cache disk dDisk is associated with the second virtual cache disk mDisk. From the cache disk data table, each record of dDisk and mDisk is obtained and put into the set to obtain the target data set (x i ,y i ), (where i = 1, 2, 3, ..., m, and i is a positive integer), assuming that the linear equation between dDisk and mDisk is y = P(x) = a + bx + cx 2 , where a, b and c are unknown coefficients, which need to be calculated based on the target data set (x i ,y i ) to confirm.

[0087] Where a, b, and c satisfy the following formula:

[0088]

[0089] According to the principles of calculus, to minimize Q(a,b,c), the following conditions must be met:

[0090]

[0091] The target data set (x i ,y i ) into the above formula to solve the unknowns a, b, and c, and then get the linear equation y = P(x) = a + bx + cx 2 .

[0092] After obtaining the linear equation, if the first virtual cache disk dDisk needs to be created, the target number to be created can be used as the value of x and input into the linear equation y=P(x)=a+bx+cx 2 The recommended number of mDisks for creating the second virtual cache disk is obtained.

[0093] The recommended method for creating a virtual cache disk provided in an embodiment of the present application, after determining that there is a correlation between the first virtual cache disk and the second virtual cache disk in the cache disk data table, obtains a target data set based on all records of the two cache disks in the cache disk data table and calculates a linear equation between the two based on the principle of calculus. Therefore, when creating the first virtual cache disk, the number of recommended second virtual cache disks to be created can be directly obtained according to the linear equation, thereby improving creation efficiency and reliability, while saving creation time and labor costs.

[0094] When a virtual cache disk is created for a certain system, the similarity between the target system (the system where the virtual cache disk is to be created) and the reference system is determined to meet the conditions. If the conditions are met, the creation of the virtual cache disk is recommended based on the situation of the reference system.

[0095] Determining the similarity between the target system and the reference system involves:

[0096] Obtaining a first eigenvector of the target system and a second eigenvector of the reference system based on pre-established parameter values corresponding to various influencing factors of the system, wherein the influencing factors include at least CPU model, hard disk type, device model, and usage scenario;

[0097] determining a distance between the first eigenvector and the second eigenvector;

[0098] The similarity between the target system and the reference system is calculated based on the distance.

[0099] It is understandable that factors such as the system's CPU model, hard disk type, device model, and usage scenario will directly affect the similarity between the two systems. Therefore, these influencing factors can be matched with a corresponding parameter value in advance. For example, the performance corresponding to different CPU models is also different. According to the performance of different CPU models, a corresponding parameter value is assigned to CPUs with different performance. It is worth noting that the size, accuracy, and range of the parameter value are not limited in this application and can be set according to actual business needs. In addition, it should be noted that the influencing factors of the system may include but are not limited to CPU model, hard disk type, device model, and usage scenario.

[0100] Specifically, the first eigenvector of the target system and the second eigenvector of the reference system can be obtained respectively according to the parameter values corresponding to the various influencing factors of the pre-established system. It can be understood that the first eigenvector and the second eigenvector are obtained according to the parameter values corresponding to the various influencing factors of the system.

[0101] For example, the first eigenvector of the target system is Among them, a1 is the parameter value corresponding to the CPU model, b1 is the parameter value corresponding to the hard disk type, c1 is the parameter value corresponding to the device model, and d1 is the parameter value corresponding to the usage scenario. The second eigenvector of the reference system is a2, b2, c2, and d2 represent the parameter values corresponding to the influencing factors CPU model, hard disk type, device model, and usage scenario, respectively.

[0102] Furthermore, the first eigenvector is determined and the second eigenvector The distance d is:

[0103]

[0104] After obtaining the distance d between the first eigenvector and the second eigenvector, the similarity S between the target system and the reference system is calculated:

[0105]

[0106] When the similarity S is greater than a preset threshold, it is determined that the number of virtual cache disks to be created for the target system can be recommended based on the conditions of the virtual cache disks in the reference system.

[0107] The recommendation method for creating a virtual cache disk provided in an embodiment of the present application determines the similarity between two systems. When the similarity is greater than a preset threshold, the method recommends the number of virtual cache disks to be created for the target system based on the situation of the virtual cache disk in the reference system. This avoids the situation where, when creating a virtual cache disk for a certain system, the user is unclear about the type and number of cache disks required, and continuously creates virtual cache disks for use in the management interface, resulting in a large number of operations that consume time and labor costs, thereby improving the efficiency of creating virtual cache disks.

[0108] It can be understood that the recommended method for creating a virtual cache disk provided in this application is based on a cache disk data table pre-established based on historical log information. When establishing the cache disk data table, historical log information within a preset time period starting from the current moment is obtained from the database that stores the virtual cache disk data information for creation. It should be noted that this application does not limit the database for storing historical log information.

[0109] Furthermore, a record set is obtained by collecting the number of virtual cache disks effectively created during each time interval between system login and system logout from historical log information within a preset time period. It is understood that within the preset time period, a user may log in and out of the system multiple times. Therefore, the number of virtual cache disks effectively created during each time interval between system login and system logout is collected, and a record set is obtained for each collection. It should be noted that if a virtual cache disk is created and then deleted during the time interval between system login and system logout, the virtual cache disk is deemed an invalid virtual cache disk.

[0110] Then, all data collected within a preset time period is stored in the cache disk data table to obtain a pre-established cache disk data table.

[0111] The recommended method for creating a virtual cache disk provided in an embodiment of the present application obtains historical log information within a preset time period from the current moment in the database, and collects the number of virtual cache disks effectively created within the time interval from each system login to each system exit from the historical log information within the preset time period to obtain a record set, and then stores each record set in a cache disk data table. Therefore, the creation of a virtual cache disk can be recommended based on the pre-established cache disk data table, thereby improving creation efficiency and thus enhancing user experience.

[0112] In a specific embodiment, when it is determined that the similarity between the target system and the reference system is greater than a preset value, that is, when creating a virtual cache disk for the target system and recommending it based on the conditions of each virtual cache disk in the reference system, the ratio of the hard disk storage capacity of the reference system and the target system is first calculated, and then the number of virtual cache disks recommended to be created for the target system is determined based on the ratio of the hard disk storage capacity and the conditions of the virtual cache disks in the reference system.

[0113] For example, if the hard disk storage capacity of the reference system is 100GB and the hard disk storage capacity of the target reference system is 50GB, the ratio of the hard disk storage capacity of the reference system and the target system is 2:1. Therefore, when creating a virtual cache disk, it is created according to the ratio of 2:1. For example, if there are 10 dDisks in the reference system, it is recommended to create 5 dDisks in the target system.

[0114] The virtual cache disk creation recommendation method provided in the embodiments of the present application calculates the hard disk storage capacity ratio between the reference system and the target system when recommending the number of virtual cache disks to be created for the target system based on the virtual cache disk situation in the reference system. The recommended number of virtual cache disks to be created for the target system is determined based on the hard disk storage capacity ratio and the virtual cache disk situation in the reference system. This allows recommendations to be made for the target system based on the actual storage situation of the reference system and the actual situation of each virtual cache disk, thereby improving the reliability of virtual cache disk creation.

[0115] In order to further improve the reliability of creating the virtual cache disk, in each preset period, historical log information within a preset time period is retrieved from the database starting from the current moment, so as to update the cache disk data table.

[0116] The recommended method for creating a virtual cache disk provided in the embodiment of the present application re-acquires historical log information within a preset time period from the current moment in the database after each preset cycle, thereby updating the cache disk data table and further improving the reliability of the recommendation for creating a virtual cache disk.

[0117] The above embodiments describe in detail a recommended method for creating a virtual cache disk. This application also provides embodiments of a recommended apparatus for creating a virtual cache disk. It should be noted that this application describes the apparatus embodiments from two perspectives: one based on functional modules and the other based on hardware structure.

[0118] Figure 2 A structural diagram of a recommended device for creating a virtual cache disk provided in an embodiment of the present application, such as Figure 2 As shown, the device includes:

[0119] A reading module 10 is used to read a cache disk data table pre-established based on historical log information;

[0120] A first determining module 11 is configured to determine the association between the virtual cache disks according to the cache disk data table upon receiving a creation instruction for any type of virtual cache disk;

[0121] a calculation module 12 configured to calculate a linear equation between the first virtual cache disk and the second virtual cache disk when there is an association between the first virtual cache disk and the second virtual cache disk in the cache disk data table, so as to recommend the number of second virtual cache disks to be created based on the linear equation when creating the first virtual cache disk;

[0122] A second determining module 13 is configured to determine the similarity between the target system and the reference system upon receiving a creation instruction to create a virtual cache disk for the target system;

[0123] The recommendation module 14 is configured to recommend the number of virtual cache disks to be created for the target system based on the virtual cache disk conditions in the reference system when the similarity is greater than a preset threshold.

[0124] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, and they will not be repeated here.

[0125] The virtual cache disk creation recommendation device provided in an embodiment of the present application includes: reading a cache disk data table pre-established based on historical log information; upon receiving a creation instruction for any type of virtual cache disk, determining the association between each virtual cache disk based on the cache disk data table; and when a first virtual cache disk in the cache disk data table has an association with a second virtual cache disk, calculating a linear equation between the first virtual cache disk and the second virtual cache disk, so that when the first virtual cache disk is created, the number of second virtual cache disks to be created is recommended based on the linear equation. In addition, upon receiving a creation instruction to create a virtual cache disk for a target system, the similarity between the target system and a reference system is determined; when the similarity is greater than a preset threshold, the number of virtual cache disks to be created for the target system is recommended based on the virtual cache disk situation in the reference system. It can be seen that the technical solution provided by the present application determines the association between each virtual cache disk or the similarity between two systems based on historical log information, establishes a linear equation for the associated first virtual cache disk and the second virtual cache disk, so that when the first virtual cache disk is created, the number of second virtual cache disks to be created is recommended based on the linear equation. At the same time, the number of virtual cache disks created for the target system is recommended based on the virtual cache disk situation in the reference system, saving time and labor costs for creating virtual cache disks and improving user experience.

[0126] Figure 3 A structural diagram of a recommended device for creating a virtual cache disk provided in another embodiment of the present application is shown as follows: Figure 3 As shown, the recommended apparatus for creating a virtual cache disk includes: a memory 20 for storing a computer program;

[0127] The processor 21 is configured to implement the steps of the recommended method for creating a virtual cache disk as mentioned in the above embodiment when executing a computer program.

[0128] The recommended device for creating the virtual cache disk provided in this embodiment may include, but is not limited to, a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0129] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 can be implemented in at least one hardware form of a digital signal processor (DSP), a field programmable gate array (FPGA), and a programmable logic array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 21 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0130] The memory 20 may include one or more computer-readable storage media, which may be non-transitory. The memory 20 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201, wherein, after the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the recommended method for creating a virtual cache disk disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 20 may also include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include but is not limited to the relevant data involved in the recommended method for creating a virtual cache disk.

[0131] In some embodiments, the recommendation device for creating a virtual cache disk may further include a display screen 22 , an input and output interface 23 , a communication interface 24 , a power supply 25 , and a communication bus 26 .

[0132] Those skilled in the art will understand that Figure 3 The structure shown in the figure does not constitute a limitation on the recommended means for creating a virtual cache disk, and may include more or fewer components than shown in the figure.

[0133] The device for recommending creation of a virtual cache disk provided in an embodiment of the present application includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a method for recommending creation of a virtual cache disk.

[0134] The virtual cache disk creation recommendation device provided in the embodiments of the present application determines the correlation between virtual cache disks or the similarity between two systems based on historical log information, and establishes a linear equation for a first virtual cache disk and a second virtual cache disk that have a correlation. This linear equation then recommends the number of second virtual cache disks to create when creating the first virtual cache disk. Furthermore, the device makes recommendations based on the number of virtual cache disks to create for the target system, using the virtual cache disk status of the reference system. This reduces the time and labor costs of creating virtual cache disks and improves the user experience.

[0135] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps described in the above method embodiment.

[0136] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium and executes all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program code.

[0137] The above is a detailed introduction to the recommended method, device and medium for creating a virtual cache disk provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0138] It should also be noted that, in this specification, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

Claims

1. A recommended method for creating a virtual cache disk, characterized in that: include: Read the cache disk data table pre-established based on historical log information; Upon receiving a creation instruction for any type of virtual cache disk, determining the association between the virtual cache disks according to the cache disk data table; When a first virtual cache disk in the cache disk data table is associated with a second virtual cache disk, a linear equation between the first virtual cache disk and the second virtual cache disk is calculated, so that when the first virtual cache disk is created, the number of the second virtual cache disks to be created is recommended according to the linear equation; Upon receiving a creation instruction to create the virtual cache disk for a target system, determining a similarity between the target system and a reference system; When the similarity is greater than a preset threshold, recommending the number of virtual cache disks to be created for the target system according to the virtual cache disk situation in the reference system; The determining of the association between the virtual cache disks according to the cache disk data table includes: Determining a non-zero first total number of records of the first virtual cache disk and a non-zero second total number of records of the second virtual cache disk; Determine whether the value of the second total number of records divided by the first total number of records is greater than a preset value; If it is greater than the preset value, it is determined that the first virtual cache disk is associated with the second virtual cache disk; The calculating of the linear equation between the first virtual cache disk and the second virtual cache disk includes: Obtain all records of the first virtual cache disk and the second virtual cache disk in the cache disk data table to obtain a target data set; Calculating the linear equation based on the target data set and the principle of calculus; Correspondingly, the recommending the number of second virtual cache disks to be created according to the linear equation includes: Inputting the current target number of the first virtual cache disks to be created into the linear equation to obtain the recommended number of the second virtual cache disks to be created; The cache disk data table is established according to the following steps, including: Obtain historical log information within a preset time period from the current moment in the database; Collecting the number of virtual cache disks effectively created during each time interval from logging into the system to logging out of the system from the historical log information within the preset time period to obtain a record set; Each of the record sets is stored in the cache disk data table.

2. The method for creating a virtual cache disk according to claim 1, wherein: Determining the similarity between the target system and the reference system includes: Obtaining a first eigenvector of the target system and a second eigenvector of the reference system based on pre-established parameter values corresponding to various influencing factors of the system; wherein the influencing factors include at least CPU model, hard disk type, device model, and usage scenario; determining a distance between the first eigenvector and the second eigenvector; The similarity between the target system and the reference system is calculated based on the distance.

3. The method for creating a virtual cache disk according to claim 2, wherein: The creating a recommendation of the number of virtual cache disks for the target system according to the virtual cache disk status in the reference system includes: Calculating a ratio of hard disk storage capacity between the reference system and the target system; The number of virtual cache disks recommended to be created for the target system is determined according to the hard disk storage capacity ratio and the virtual cache disk status in the reference system.

4. The method for creating a virtual cache disk according to claim 1, wherein: Also includes: Every preset period, the step of acquiring historical log information within a preset time period from the current moment in the database is re-entered to update the cache disk data table.

5. A recommended device for creating a virtual cache disk, characterized in that: include: A reading module is used to read the cache disk data table pre-established based on historical log information; A first determining module is configured to, upon receiving a creation instruction for any type of virtual cache disk, determine the association between the virtual cache disks according to the cache disk data table; a calculation module, configured to, when a first virtual cache disk in the cache disk data table is associated with a second virtual cache disk, calculate a linear equation between the first virtual cache disk and the second virtual cache disk, so as to recommend, when creating the first virtual cache disk, a number of the second virtual cache disks to be created based on the linear equation; a second determining module, configured to determine a similarity between the target system and a reference system upon receiving a creation instruction to create the virtual cache disk for the target system; A recommendation module, configured to recommend the number of virtual cache disks to be created for the target system based on the virtual cache disk status in the reference system when the similarity is greater than a preset threshold; The first determining module is configured to: determine a non-zero first total number of records in the first virtual cache disk and a non-zero second total number of records in the second virtual cache disk; determine whether a value of the second total number of records divided by the first total number of records is greater than a preset value; and if so, determine that the first virtual cache disk is associated with the second virtual cache disk; The calculation module is configured to: obtain all records of the first virtual cache disk and the second virtual cache disk in the cache disk data table to obtain a target data set; and calculate the linear equation based on the target data set and the principle of calculus; The calculation module is configured to: input the current target number of the first virtual cache disks to be created into the linear equation to obtain a recommended number of the second virtual cache disks to be created; The recommendation device for creating a virtual cache disk is used to: obtain historical log information within a preset time period starting from the current moment in the database; collect the number of each virtual cache disk effectively created within the time interval from each system login to system exit from the historical log information within the preset time period to obtain a record set; and store each record set in the cache disk data table.

6. A recommended device for creating a virtual cache disk, characterized in that: including a memory for storing a computer program; A processor is configured to implement the steps of the recommended method for creating a virtual cache disk according to any one of claims 1 to 4 when executing the computer program.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the recommended method for creating a virtual cache disk according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Method, device for managing cache and computer program product

    CN110737394A

  • Information recommendation method and device, electronic equipment and storage medium

    CN114329173A