A data pre-caching method, apparatus, device and medium
By using a pre-caching system, user behavior and system status are monitored in real time, and the probability of query commands is recorded. Only high-probability data is stored in the front-end cache, which solves the problems of slow data presentation and cache waste in the storage system, and achieves faster data retrieval and a better user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN INSPUR DATA TECH CO LTD
- Filing Date
- 2023-05-19
- Publication Date
- 2026-04-21
AI Technical Summary
In existing storage systems, as the amount and types of data increase, the speed at which data is presented on the interface slows down, affecting the user experience. Furthermore, existing caching optimization methods suffer from wasted space or unfriendly user experience.
By using a pre-caching system, user behavior and system status are monitored in real time, and the probability of user query commands is recorded. Only target data with a preset probability greater than the target probability is stored in the front-end cache, reducing unnecessary data storage and improving data retrieval speed.
It improves the speed at which data is displayed on the interface, reduces wasted cache space, optimizes the user experience, and makes the stored data more targeted.
Smart Images

Figure CN116561080B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a data pre-caching method, apparatus, device, and medium. Background Technology
[0002] Currently, with the increasing number of business scenarios for storage systems, the functions of storage systems are also constantly being improved. At this time, the amount and types of data that users care about are also increasing. However, from the perspective of storage system management software, as the amount and types of data increase, the most intuitive feeling for users is that the data is presented on the interface more slowly, which affects the user experience.
[0003] To address these issues, existing technologies often focus on increasing caching. One approach is to add a cache on the server side, pre-caching all data. When a user sends a query command, it no longer needs to be retrieved from the storage system but can be retrieved directly from the cache, thus optimizing the speed of interface data presentation. While this method solves the current user problem, as the data volume increases, this approach may require a large amount of cache space to pre-cache data, much of which may be unnecessary for the user, resulting in wasted cache space. Another approach is to cache the data queried during each user login, recording the data accessed during the current login. When the user needs this data again during the same login (sending a query command), it can be retrieved directly from the cache without real-time querying, thus optimizing the interface presentation speed of the same data queried multiple times within the same login. When the user logs out, the cached data is cleared. While this approach avoids wasting storage space, the user experience during the first query of a certain data within the same login is not user-friendly; it only optimizes the experience for subsequent accesses.
[0004] In conclusion, improving the speed of data acquisition in order to improve the speed of data presentation on the interface is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a data pre-caching method, apparatus, device, and medium, which can improve the speed of data acquisition and thus improve the speed of data presentation on the interface. The specific solution is as follows:
[0006] In a first aspect, this application discloses a data pre-caching method, applied to a pre-caching processing system, comprising:
[0007] Identify the target user who logged into the storage system and query whether there is behavioral information in the user behavior data table corresponding to the target user; the behavioral information includes several query commands and a preset probability of obtaining each query command; the query command is a command that the target user has sent to the storage system.
[0008] If such a target command with a preset probability greater than the target probability is sent to the storage system, and the target data returned by the storage system is sent to the front-end cache, so that the target user can retrieve the corresponding target data from the front-end cache after sending the target command.
[0009] The step of determining the target user for logging into the storage system and querying the user behavior data table corresponding to the target user to see if behavioral information exists includes:
[0010] Identify the target user who is logging into the storage system, and query the user table to see if the target user's information exists.
[0011] If it exists, then query whether the behavior information exists in the user behavior data table corresponding to the target user.
[0012] The data pre-caching method further includes:
[0013] Real-time monitoring of each user in the storage system;
[0014] If the reduction of any old user is detected, delete the user information of the old user from the user table and delete the user behavior data table corresponding to the old user.
[0015] If any new user is detected, the user information of the new user is added to the user table, and a user behavior data table corresponding to the new user is created.
[0016] The step of querying whether behavioral information exists in the user behavior data table corresponding to the target user includes:
[0017] Check if there is any abnormal information in the system abnormal data table indicating an abnormality in the storage system;
[0018] If the abnormal information exists, the abnormal information is sent to the front end, and the system queries the user behavior data table corresponding to the target user to see if there is any behavior information.
[0019] If the abnormal information does not exist, then directly query the user behavior data table corresponding to the target user to see if the behavior information exists.
[0020] The data pre-caching method further includes:
[0021] The storage system is monitored in real time. If any device in the storage system is detected to have a fault, the device name and the fault are recorded, and the device name and the fault are stored as anomaly information in the system anomaly data table.
[0022] The step of storing the device name and the fault error as exception information in the system exception data table further includes:
[0023] If the fault error is detected to have disappeared, the corresponding exception information in the system exception data table is deleted.
[0024] The data pre-caching method further includes:
[0025] Real-time statistics are collected on the first login count of the target user into the storage system within a preset time period, the number of query commands sent by the target user to the storage system, and the second login count of the target user sending the query command within the first login count for each query command.
[0026] The ratio of the second login count to the first login count for each query command is calculated to obtain the preset probability of obtaining the query command for each query command.
[0027] The first login count, several query commands, the second login count corresponding to each query command, and the preset probability corresponding to each query command are recorded as behavioral information in the user behavior data table corresponding to the target user.
[0028] Secondly, this application discloses a data pre-caching device, applied to a pre-caching processing system, comprising:
[0029] The behavior information query module is used to identify the target user who logs into the storage system and query whether there is behavior information in the user behavior data table corresponding to the target user; the behavior information includes several query commands and a preset probability of obtaining the query command corresponding to each query command; the query command is a command that the target user has sent to the storage system.
[0030] The target data sending module is used to send the target command with a preset probability greater than the target probability to the storage system if it exists, and send the target data returned by the storage system to the front-end cache so that the target user can obtain the corresponding target data from the front-end cache after sending the target command.
[0031] Thirdly, this application discloses an electronic device, including:
[0032] Memory, used to store computer programs;
[0033] A processor for executing the computer program to implement the aforementioned disclosed data pre-caching method.
[0034] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed data pre-caching method.
[0035] As can be seen, this application identifies the target user who logs into the storage system and queries whether there is behavioral information in the user behavior data table corresponding to the target user; the behavioral information includes several query commands and a preset probability of obtaining the query command corresponding to each query command; the query command is a command that the target user has sent to the storage system; if it exists, the target command with the preset probability greater than the target probability is sent to the storage system, and the target data returned by the storage system is sent to the front-end cache, so that the target user can obtain the corresponding target data from the front-end cache after sending the target command. Therefore, this application stores the target data corresponding to target commands that the user has previously queried, and for which the preset probability of retrieving the query command is greater than the target probability, in the front-end cache. When the user subsequently sends a target command, the target data is directly retrieved from the front-end cache without having to query the storage system, thus improving the speed of retrieving the target data after sending the target command. In addition, this application only stores a portion of the data in the cache space, rather than storing all the data in the cache space, reducing cache waste caused by storing data that the user does not need in the cache space. Furthermore, the target data stored in the cache in this application is for all commands that the target user has previously sent to the storage system, and is determined by the preset probability and the target probability, making the stored data more targeted. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0037] Figure 1 This is a flowchart of a data pre-caching method disclosed in this application;
[0038] Figure 2 Here is a flowchart of a specific data pre-caching method disclosed in this application;
[0039] Figure 3 This is a schematic diagram of a data pre-caching method disclosed in this application;
[0040] Figure 4 This is a schematic diagram of a data pre-caching device disclosed in this application;
[0041] Figure 5 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0043] Currently, with the increasing number of business scenarios for storage systems, the functions of storage systems are also constantly being improved, further increasing the amount and types of data that users care about. However, from the perspective of storage system management software, as the amount and types of data increase, the most intuitive feeling for users is that the data is presented on the interface more slowly, which affects the user experience.
[0044] Therefore, this application proposes a data pre-caching scheme, which can improve the speed of data acquisition and thus improve the speed of data presentation on the interface.
[0045] This application discloses a data pre-caching method, applied to a pre-caching processing system. See [link to relevant documentation]. Figure 1 As shown, the method includes:
[0046] Step S11: Determine the target user who logged into the storage system, and query whether there is behavioral information in the user behavior data table corresponding to the target user; the behavioral information includes several query commands and a preset probability of obtaining the query command corresponding to each query command; the query command is a command that the target user has sent to the storage system.
[0047] In this embodiment of the application, the pre-caching processing system may be located within the storage system.
[0048] In this embodiment, the pre-caching processing system will, in real time, count the first login count of the target user into the storage system, the number of query commands sent by the target user to the storage system, and the second login count of the target user sending the query command within the first login count for each query command within a preset time period; calculate the ratio of the second login count to the first login count for each query command to obtain the preset probability of obtaining the query command for each query command; and record the first login count, the number of query commands, the second login count for each query command, and the preset probability for each query command as behavioral information in the user behavior data table corresponding to the target user. It should be noted that the preset time period is determined according to actual conditions and is not specifically limited here; it should also be noted that the user behavior data table corresponds one-to-one with a user, and the user behavior data table may also store usernames.
[0049] It is understandable that this application, by recording user behavior, can summarize and calculate the frequency of information queried by a user when logging into the storage system within a time period, and store each record in the user behavior data table. For example, if user A logs into the storage system m times within a time period T, and n of those times, the user calls command a to query data a (user A sends command a), then the probability that user A will need to query data a the next time he logs into the storage system can be calculated as n / m. At this time, user A, and m / n / command a / (n / m) are recorded in the user behavior data table corresponding to user A.
[0050] It should be noted that n can also be the total number of times the target user sends the target command during a time period T and m logins.
[0051] It should be noted that when a target user logs into the storage system for the first time, a user behavior data table corresponding to the target user will be temporarily created.
[0052] In this embodiment of the application, determining the target user who logs into the storage system and querying whether there is behavioral information in the user behavior data table corresponding to the target user includes: determining the target user who logs into the storage system and querying whether there is user information of the target user in the user table; if there is, querying whether there is behavioral information in the user behavior data table corresponding to the target user.
[0053] In this embodiment, the pre-caching processing system monitors each user in the storage system in real time. If any old user is detected to have been removed, the user information of that old user is deleted from the user table, and the corresponding user behavior data table is also deleted. If any new user is detected to have been added, the user information of that new user is added to the user table, and a corresponding user behavior data table is created. It should be noted that the pre-caching processing system monitors user status in real time. This step mainly involves timely binding of user data and real-time understanding of user additions and deletions to dynamically adjust storage space. This step mainly includes monitoring existing users in the system, storing user information in the user table, and associating the user table with the user behavior data table. When user data is detected to be missing (i.e., the user is deleted from the system), deleting data from the user table also requires deleting the corresponding user behavior data table to free up unnecessary space.
[0054] Step S12: If it exists, the target command with a preset probability greater than the target probability is sent to the storage system, and the target data returned by the storage system is sent to the front-end cache, so that the target user can obtain the corresponding target data from the front-end cache after sending the target command.
[0055] In this embodiment of the application, the target probability is set according to the actual situation and is not specifically limited here.
[0056] In this embodiment, after the target command with a preset probability greater than the target probability is sent to the storage system, a data query is performed, and the target data returned by the storage system is sent to the front-end cache. When the user needs it, there is no need to query again. It should be noted that during this login process, the pre-caching system also needs to update the behavior information in the user behavior data table in real time.
[0057] As can be seen, this application identifies the target user who logs into the storage system and queries whether there is behavioral information in the user behavior data table corresponding to the target user; the behavioral information includes several query commands and a preset probability of obtaining the query command corresponding to each query command; the query command is a command that the target user has sent to the storage system; if it exists, the target command with the preset probability greater than the target probability is sent to the storage system, and the target data returned by the storage system is sent to the front-end cache, so that the target user can obtain the corresponding target data from the front-end cache after sending the target command. Therefore, this application stores the target data corresponding to target commands that the user has previously queried, and for which the preset probability of retrieving the query command is greater than the target probability, in the front-end cache. When the user subsequently sends a target command, the target data is directly retrieved from the front-end cache without having to query the storage system, thus improving the speed of retrieving the target data after sending the target command. In addition, this application only stores a portion of the data in the cache space, rather than storing all the data in the cache space, reducing cache waste caused by storing data that the user does not need in the cache space. Furthermore, the target data stored in the cache in this application is for all commands that the target user has previously sent to the storage system, and is determined by the preset probability and the target probability, making the stored data more targeted.
[0058] This application discloses a specific data pre-caching method applied to a pre-caching processing system. Compared to the previous embodiment, this embodiment further explains and optimizes the technical solution. See also... Figure 2 As shown, it specifically includes:
[0059] Step S21: Determine the target user for logging into the storage system.
[0060] For a more detailed description of the process of step S21, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0061] Step S22: Query the system abnormal data table to see if there is any abnormal information indicating an abnormality in the storage system.
[0062] In this embodiment, the pre-caching processing system monitors the storage system in real time. If a fault is detected in any device within the storage system, the system records the device name and the fault, storing these as anomaly information in the system anomaly data table. It should be noted that the pre-caching processing system monitors system alarm information, controller status, rack status, power supply status, fan status, etc., in real time, and records information or status of monitored objects that may affect the normal operation of the system in the system anomaly data table. This data is stored and updated in real time. When a user logs into the storage system, the critical data pre-loading processing system proactively pushes this data to the management system and displays it on the interface, allowing the user to immediately understand any potential system vulnerabilities.
[0063] It should be noted that after storing the device name and the fault error as abnormal information in the system abnormal data table, the method further includes: if the fault error is detected to have disappeared, then deleting the abnormal information corresponding to the fault error from the system abnormal data table.
[0064] Step S23: If the abnormal information exists, the abnormal information is sent to the front end, and the behavior information is queried in the user behavior data table corresponding to the target user. The behavior information includes several query commands and a preset probability of obtaining the query command corresponding to each query command. The query command is a command that the target user has sent to the storage system.
[0065] In this embodiment of the application, if the abnormal information exists, the abnormal information is sent to the front end so that the abnormal information can be displayed on the interface so that the user can be informed of the abnormal information in a timely manner.
[0066] Step S24: If the abnormal information does not exist, directly query the user behavior data table corresponding to the target user to see if the behavior information exists.
[0067] Step S25: If it exists, the target command with the preset probability greater than the target probability is sent to the storage system, and the target data returned by the storage system is sent to the front-end cache, so that the target user can obtain the corresponding target data from the front-end cache after sending the target command.
[0068] For a more detailed description of the process of step S25, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0069] As can be seen, this application identifies the target user logging into the storage system; queries the system's abnormal data table to see if there is any abnormal information indicating an abnormality in the storage system; if the abnormal information exists, it sends the abnormal information to the front end and queries the user behavior data table corresponding to the target user to see if there is any behavioral information; the behavioral information includes several query commands and a preset probability of obtaining the query command corresponding to each query command; the query command is a command that the target user has sent to the storage system; if the abnormal information does not exist, it directly queries the user behavior data table corresponding to the target user to see if there is any behavioral information; if it exists, it sends the target command with a preset probability greater than the target probability to the storage system and sends the target data returned by the storage system to the front end cache, so that the target user can obtain the corresponding target data from the front end cache after sending the target command. Therefore, this application stores target data corresponding to target commands that a user has previously queried, and for which the preset probability of retrieving the query command is greater than the target probability, in the front-end cache. When a user subsequently sends a target command, the target data is retrieved directly from the front-end cache without having to query the storage system, thus improving the speed of retrieving the target data after sending the target command. In addition, this application only stores a portion of the data in the cache space, rather than storing all the data in the cache space, reducing cache waste caused by storing data that the user does not need in the cache space. Furthermore, the target data stored in the cache in this application is for all commands that the target user has previously sent to the storage system, and is determined by the preset probability and the target probability, making the stored data more targeted. In addition, this application monitors in real time and sends the abnormal information to the front end after login, so that users can be informed of storage system abnormalities in a timely manner.
[0070] In summary, firstly, the pre-caching system records user behavior and can summarize and calculate the frequency of information queried by a user logging into the storage system within a time period, storing each record in the user behavior data table. For example, if user A logs into the storage system m times within a time period T, and n of those times the user calls command a to query data a (user A sends command a), then the probability that user A will need to query data a the next time they log into the storage system can be calculated as n / m. In this case, user A, along with m / n / command a / (n / m), is recorded in the user behavior data table corresponding to user A. Secondly, the system monitors the status of the system, mainly including the status of key system data, including but not limited to: system alarm information, controller status, rack status, power supply status, fan status, etc., and records the information or status of monitored objects that may affect the normal operation of the system in the system anomaly data table. When this data is recorded, it is stored and updated in real time. When a user logs into the storage system, the critical data preloading processing system will proactively push this data to the management system and display it on the interface so that users can immediately understand any potential problems in the system. Third, user status is monitored. This step mainly involves timely binding of user data and adding and deleting users to dynamically adjust storage space. This includes monitoring existing users in the system, storing user information in a user table, and linking the user table with the user behavior data table. When data is detected as missing, deleting data from the user table also requires deleting the corresponding user behavior data table to free up unnecessary space.
[0071] After performing the aforementioned monitoring tasks, when a user logs into the system through the management software, the pre-caching system receives the login user information and first checks the system's abnormal data table for any abnormal information. If any is found, the abnormal information is returned to the management software without issuing a query request; the front-end can process the information and directly display it to the user, allowing the user to be aware of the system's anomaly immediately. Then, the system searches the user's behavior data table for related behavioral data and makes a judgment. If the probability of the user querying certain data is greater than P (the target probability), the pre-caching system directly sends a request to the storage to perform a data query, and then returns the query result to the front-end for caching. When the user needs the data, there is no need to query it again. Simultaneously, the pre-caching system continues to collect user behavior information during this login process to update the information in the data tables.
[0072] See Figure 3The diagram illustrates the data pre-caching method flowchart. Step 1: The pre-caching system receives user information from the login storage system. Step 2: It checks if there is any abnormal information in the system's abnormal data table. If so, proceed to Step 3; otherwise, proceed directly to Step 4. Step 3: The abnormal information is returned to the management software, which processes it and displays it directly to the user. Step 4: The system checks if the current user exists in the user data table. If yes, proceed to Step 5; otherwise, proceed to Step 9. Step 5: The system checks if the current user's behavior data table contains any behavior records. If yes, proceed to Step 6; otherwise, proceed to Step 9. Step 6: The system filters query commands in the user behavior data table whose query probability is greater than P (target probability). If yes, proceed to Step 7; otherwise, proceed to Step 9. Step 7: The system directly sends a query command to the storage to perform a data query. Step 8: The query results are returned to the front end for caching. Step 9: The process ends.
[0073] Accordingly, embodiments of this application also disclose a data pre-caching device, applied to a pre-caching processing system, see [link to relevant documentation]. Figure 4 As shown, the device includes:
[0074] The behavior information query module 11 is used to determine the target user who logs into the storage system and query whether there is behavior information in the user behavior data table corresponding to the target user; the behavior information includes several query commands and a preset probability of obtaining the query command corresponding to each query command; the query command is a command that the target user has sent to the storage system.
[0075] The target data sending module 12 is used to send the target command with a preset probability greater than the target probability to the storage system if it exists, and send the target data returned by the storage system to the front-end cache so that the target user can obtain the corresponding target data from the front-end cache after sending the target command.
[0076] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0077] As can be seen, this application identifies the target user who logs into the storage system and queries whether there is behavioral information in the user behavior data table corresponding to the target user; the behavioral information includes several query commands and a preset probability of obtaining the query command corresponding to each query command; the query command is a command that the target user has sent to the storage system; if it exists, the target command with the preset probability greater than the target probability is sent to the storage system, and the target data returned by the storage system is sent to the front-end cache, so that the target user can obtain the corresponding target data from the front-end cache after sending the target command. Therefore, this application stores the target data corresponding to target commands that the user has previously queried, and for which the preset probability of retrieving the query command is greater than the target probability, in the front-end cache. When the user subsequently sends a target command, the target data is directly retrieved from the front-end cache without having to query the storage system, thus improving the speed of retrieving the target data after sending the target command. In addition, this application only stores a portion of the data in the cache space, rather than storing all the data in the cache space, reducing cache waste caused by storing data that the user does not need in the cache space. Furthermore, the target data stored in the cache in this application is for all commands that the target user has previously sent to the storage system, and is determined by the preset probability and the target probability, making the stored data more targeted.
[0078] Furthermore, embodiments of this application also provide an electronic device. Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0079] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the data pre-caching method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0080] In this embodiment, the power supply 26 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 24 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0081] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored thereon may include computer programs 221, and the storage method may be temporary storage or permanent storage. The computer programs 221 may include, in addition to computer programs capable of performing the data pre-caching method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, computer programs capable of performing other specific tasks.
[0082] Furthermore, embodiments of this application also disclose a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed data pre-caching method.
[0083] For the specific steps of this method, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.
[0084] The various embodiments in this application are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. For the same or similar parts between the various embodiments, refer to each other. As for the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and relevant parts can be referred to the method section.
[0085] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0086] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0087] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0088] The above provides a detailed description of a data pre-caching method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data pre-caching method, characterized in that, Applications in pre-caching processing systems include: Identify the target user who logged into the storage system and query whether there is behavioral information in the user behavior data table corresponding to the target user; the behavioral information includes several query commands and a preset probability of obtaining each query command; the query command is a command that the target user has sent to the storage system. If it exists, the target command with a preset probability greater than the target probability is sent to the storage system, and the target data returned by the storage system is sent to the front-end cache, so that the target user can obtain the corresponding target data from the front-end cache after sending the target command; The step of querying whether behavioral information exists in the user behavior data table corresponding to the target user includes: Check if there is any abnormal information in the system abnormal data table indicating an abnormality in the storage system; If the abnormal information exists, the abnormal information is sent to the front end, and the system queries the user behavior data table corresponding to the target user to see if there is any behavior information. If the abnormal information does not exist, then directly query the user behavior data table corresponding to the target user to see if the behavior information exists; The preset probability of obtaining the query command is expected to include: Real-time statistics are collected on the first login count of the target user into the storage system within a preset time period, the number of query commands sent by the target user to the storage system, and the second login count of the target user sending the query command within the first login count for each query command. The ratio of the second login count to the first login count for each query command is calculated to obtain the preset probability of obtaining the query command for each query command. The first login count, several query commands, the second login count corresponding to each query command, and the preset probability corresponding to each query command are recorded as behavioral information in the user behavior data table corresponding to the target user; The method further includes: real-time monitoring of each user in the storage system; If the reduction of any old user is detected, delete the user information of the old user from the user table and delete the user behavior data table corresponding to the old user. If any new user is detected, the user information of the new user is added to the user table, and a user behavior data table corresponding to the new user is created.
2. The data pre-caching method according to claim 1, characterized in that, The step of determining the target user for logging into the storage system and querying whether behavioral information exists in the user behavior data table corresponding to the target user includes: Identify the target user who is logging into the storage system, and query the user table to see if the target user's information exists. If it exists, then query whether the behavior information exists in the user behavior data table corresponding to the target user.
3. The data pre-caching method according to claim 1, characterized in that, Also includes: The storage system is monitored in real time. If any device in the storage system is detected to have a fault, the device name and the fault are recorded, and the device name and the fault are stored as anomaly information in the system anomaly data table.
4. The data pre-caching method according to claim 3, characterized in that, After storing the device name and the fault error as exception information in the system exception data table, the method further includes: If the fault error is detected to have disappeared, the corresponding exception information in the system exception data table is deleted.
5. A data pre-caching device, characterized in that, Applications in pre-caching processing systems include: The behavior information query module is used to identify the target user who logs into the storage system and query whether there is behavior information in the user behavior data table corresponding to the target user; the behavior information includes several query commands and a preset probability of obtaining the query command corresponding to each query command; the query command is a command that the target user has sent to the storage system. The target data sending module is used to send the target command with a preset probability greater than the target probability to the storage system if it exists, and send the target data returned by the storage system to the front-end cache, so that the target user can obtain the corresponding target data from the front-end cache after sending the target command; The behavior information query module is specifically used to query whether there is any abnormal information indicating an abnormality in the system abnormality data table; if the abnormal information exists, the abnormal information is sent to the front end, and the module queries whether there is any behavior information in the user behavior data table corresponding to the target user; if the abnormal information does not exist, the module directly queries whether there is any behavior information in the user behavior data table corresponding to the target user. The data pre-caching device is further configured to: count in real time the first login count of the target user in the storage system, the number of query commands sent by the target user to the storage system, and the second login count of the target user sending the query command in the first login count for each query command within a preset time period; calculate the ratio of the second login count to the first login count for each query command to obtain the preset probability of obtaining the query command for each query command; and record the first login count, the number of query commands, the second login count for each query command, and the preset probability for each query command as behavioral information in the user behavior data table corresponding to the target user. The data pre-caching device is further configured to, if the reduction of any old user is detected, delete the user information of the old user in the user table and delete the user behavior data table corresponding to the old user; if the addition of any new user is detected, add the user information of the new user to the user table and create the user behavior data table corresponding to the new user.
6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the data pre-caching method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer program is executed by a processor, it implements the data pre-caching method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Storage system fault monitoring method and system
CN106169962A
Data preloading method and device, electronic equipment, medium and product
CN114491178A