Method, device, equipment and medium for determining cold data access information
By acquiring and managing cold data access information in a distributed storage system and using memory tables and database write processes to replace and count information, the problem of low efficiency in cold data storage management is solved, system stability and usability are improved, and the competitiveness of distributed products is enhanced.
Patent Information
- Application Number
- CN202211293043.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-21
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-10-21
AI Technical Summary
In existing technologies, cold data storage and management efficiency is low, system stability is poor, bandwidth and infrastructure costs are constantly increasing, data recovery and backup processes are complex, and slow hard disk and tape storage media are prone to failure.
By obtaining the target cold data access information, saving it to the local memory table and determining the storage information, using the database write process to replace and manage the information, creating a timer thread for periodic sending, and using the MDS in the distributed storage system to perform access information statistics.
It improves the efficiency of determining cold data access information, enhances system stability and ease of data management, reduces the impact on storage system performance, and enhances the competitiveness of distributed products.
Smart Images

Figure CN115587150B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of distributed storage, and in particular to a method, device, equipment and medium for determining cold data access information. Background Art
[0002] In the current era of big data, people's lives and work are becoming digitized. New data is generated constantly, and data is exploding exponentially. How to store, manage, and utilize this data is a challenge facing modern enterprises. Cold data is information that is infrequently accessed but cannot be deleted. Examples include the large amounts of information users store on social media, enterprise backup data, business and operational logs, call records, and statistical data. With existing technologies, bandwidth and infrastructure costs are constantly increasing, and these costs often require supporting more storage (even inexpensive storage) and larger files containing big data. More storage space requires more funding for processing, network, and personnel support resources. Furthermore, retaining multiple versions of large files complicates data recovery and backup processes. For rarely used or archived data, slow hard drives and tapes are the most commonly used storage media. Regularly testing disks and tapes to ensure they are functioning properly is crucial. Additionally, avoid relegating old drives and tapes to archiving and data backup functions—these resources still have a useful life, and if they are too old, they are more likely to fail.
[0003] As can be seen from the above, how to improve the stability of the system, improve the efficiency of cold data access information determination, and realize the statistics and management of cold data are problems to be solved in this field. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment, and medium for determining cold data access information, which can improve system stability, increase the efficiency of determining cold data access information, and realize the statistics and management of cold data. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a method for determining cold data access information, comprising:
[0006] Obtaining target cold data access information, saving the target cold data access information to a local memory table, and determining corresponding storage information;
[0007] Sending and saving the target cold data access information and the storage information to a local database writing process, so that the database writing process determines cold data writing information based on the target cold data access information and the storage information;
[0008] Historical cold data access information matching the target cold data access information is determined from a local database, and the historical cold data access information is replaced with the target cold data access information based on the cold data write information, so that when the client inputs data parameters, the target cold data access information matching the data parameters is determined from the database.
[0009] Optionally, obtaining target cold data access information includes:
[0010] Save the target cold data information to the preset relational database management system;
[0011] The client or the MDS in the distributed storage is used to perform access information statistics on the cold data in the relational database management system to obtain target cold data access information.
[0012] Optionally, the determining corresponding storage information; and sending and saving the target cold data access information and the storage information to a local database writing process include:
[0013] Determine corresponding storage information; wherein the storage information includes index node, storage path and storage time;
[0014] A timer thread is created, and the target cold data access information and the storage information are sent to a local database writing process through the timer thread according to a scheduled sending cycle, and are saved in the database writing process.
[0015] Optionally, creating a timer thread includes:
[0016] Creating an information statistics module and configuring parameters for the information statistics module according to business requirements to obtain the configured information statistics module;
[0017] The configured information statistics module is used to create a timer thread.
[0018] Optionally, the database writing process determines the cold data writing information based on the target cold data access information and the storage information, including:
[0019] A program is written using a preset database operation program to obtain an operation program, so that the database writing process calls a preset database table to decode the target cold data access information based on the storage information and using the operation program to obtain cold data writing information.
[0020] Optionally, after replacing the historical cold data access information with the target cold data access information based on the cold data write information, the method further includes:
[0021] Detecting whether all replacements are completed, and if all replacements are completed, generating receipt information indicating that the message writing is successful based on the cold data writing information;
[0022] A unique identifier is added to the receipt information, and the receipt information is sent to the information statistics module.
[0023] Optionally, when the client inputs data parameters, determining target cold data access information matching the data parameters from the database includes:
[0024] Establish a database connection pool;
[0025] When the client inputs data parameters, the target cold data access information matching the data parameters is determined from the database using the connections in the database connection pool.
[0026] In a second aspect, the present application discloses a device for determining cold data access information, comprising:
[0027] A target cold data access information acquisition module is used to acquire target cold data access information, save the target cold data access information to a local memory table, and determine corresponding storage information;
[0028] a cold data writing information determining module, configured to send and save the target cold data access information and the storage information to a local database writing process, so that the database writing process determines the cold data writing information based on the target cold data access information and the storage information;
[0029] A cold data write information replacement module is configured to determine historical cold data access information that matches the target cold data access information from a local database, and replace the historical cold data access information with the target cold data access information based on the cold data write information, so that when a client inputs data parameters, the target cold data access information that matches the data parameters is determined from the database.
[0030] In a third aspect, the present application discloses an electronic device, comprising:
[0031] Memory, used to store computer programs;
[0032] The processor is configured to execute the computer program to implement the aforementioned method for determining cold data access information.
[0033] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned method for determining cold data access information are implemented.
[0034] It can be seen that the present application provides a method for determining cold data access information, including obtaining target cold data access information, saving the target cold data access information to a local memory table, and determining corresponding storage information; sending and saving the target cold data access information and the storage information to a local database write process, so that the database write process determines the cold data write information based on the target cold data access information and the storage information; determining historical cold data access information that matches the target cold data access information from a local database, and replacing the historical cold data access information with the target cold data access information based on the cold data write information, so that when the client inputs data parameters, the target cold data access information that matches the data parameters is determined from the database. The present application is applied to a storage system, and file cold data statistics is an additional function outside the storage system. When implemented, the impact on the performance of the storage system itself should be reduced. In a distributed storage system, hot and cold data statistics are performed to facilitate data management, thereby improving the robustness, usability, and richness of functions of the system and enhancing the competitiveness of distributed products. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0036] Figure 1 This is a flow chart of a method for determining cold data access information disclosed in this application;
[0037] Figure 2 This is a specific flow chart of a method for determining cold data access information disclosed in this application;
[0038] Figure 3 This is a flow chart of a method for determining cold data access information disclosed in this application;
[0039] Figure 4 This is a specific flow chart of a method for determining cold data access information disclosed in this application;
[0040] Figure 5 This is a specific flow chart of a method for determining cold data access information disclosed in this application;
[0041] Figure 6 This is a schematic diagram of the structure of a cold data access information determination device disclosed in this application;
[0042] Figure 7 This is a structural diagram of an electronic device provided in this application. DETAILED DESCRIPTION
[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0044] In the current era of big data, people's lives and work are becoming digitized. New data is generated constantly, and data is exploding exponentially. How to store, manage, and utilize this data is a challenge facing modern enterprises. Cold data is information that is infrequently accessed but cannot be deleted. Examples include the large amounts of information users store on social media, enterprise backup data, business and operational logs, call records, and statistical data. With existing technologies, bandwidth and infrastructure costs are constantly increasing, and these costs often require supporting more storage (even inexpensive storage) and larger files containing big data. More storage space requires more funding for processing, network, and personnel support resources. Furthermore, retaining multiple versions of large files complicates data recovery and backup processes. For rarely used or archived data, slow hard drives and tapes are the most commonly used storage media. Regularly testing disks and tapes to ensure they are functioning properly is crucial. Additionally, avoid relegating old drives and tapes to archiving and data backup functions—these resources still have a useful life, and if they are too old, they are more likely to fail. As can be seen from the above, how to improve the stability of the system, improve the efficiency of cold data access information determination, and realize the statistics and management of cold data are problems to be solved in this field.
[0045] See also Figure 1 As shown, an embodiment of the present invention discloses a method for determining cold data access information, which may specifically include:
[0046] Step S11: obtaining target cold data access information, saving the target cold data access information to a local memory table, and determining corresponding storage information.
[0047] In this embodiment, the target cold data information is saved in a preset relational database management system; the MDS in the client or distributed storage is used to perform access information statistics on the cold data in the relational database management system to obtain the target cold data access information, and then the target cold data access information is saved in a local memory table, and the corresponding storage information is determined.
[0048] Step S12: sending and saving the target cold data access information and the storage information to a local database writing process, so that the database writing process determines cold data writing information based on the target cold data access information and the storage information.
[0049] In this embodiment, after the target cold data access information is saved to the local memory table, the corresponding storage information is determined; wherein the storage information includes the index node, storage path and storage time, and then a timer thread is created, and the target cold data access information and the storage information are sent to the local database writing process through the timer thread according to the timed sending cycle, and saved to the database writing process, so that the database writing process determines the cold data writing information based on the target cold data access information and the storage information.
[0050] Specifically, the steps for creating a timer thread are as follows: creating an information statistics module, and configuring parameters for the information statistics module according to business requirements to obtain the configured information statistics module; and creating a timer thread using the configured information statistics module.
[0051] Step S13: historical cold data access information matching the target cold data access information is determined from a local database, and the historical cold data access information is replaced with the target cold data access information based on the cold data write information, so that when the client inputs data parameters, the target cold data access information matching the data parameters is determined from the database.
[0052] In this embodiment, after determining the historical cold data access information that matches the target cold data access information from the local database, it is detected whether all replacements are completed. If all replacements are completed, receipt information is generated based on the cold data write information to indicate that the message is successfully written; a unique identifier is added to the receipt information, and the receipt information is sent to the information statistics module, so that when the client inputs data parameters, the target cold data access information that matches the data parameters is determined from the database.
[0053] This application is applied to the storage system. File cold data statistics is an additional function outside the storage system. When implemented, the impact on the performance of the storage system itself should be reduced. Therefore, it is more suitable to be implemented as an external application. The plan includes the following components: database component, information statistics component, database operation program, and database query program, such as Figure 2As shown in the figure, these components support optimized storage system data management. Database component: The external component uses a MySQL database to store cold file data. Information statistics component: This component collects statistics about file accesses on the client or MDS and stores them in a memory table. This data is periodically sent over the network to the database operation program based on time or number of records for storage. Database operation program: A standalone program is written to receive data from the information statistics component and manipulate the corresponding database tables based on data type.
[0054] In this embodiment, target cold data access information is obtained, the target cold data access information is saved to a local memory table, and corresponding storage information is determined; the target cold data access information and the storage information are sent and saved to a local database write process, so that the database write process determines cold data write information based on the target cold data access information and the storage information; historical cold data access information that matches the target cold data access information is determined from the local database, and the historical cold data access information is replaced with the target cold data access information based on the cold data write information, so that when the client inputs data parameters, the target cold data access information that matches the data parameters is determined from the database. This application is applied to storage systems, and file cold data statistics is an additional function outside the storage system. When implemented, the impact on the performance of the storage system itself should be reduced. In distributed storage systems, hot and cold data statistics are performed to facilitate data management, thereby improving the robustness, usability, and richness of functions of the system and enhancing the competitiveness of distributed products.
[0055] See also Figure 3 As shown, an embodiment of the present invention discloses a method for determining cold data access information, which may specifically include:
[0056] Step S21: obtaining target cold data access information, saving the target cold data access information to a local memory table, and determining corresponding storage information.
[0057] Step S22: Send and save the target cold data access information and the storage information to a local database writing process, and use a preset database operation program to write a program to obtain an operation program, so that the database writing process can call a preset database table based on the storage information and use the operation program to decode the target cold data access information to obtain cold data writing information.
[0058] Step S23: historical cold data access information matching the target cold data access information is determined from a local database, the historical cold data access information is replaced with the target cold data access information based on the cold data write information, a database connection pool is established, and when the client inputs data parameters, the target cold data access information matching the data parameters is determined from the database using a connection in the database connection pool.
[0059] In this embodiment, the processing flow for accessing cold data in the distributed storage system is mainly divided into three modules: an information statistics module, a database writing module, and a database query module. First, the configuration steps of the information statistics module are as follows: the statistics function is turned on, and the configuration parameter access_statis_op is 0 by default. The file statistics function on the MDS side is not turned on. The function means: 0 is to turn off the statistics function, 1 is to count the open operation, 2 is to count the create operation, 4 is to count the delete operation, and 8 is to count the attr operation. Multiple operations are supported in combination. If the statistics function is turned on, at least 1, 2, and 4 operations must be supported, that is, the configuration is 7. Then the statistics timer sending cycle access_send_interval is 5 by default. Then 3 classes need to be designed: file access object class, which stores the basic information of the file (inode, path, access time, operation type), file access management class (responsible for external interaction), and timer class (regularly sending data to the database operation program). Then create a timer thread, and send the data in the file statistics memory table to the database write process regularly according to the configured sending interval (default 5s). The database write process stores the data in the database and saves the data sent this time. When the database operation process successfully processes and responds, it will be deleted. The specific process is as follows Figure 4 As shown, it is determined whether the above-mentioned statistical function is turned on. If it is turned on, the data class object is accessed, and then the target cold data access information and the storage information are sent to the local database write process through the timer thread according to the timed sending cycle, and saved to the database write process. The database write module needs to pre-build a database connection pool in advance. When accessing the database in the future, the connection in the connection pool is directly used to improve the access performance of the database. The database write module is used for the database write process to decode the target cold data access information based on the storage information and using the operating procedure to obtain the cold data write information. The specific process is as follows Figure 5As shown, the database connection pool is initialized first, and then it is determined whether the target cold data access information (i.e., file operation information) is obtained. If it is obtained, the file access information is decoded to obtain the cold data write information. After the message is successfully written to the database, a message receipt is sent to the statistics module to inform the statistics module of the message ID of the completion of this write. The database table structure is shown in Table 1:
[0060] Table 1
[0061] Field type meaning inode 64-bit integer, primary key File inode access_count 64-bit integer Number of visits history_table_name String(256) The name of the corresponding historical operation record table
[0062] In this embodiment, historical cold data access information that matches the target cold data access information is determined from a local database, and the historical cold data access information is replaced with the target cold data access information based on the cold data write information. Specifically, the database adopts a sub-library and sub-table model, with a total of 20 libraries, DBStore_0000, ..., DBStore_0019. All tables are hashed into the 20 libraries according to the rule of the table suffix modulo 20: For the basic information table, it is divided into 2000 sub-tables, and the naming rule is the "file_access_base_" prefix plus a 4-digit suffix: file_access_base_0000, file_access_base_0001, ..., file_access_base_1999. The addressing rule is inode%2000, which is used to find the corresponding subtable. For the history record table, there is no limit on the number of subtables. The naming rule is "file_access_history_" prefixed with the date suffix: file_access_history_20170515, file_access_history_20170516, etc. The addressing rule is history_table_name in the basic information table, which is used to find the corresponding subtable. The history record table file_access_history is shown in Table 2, and the rename operation record table mv_operation is shown in Table 3:
[0063] Table 2
[0064] Field type meaning path 64-bit integer, primary key File inode access_count String(2048) The path to the file operation_type Integer File operation type uid Short integer User ID gid Short integer User group id time Timestamp Latest operation time
[0065] Table 3
[0066] Field type meaning id 64-bit integer, primary key File inode inode 64-bit integer File inode oldpath String(2048) Old file path newpath String(2048) New file path time Timestamp Latest operation time
[0067] For example, let's look up the information in the basic table for inode 9999: based on inode%2000, we get the basic information table number 1999, so the table name is file_access_base_1999; based on the basic table number 1999, we get the library number 1999%20=19, so the library name is DBStore_0019; based on the metadata table, we select the IP address and port number of the database instance where the DBStore_0019 library resides; based on the instance IP address and port number, we connect to the corresponding instance; because both the library "DBStore_0019" and the table "file_access_base_1999" are on this instance, we can simply execute the SQL statement: useDBStore_0019;
[0068] select*from file_access_base_1999where inode=9999;
[0069] The correspondence between specific libraries and instances is shown in Table 4:
[0070] Table 4
[0071]
[0072]
[0073] The specific write process involves updating the basic information table and the history table. Based on the inode, the access_count in the basic information table is incremented and the history_table_name in the basic information table is updated. Based on the operation type, the history table is updated. If the operation is a delete, the corresponding record is deleted from both the history table and the basic information table. If the operation is a create, open, or file rename, the basic information table is updated, the record in the old history table is deleted, and the latest record is written to the new history table. If the operation is a directory rename and the destination directory already exists, the operation is first recorded in the mv_operation table, and then an asynchronous update begins. Following the above procedure, the source directory entry is updated and the destination directory entry is deleted. Simultaneously, all history tables are traversed to rename the entries of its child files or directories. If the operation is a directory rename and the destination directory does not exist, the operation is first recorded in the mv_operation table, and then an asynchronous update begins. Following the above procedure, the source directory entry is updated and the destination directory entry is deleted. Simultaneously, all history tables are traversed to rename the entries of its child files or directories. After the message is successfully written to the database, a message receipt is sent to the statistics module, informing the statistics module of the message ID of the completed write. The data query program is used to determine the target cold data access information that matches the data parameters from the database when the client enters the data parameters, and parse the client's data parameters, that is, parse the command line parameters entered by the user. Command format: file-access-queryclusterConfigFile strTimeEnd recordCount outFilePath[sortType]
[0074] Parameter Description: file-access-query: query program name; clusterConfigFile: configuration file path; strTimeEnd: deadline; recordCount: number of records to export; outFilePath: export result file path; sortType: sorting method (optional). T: sort by time, u: sort by user ID, g: sort by user group ID, and p: sort by path. Query the database for data within the time range specified in the command line. If sorting is specified, the results are sorted. Finally, clear the export file specified in the command line and output the query results to the export file.
[0075] The functional description of the above modules is shown in Table 5:
[0076] Table 5
[0077]
[0078]
[0079] In this embodiment, target cold data access information is obtained, the target cold data access information is saved to a local memory table, and corresponding storage information is determined; the target cold data access information and the storage information are sent and saved to a local database write process, so that the database write process determines cold data write information based on the target cold data access information and the storage information; historical cold data access information that matches the target cold data access information is determined from the local database, and the historical cold data access information is replaced with the target cold data access information based on the cold data write information, so that when the client inputs data parameters, the target cold data access information that matches the data parameters is determined from the database. This application is applied to storage systems, and file cold data statistics is an additional function outside the storage system. When implemented, the impact on the performance of the storage system itself should be reduced. In distributed storage systems, hot and cold data statistics are performed to facilitate data management, thereby improving the robustness, usability, and richness of functions of the system and enhancing the competitiveness of distributed products.
[0080] See also Figure 6 As shown, an embodiment of the present invention discloses a device for determining cold data access information, which may specifically include:
[0081] The target cold data access information acquisition module 11 is used to acquire target cold data access information, save the target cold data access information to a local memory table, and determine corresponding storage information;
[0082] a cold data writing information determining module 12, configured to send and save the target cold data access information and the storage information to a local database writing process, so that the database writing process determines the cold data writing information based on the target cold data access information and the storage information;
[0083] The cold data writing information replacement module 13 is configured to determine historical cold data access information that matches the target cold data access information from a local database, and replace the historical cold data access information with the target cold data access information based on the cold data writing information, so that when the client inputs data parameters, the target cold data access information that matches the data parameters is determined from the database.
[0084] In this embodiment, target cold data access information is obtained, the target cold data access information is saved to a local memory table, and corresponding storage information is determined; the target cold data access information and the storage information are sent and saved to a local database write process, so that the database write process determines cold data write information based on the target cold data access information and the storage information; historical cold data access information that matches the target cold data access information is determined from the local database, and the historical cold data access information is replaced with the target cold data access information based on the cold data write information, so that when the client inputs data parameters, the target cold data access information that matches the data parameters is determined from the database. This application is applied to storage systems, and file cold data statistics is an additional function outside the storage system. When implemented, the impact on the performance of the storage system itself should be reduced. In distributed storage systems, hot and cold data statistics are performed to facilitate data management, thereby improving the robustness, usability, and richness of functions of the system and enhancing the competitiveness of distributed products.
[0085] In some specific embodiments, the target cold data access information acquisition module 11 may specifically include:
[0086] A target cold data information saving module is used to save the target cold data information to a preset relational database management system;
[0087] The access information statistics module is used to perform access information statistics on the cold data in the relational database management system using the MDS in the client or distributed storage to obtain target cold data access information.
[0088] In some specific embodiments, the target cold data access information acquisition module 11 may specifically include:
[0089] A storage information determination module, configured to determine corresponding storage information; wherein the storage information includes an index node, a storage path, and a storage time;
[0090] The timer thread creation module is used to create a timer thread, send the target cold data access information and the storage information to the local database writing process through the timer thread according to the timed sending cycle, and save them to the database writing process.
[0091] In some specific embodiments, the cold data writing information determining module 12 may specifically include:
[0092] A configuration parameter module is used to create an information statistics module and configure parameters for the information statistics module according to business requirements to obtain the configured information statistics module;
[0093] A timer thread creation module is used to create a timer thread using the configured information statistics module.
[0094] In some specific embodiments, the cold data writing information determining module 12 may specifically include:
[0095] The decoding module is used to use a preset database operation program to write a program to obtain an operation program, so that the database writing process can call a preset database table based on the storage information and use the operation program to decode the target cold data access information to obtain cold data writing information.
[0096] In some specific embodiments, the cold data writing information replacement module 13 may specifically include:
[0097] a detection module, configured to detect whether all replacements are completed, and if so, to generate receipt information indicating successful message writing based on the cold data writing information;
[0098] The unique identification adding module is used to add a unique identification to the receipt information, and send the receipt information to the information statistics module.
[0099] In some specific embodiments, the cold data writing information replacement module 13 may specifically include:
[0100] Connection pool establishment module, used to establish a database connection pool;
[0101] The target cold data access information determination module is configured to determine the target cold data access information matching the data parameters from the database using the connections in the database connection pool when the client inputs data parameters.
[0102] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the method for determining cold data access information performed by the electronic device as disclosed in any of the aforementioned embodiments.
[0103] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0104] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon include an operating system 221, a computer program 222 and data 223, etc. The storage method can be temporary storage or permanent storage.
[0105] The operating system 221 is used to manage and control the hardware devices and computer program 222 on the electronic device 20, enabling the processor 21 to operate and process data 223 in the memory 22. The operating system 221 may be Windows, Unix, Linux, or other operating systems. In addition to including computer programs capable of performing the cold data access information determination method disclosed in any of the aforementioned embodiments and executed by the electronic device 20, the computer program 222 may further include computer programs capable of performing other specific tasks. The data 223 may include data transmitted from external devices and received by the cold data access information determination device, as well as data collected by its own input / output interface 25.
[0106] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0107] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is loaded and executed by a processor, the steps of the method for determining cold data access information disclosed in any of the aforementioned embodiments are implemented.
[0108] Finally, it should be noted that, in this document, 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 actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device 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 device. 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 device comprising the element.
[0109] The above describes in detail a method, apparatus, device, and storage medium for determining cold data access information provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method and core concept of the present invention. At the same time, for those skilled in the art, based on the concept of the present invention, there may be changes in the specific implementation methods and application scope. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A method for determining cold data access information, characterized in that: Applied to storage systems, including: Obtaining target cold data access information, saving the target cold data access information to a local memory table, and determining corresponding storage information; Sending and saving the target cold data access information and the storage information to a local database writing process, so that the database writing process determines cold data writing information based on the target cold data access information and the storage information; determining historical cold data access information that matches the target cold data access information from a local database, and replacing the historical cold data access information with the target cold data access information based on the cold data write information, so that when a client inputs data parameters, the target cold data access information that matches the data parameters is determined from the database; Obtaining target cold data access information includes: saving the target cold data information to a preset relational database management system; and performing access information statistics on the cold data in the relational database management system using a client or an MDS in a distributed storage to obtain the target cold data access information.
2. The method for determining cold data access information according to claim 1, wherein: The process of determining the corresponding storage information and sending and saving the target cold data access information and the storage information to a local database write process includes: Determine corresponding storage information; wherein the storage information includes index node, storage path and storage time; A timer thread is created, and the target cold data access information and the storage information are sent to a local database writing process through the timer thread according to a scheduled sending cycle, and are saved in the database writing process.
3. The method for determining cold data access information according to claim 2, wherein: The step of creating a timer thread includes: Creating an information statistics module and configuring parameters for the information statistics module according to business requirements to obtain the configured information statistics module; The configured information statistics module is used to create a timer thread.
4. The method for determining cold data access information according to claim 1, wherein: The database writing process determines the cold data writing information based on the target cold data access information and the storage information, including: A program is written using a preset database operation program to obtain an operation program, so that the database writing process calls a preset database table to decode the target cold data access information based on the storage information and using the operation program to obtain cold data writing information.
5. The method for determining cold data access information according to claim 3, wherein: After replacing the historical cold data access information with the target cold data access information based on the cold data write information, the method further includes: Detecting whether all replacements are completed, and if all replacements are completed, generating receipt information indicating that the message writing is successful based on the cold data writing information; A unique identifier is added to the receipt information, and the receipt information is sent to the information statistics module.
6. The method for determining cold data access information according to any one of claims 1 to 5, characterized in that: When the client inputs data parameters, determining target cold data access information matching the data parameters from the database includes: Establish a database connection pool; When the client inputs data parameters, the target cold data access information matching the data parameters is determined from the database using the connections in the database connection pool.
7. A device for determining cold data access information, characterized in that: Applied to storage systems, including: A target cold data access information acquisition module is used to acquire target cold data access information, save the target cold data access information to a local memory table, and determine corresponding storage information; a cold data writing information determining module, configured to send and save the target cold data access information and the storage information to a local database writing process, so that the database writing process determines the cold data writing information based on the target cold data access information and the storage information; a cold data writing information replacement module, configured to determine historical cold data access information matching the target cold data access information from a local database, and replace the historical cold data access information with the target cold data access information based on the cold data writing information, so that when a client inputs data parameters, the target cold data access information matching the data parameters is determined from the database; Obtaining target cold data access information includes: saving the target cold data information to a preset relational database management system; and performing access information statistics on the cold data in the relational database management system using a client or an MDS in a distributed storage to obtain the target cold data access information.
8. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method for determining cold data access information according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Used to store a computer program; wherein, when the computer program is executed by a processor, the method for determining cold data access information according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Database storage cold and hot separation method, device and equipment and readable storage medium
CN114860726A
Data processing method and device, equipment and storage medium
CN115080605A