Data processing methods, apparatus, electronic devices, readable storage media and products
By backing up cold data to a hot data storage area and outputting it from the hot data area, the inefficiency and high power consumption caused by frequent retrieval of cold data storage area are solved, achieving more efficient data acquisition and reducing storage costs.
Patent Information
- Application Number
- CN202410288584.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-03-13
AI Technical Summary
In existing technologies, frequent data retrieval from cold data storage areas leads to slow read/write speeds and high power consumption, affecting data storage efficiency and cost.
Part of the data in the cold data storage area is backed up to the hot data storage area, and data is output from the hot data storage area after receiving a data request instruction, thereby reducing data acquisition time and computing power consumption.
It improves the efficiency of cold data acquisition and output, reduces data storage power consumption, reduces computing power waste, and optimizes storage costs.
Smart Images

Figure CN118819397B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data technology, and in particular relates to a data processing method, apparatus, electronic device, readable storage medium and product. Background Technology
[0002] With the rapid development of Internet technology in my country, telecommunications operators are also expanding rapidly. The digital information generated by operators is showing an explosive growth trend, the amount of data generated is getting bigger and bigger, and the demand for large-scale data storage is becoming stronger and stronger.
[0003] To store large amounts of data more efficiently and at lower cost, dividing data into hot and cold data and storing them separately is a new data storage approach. Hot data refers to data that is frequently accessed and critical to business and applications. This data typically requires fast and efficient acquisition and processing, therefore it needs to be stored on high-performance, low-latency, and fast-read / write storage devices, such as solid-state drives (SSDs) and flash memory. Cold data refers to data that is accessed less frequently and is less important to business and applications; this may be historical or archived data. This data usually needs to be stored long-term but does not require frequent access and processing, therefore it can be stored on lower-cost, larger-capacity, and slower-read / write storage devices, such as tape libraries and hard disks.
[0004] Therefore, in existing technologies, hot data is stored in a hot data storage area that can be read and written quickly, while cold data is stored in a cold data storage area with slower read and write speeds. However, in actual implementation, there is a need for frequent retrieval of cold data in the cold data storage area within a certain period of time. The slower read and write speed of the cold data storage area causes significant inconvenience when retrieving data. Furthermore, since retrieving data from the cold data storage area takes longer and consumes more computing power than retrieving data from the hot data storage area, the power consumption is higher. Therefore, frequent retrieval of data from the cold data storage area will increase the power consumption of data storage. Summary of the Invention
[0005] This application provides a data processing method, apparatus, electronic device, readable storage medium, and product that can improve the efficiency of cold data acquisition and output, and reduce data storage power consumption.
[0006] On one hand, embodiments of this application provide a data processing method, the method comprising:
[0007] Receive the first instruction, which is used to request the acquisition of the first data;
[0008] In response to the first instruction, if it is determined that the first data is cold data, at least a portion of the first data in the cold data storage area is backed up to the hot data storage area;
[0009] Receive the second instruction, which is used to request the first data;
[0010] If the interval between the second instruction and the first instruction is less than a first preset time, in response to the second instruction, at least a portion of the first data in the hot data storage area is output so that the user can obtain at least a portion of the first data.
[0011] On the other hand, embodiments of this application provide a data processing apparatus, the apparatus comprising:
[0012] The first receiving module is used to receive a first instruction, which is used to request the acquisition of first data.
[0013] A backup module is configured to, in response to a first instruction, back up at least a portion of the first data in the cold data storage area to the hot data storage area if it is determined that the first data is cold data.
[0014] The second receiving module is used to receive a second instruction, which is used to request the acquisition of the first data.
[0015] The output module is configured to, in response to the second instruction, output at least a portion of the first data in the hot data storage area when the receiving interval between the second instruction and the first instruction is less than a first preset time, so that the user can obtain at least a portion of the first data.
[0016] In another aspect, embodiments of this application provide an electronic device, which includes: a processor and a memory storing computer program instructions;
[0017] The processor implements the above data processing method when executing computer program instructions.
[0018] In another aspect, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the aforementioned data processing method.
[0019] In another aspect, embodiments of this application provide a computer program product in which instructions are executed by the processor of an electronic device, enabling the electronic device to perform the aforementioned data processing method.
[0020] The data processing method, apparatus, electronic device, readable storage medium, and product of this application embodiment are capable of receiving a first instruction for requesting to obtain first data, and in response to the first instruction, backing up at least a portion of the first data in the cold data storage area to the hot data storage area when it is determined that the first data is cold data, and then receiving a second instruction for requesting to obtain the first data. If the receiving interval between the second instruction and the first instruction is less than a preset time, at least a portion of the first data in the hot data storage area is output in response to the second instruction so that the user can obtain at least a portion of the first data. Therefore, in this application, when the first instruction requests the acquisition of cold data, at least a portion of the first data is first backed up from the cold data storage area to the hot data storage area. After receiving the second instruction, if the reception interval between the second instruction and the first instruction is less than a first preset time, at least a portion of the first data is acquired from the hot data storage area. Thus, by first backing up at least a portion of the first data in the cold data storage area to the hot data storage area, the data in the hot data storage area, which has faster read and write speeds, can be directly output to the user, improving the efficiency of acquiring and outputting cold data. Moreover, acquiring and outputting cold data from the hot data storage area takes less time and consumes less computing power than acquiring and outputting cold data from the cold data storage area, thereby reducing data storage power consumption. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a schematic diagram of the structure of a data processing method provided in an embodiment of this application;
[0023] Figure 2 This is a schematic diagram of a data location index provided in an embodiment of this application;
[0024] Figure 3 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application;
[0025] Figure 4 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;
[0026] Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0028] It should be noted that, in this document, relational terms such as "first" and "second" are used merely 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..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0029] To address the problems of existing technologies, embodiments of this application provide a data processing method, apparatus, electronic device, readable storage medium, and product. The method of this application can be applied to one device or multiple devices. When the method of this application is applied to one device, both a cold data storage area and a hot data storage area are integrated on that device, and the user can obtain data from the cold and hot data storage areas through operation. When the method of this application is applied to multiple devices, the cold data storage area exists as one storage device, and the hot data storage area also exists as one storage device. The user sends instructions to the cold and hot data storage areas by operating another operating device, and obtains data from the cold and hot data storage areas through interaction. The data processing method provided by the embodiments of this application will be described first below.
[0030] Figure 1 This document illustrates a flowchart of a data processing method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps:
[0031] S101: Receive the first instruction, which is used to request the acquisition of the first data.
[0032] In some embodiments of this application, the first data can be a file, image, string, etc., and the first instruction can include identification information related to the first data or the storage path of the first data, for example, the identification information related to the first data can be a file name, etc. When the method of this application is applied to a device, the user sends instructions to the cold data storage area and hot data storage area of the device through operation, that is, the recipient of the first instruction can be the cold data storage area or the hot data storage area; when the method of this application is applied to multiple devices, the user sends instructions to the cold data storage device and the hot data storage device through operation of the device, that is, the recipient of the first instruction can be the cold data storage device or the hot data storage device.
[0033] For example, if a user wants to open file A, the user sends a first command to open file A, and the system determines that the file the user wants to obtain is file A by receiving the file name carried in the first command sent by the user.
[0034] S102: In response to the first instruction, if it is determined that the first data is cold data, at least a portion of the first data in the cold data storage area is backed up to the hot data storage area.
[0035] In some embodiments of this application, each data corresponds to a data attribute label, which includes a cold data label and a hot data label. The data of the cold data label is stored in the cold data storage area, and the data of the hot data label is stored in the hot data storage area.
[0036] In some embodiments, the data to be acquired can be determined first by the data identification information carried in the first instruction, and then the data can be determined as cold data or hot data by the data tag attribute corresponding to the data.
[0037] In other embodiments, the storage area of the data can be determined by the storage path of the data carried in the first instruction, thereby determining whether the data is cold or hot data.
[0038] If it is cold data, it will be backed up to the hot data storage area. The hot data storage area can contain a backup transition area. The backup transition area is characterized by small space and temporary storage. If the size of the first data exceeds the threshold, only a portion of the first data will be stored in the backup transition area of the hot data storage area.
[0039] In other embodiments, this application can also back up at least a portion of the first data in the cold data storage area to the hot data storage area by internal copying, and the hot data storage area and the cold data storage area have the characteristic of being able to store data for a long time.
[0040] S103: Receive the second instruction, which is used to request the acquisition of the first data.
[0041] In some embodiments of this application, the contents of the first instruction and the second instruction may be the same, that is, the information carried may be the same, but the triggering conditions are different, and the second instruction must be triggered after the first instruction is triggered.
[0042] In one example, when a user clicks on file A, a first instruction is sent to request file A. This first instruction includes the filename or storage path of file A. In response to the first instruction, the system displays file A's attributes to the user, such as file size and creator. Simultaneously, if file A is cold data, at least a portion of its data is backed up from the cold data storage area to the hot data storage area. If file A is hot data, this backup operation is unnecessary. After viewing file A's attributes, if the user wishes to continue requesting file A, a second instruction is sent to retrieve at least a portion of file A's data from the hot data storage area. The second instruction can be triggered by the user clicking the "Confirm Retrieve File A" button on the operation page, clicking file A again, or a pop-up window appearing on the operation page after the user views file A's attributes, asking the user whether to retrieve file A. No restrictions are placed on this.
[0043] S104: If the reception interval between the second instruction and the first instruction is less than the first preset time, in response to the second instruction, at least a portion of the first data in the hot data storage area is output so that the user can obtain at least a portion of the first data.
[0044] In some embodiments of this application, the process of outputting at least a portion of the first data in the hot data storage area can be as follows: cold data can be stored on a cold data storage device, which serves as the cold data storage area; hot data can be stored on a hot data storage device, which also serves as the hot data storage area; users can operate on a server; the server is connected to the hot data storage device and the cold data storage device; the server, the hot data storage device, and the cold data storage device can be considered as a system; users send instructions to the hot data storage device and the cold data storage device through the server to obtain cold data or hot data; the hot data storage device and the cold data storage device respond to the user's instructions and output the cold data or hot data to the user's server, for example: displaying the cold data or hot data on the server's monitor; or copying the cold data or hot data to the clipboard, and the user obtains the cold data or hot data by pasting, etc.
[0045] In other embodiments, data in the hot and cold data storage devices can also be obtained through interaction between the server and the hot and cold data storage devices.
[0046] Understandably, in this embodiment, a first instruction for requesting the acquisition of first data can be received, and in response to the first instruction, if the first data is determined to be cold data, at least a portion of the first data in the cold data storage area is backed up to the hot data storage area. Then, a second instruction for requesting the acquisition of the first data is received. If the interval between the second instruction and the first instruction is less than a preset time, at least a portion of the first data in the hot data storage area is output in response to the second instruction, so that the user can acquire at least a portion of the first data. Therefore, in this application, when the first instruction requests the acquisition of cold data, at least a portion of the first data is first backed up from the cold data storage area to the hot data storage area. After receiving the second instruction, if the interval between the second instruction and the first instruction is less than a first preset time, at least a portion of the first data is acquired from the hot data storage area. Therefore, by first backing up at least a portion of the first data in the cold data storage area to the hot data storage area, the data in the hot data storage area, which has faster read / write speeds, is directly output to the user, improving the efficiency of acquiring and outputting cold data. Furthermore, acquiring and outputting cold data from the hot data storage area takes less time and consumes less computing power than acquiring and outputting cold data from the cold data storage area, thus reducing data storage power consumption.
[0047] In other embodiments of this application, in response to a first instruction, if it is determined that the first data is cold data, at least a portion of the first data in the cold data storage area is backed up to the hot data storage area, including:
[0048] If the size of the first data exceeds the first threshold, a portion of the first data is retrieved from the cold data storage area.
[0049] Back up a portion of the first data to the hot data storage area;
[0050] After receiving the second instruction, the method also includes:
[0051] The second data in the cold data storage area is backed up to the hot data storage area. The second data is the remaining data other than part of the first data.
[0052] In this embodiment, if the first data requested by the first instruction is cold data, the cold data is first stored in the backup transition area of the hot data storage area. Since the backup transition area has the characteristics of small space and temporary storage, the data size of the first data will be determined. If the data size of the first data is greater than the threshold, only part of the first data will be stored in the backup transition area of the hot data storage area, and the cold data stored in the hot data storage area will be used as the first pre-accessed cold data. The content of the beginning segment of the first data can be separated and backed up to the backup transition area.
[0053] In one example, upon receiving a second instruction, if a portion of the first data in the backup transition area is output to the user, the remaining data of the first data is backed up to the backup transition area as the second pre-access cold data. After all the data of the first data is output to the user, the remaining data of the first data is then output to the user, so that the user can obtain all the data of the first data in the hot data storage area.
[0054] In another example, upon receiving the second instruction, the remaining data of the first data is backed up to the hot data storage area, and all the data of the first data in the hot data storage area is output to the user at once, so that the user can obtain all the data of the first data in the hot data storage area.
[0055] Understandably, in this embodiment, if the size of the first data exceeds a threshold, a portion of the first data can be backed up to the hot data storage area first. Then, after receiving the second instruction, the entire first data can be backed up, allowing all data in the hot data storage area to be output to the user. If the size of the first data exceeds the threshold, and the user sends the first instruction, assuming the entire first data is backed up to the hot data storage area, but the user ultimately doesn't send the second instruction, the computing power used to back up the entire first data to the hot data storage area will be wasted. To reduce this waste, a portion of the first data can be backed up to the hot data storage area first, and then the entire first data can be backed up after receiving the second instruction. That is, the entire first data is only backed up to the hot data storage area after it's determined that the user needs to obtain the first data, thus reducing computing power waste. Furthermore, by storing the requested data in segments in the hot data storage area and implementing step-by-step backup according to the second instruction, the data acquisition and output speeds can be improved.
[0056] In some other embodiments of this application, the method further includes, before receiving the first instruction:
[0057] Retrieve the storage location information of all data, including all cold data in the cold data storage area and all hot data in the hot data storage area;
[0058] Generate location indexes for each piece of data based on storage location information;
[0059] Generate corresponding data attribute labels based on the storage data attributes of each data item;
[0060] Establish the association between the data attribute labels and location indexes of each data item;
[0061] Upon receiving the first instruction, and in response to the first instruction, before backing up at least a portion of the first data in the cold data storage area to the hot data storage area if it is determined that the first data is cold data, the method further includes:
[0062] Determine the data attribute label corresponding to the first data;
[0063] In response to the first instruction, the stored data attributes corresponding to the data attribute tags are displayed so that the user can determine whether the data corresponding to the stored data attributes is the data that needs to be retrieved.
[0064] In response to the first instruction, if it is determined that the first data is cold data, at least a portion of the first data in the cold data storage area is backed up to the hot data storage area, including:
[0065] Determine the position index associated with the data attribute label corresponding to the first data;
[0066] The storage location information corresponding to the first data is determined by the location index;
[0067] At least a portion of the first data is obtained from the cold data storage area using storage location information;
[0068] Back up at least a portion of the first data in the cold data storage area to the hot data storage area.
[0069] In this embodiment, the stored data attributes include information such as the name, type, size, creation date, and creator of the stored data. All stored data attributes of the corresponding data can be obtained through data attribute tags. For example, the storage location information and stored data attributes corresponding to cold data in a cold data storage area and hot data in a hot data storage area are collected. A location index is generated for each data based on its storage location information. A data attribute tag is generated for each data based on its stored data attributes, and an association is established between the data attribute tags and the location index. Upon receiving a first instruction, the first data requested by the first instruction is determined using information such as the first data name or storage path carried in the first instruction. The stored data attributes in the data attribute tags corresponding to the first data are displayed to the user so that the user can determine whether the data corresponding to the stored data attributes is the data to be obtained. Simultaneously, the storage location information corresponding to the first data is determined through the location index associated with the data attribute tag corresponding to the first data. If the first data is cold data, at least a portion of the first data in the cold data storage area is backed up to the hot data storage area. The location index can be stored in the hot data storage area.
[0070] Understandably, in this embodiment, the user can first send a first command to browse the stored data attributes in the data attribute tags corresponding to the first data. This allows the user to determine whether the data corresponding to the stored data attributes is the data they need to acquire. This provides the user with a preliminary understanding of the stored data attributes, preventing the direct acquisition of data without prior knowledge. It also avoids situations where data is acquired but ultimately not needed, reducing wasted computing power and improving the efficiency of brief data browsing. Furthermore, if the first data is cold data, preparation for backing up the cold data to a faster-access hot data storage area can be completed while the user browses the stored data attributes of the first data, thus improving the acquisition and output speed of cold data.
[0071] In some other embodiments of this application, if no second instruction is received within a second preset time after receiving the first instruction, at least a portion of the first data in the hot data storage area is deleted.
[0072] In some embodiments, when the first data requested by the first instruction is cold data, while displaying the stored data attributes in the data attribute label corresponding to the first data to the user, at least a portion of the first data is stored in the hot data storage area. If no second instruction is received within a second preset time after receiving the first instruction, at least a portion of the first data in the hot data storage area is deleted.
[0073] In other embodiments, if a second instruction is received, but the time of receiving the second instruction exceeds a preset time after receiving the first instruction, at least a portion of the first data in the hot data storage area is deleted.
[0074] Understandably, in this embodiment, by setting a backup transition area in the hot data storage area, cold data can be temporarily stored in the hot data storage area, and if no second instruction is received within a second preset time after the first instruction, the cold data in the backup transition area can be deleted, which can prevent the situation where data is acquired but the user does not need it in the end, thus reducing the waste of computing power.
[0075] In some embodiments of this application, when the reception interval between the second instruction and the first instruction is less than a first preset time, after outputting at least a portion of the first data in the hot data storage area in response to the second instruction, the method further includes:
[0076] Change the data type label of the first data in the hot data storage area from the cold data label to the hot data label;
[0077] Delete the first data in the cold data storage area.
[0078] In some embodiments, after the first data is output to the user, the first data in the backup transition area can be deleted, and then all the data of the first data can be backed up from the cold data storage area to the hot data storage area. The data type label of the first data in the hot data storage area can be changed from the cold data label to the hot data label. Subsequently, the first data in the cold data storage area can be deleted.
[0079] In other embodiments, after the first data is output to the user, the first data in the backup transition area is backed up to the hot data storage area, and the data type label of the first data in the hot data storage area is changed from the cold data label to the hot data label. Then, the first data in the backup transition area and the cold data storage area is deleted.
[0080] Understandably, in this embodiment, at least a portion of the first data in the cold data storage area is backed up to the hot data storage area, so that the first data can be stored in the hot data storage area for a long time.
[0081] In some embodiments of this application, before receiving the first instruction, the method further includes:
[0082] Get the access frequency value of all data;
[0083] Data types whose access frequency is greater than or equal to the second threshold are labeled as hot data, and data types whose access frequency is less than the second threshold are labeled as cold data.
[0084] The data corresponding to cold data tags is stored in the cold data storage area, and the data corresponding to hot data tags is stored in the hot data storage area.
[0085] In this embodiment, the access frequency value can be understood as the acquisition frequency value. By acquiring the access frequency value of all data, data with an access frequency value greater than or equal to the threshold are marked as hot data tags and stored in the hot data storage area. Data with an access frequency value less than the threshold are marked as cold data tags and stored in the cold data storage area. For example, consider the audio files generated from voice recordings during customer service. The generated n audio files are denoted as M1, M2, M3, ..., Mn. They are stored in folders A1 / B1 / C1, A2 / B2 / C2, A3 / B3 / C3, ..., An / Bn / Cn, respectively. The preset time is 10 days. Within these 10 days, the number of times M1, M2, M3, ..., Mn are accessed is F1, F2, F3, ..., Fn, respectively. When F1 is less than a threshold, file M1 is stored in the cold data storage area; when F2 is greater than the threshold, file M2 is stored in the hot data storage area, and so on. This method stores each audio file in different storage areas based on the number of times it is accessed, reducing operating costs.
[0086] Understandably, in this embodiment, storing cold data and hot data in different areas can save storage space, improve storage efficiency, and reduce storage costs.
[0087] In other embodiments of this application, after outputting at least a portion of the first data in the hot data storage area, after a preset time, the access frequency values of all data in the storage space are retrieved again. Based on the access frequency, cold and hot data are re-determined, and the storage location information and location index are updated. In this embodiment, the data is periodically judged as hot or cold, enabling timely transfer of cold data, improving data storage efficiency, reducing power consumption, and lowering storage costs.
[0088] Figure 2 This diagram illustrates a data location index provided in an embodiment of this application, as shown below. Figure 2 As shown, a file location index is built based on storage location information, and file attribute labels are generated based on storage data attributes. For example, folder B1 contains 2 files, each 3KB in size, last created on February 4, 2023, and created by user A. Folder C1 contains 4 files, each 2KB in size, last created on January 1, 2023, and created by user B. For instance, folder C1 contains file M1, an audio file, 1KB in size, last created on April 5, 2023, and created by user C. When browsing files, the attribute information of the corresponding level of files or folders is viewed. For example, when browsing to folder C1, the files in C1 are displayed. When browsing and accessing file M1 in folder C1, assuming M1 is cold data stored in the cold data storage area, the attribute information of file M1 is displayed, and file M1 in folder C1 is backed up to the hot data storage area. When the data size of file M1 exceeds a preset threshold, the portion of M1 smaller than the threshold, M11, is loaded and backed up to the hot data storage area as the first pre-accessed cold data. When accessing file M1 again after displaying its attribute information, the first pre-accessed cold data file M11 is read, and the remaining portion of file M12 is simultaneously loaded and backed up to the hot data storage area as the second pre-accessed cold data. After the first pre-accessed cold data is read, the second pre-accessed cold data is read. After reading, both the first and second pre-accessed cold data are deleted, the corresponding cold data file M1 is marked as hot data, and file M1 is moved from the cold data storage area to the hot data storage area.
[0089] In some other embodiments of this application, after receiving the first instruction, assuming that the first data requested by the first instruction is hot data, the data attribute label corresponding to the storage data attribute label of the first data is displayed so that the user can determine whether the data corresponding to the storage data attribute is the data to be obtained. If it is determined that the first data is the data to be obtained, a second instruction is sent to directly read the corresponding hot data from the hot data storage area.
[0090] Figure 3 This application provides a schematic diagram of the structure of a data processing system according to an embodiment of the present application. Figure 3 As shown, the system includes the following units:
[0091] Information acquisition unit 301 is used to collect attribute information, access frequency, and storage location information of stored data. The attribute information of stored data includes information such as file name, type, size, creation date, and creator of the stored data file.
[0092] The first data storage unit 302, namely the hot data storage area, is used to store hot data and adopts an SSD flash drive with relatively fast access speed.
[0093] The second data storage unit 303, namely the cold data storage area, is used to store cold data and adopts a disk array with relatively slow access speed and lower cost.
[0094] The data analysis and processing unit 304 is used to: mark stored data whose access frequency value is greater than or equal to a threshold as hot data tags and store the hot data in a first data storage unit; mark stored data whose access frequency value is less than the threshold as cold data tags and store the cold data in a second data storage unit; generate a location index corresponding to each data based on storage location information; generate corresponding data attribute tags based on the storage data attributes of each data; establish the association between the storage data attribute tags and location indexes of each data; and obtain accessed file information. When the tag information of the accessed file is hot data, the unit displays the storage data attributes of the hot data; when the tag information of the accessed file is cold data, the unit displays the storage data attributes and determines the cold data. If the file size stored in the storage area exceeds a threshold, the file stored in the second data storage unit is split, and part of the file content is backed up to the first data storage unit to form a first backup file. The size of the first backup file is less than the threshold size and is used as first pre-access cold data. When an instruction to continue accessing the file is received, the first pre-access cold data in the first data storage unit is read, and the complete file is backed up to the first data storage unit as second pre-access cold data. The file is marked as hot data and stored in the first data storage unit, and the file in the second data storage unit is deleted. If the first pre-access cold data in the first data storage unit is not accessed within a preset time after the first instruction, the first pre-access cold data temporarily stored in the first data storage unit is deleted.
[0095] Figure 4 This application provides a schematic diagram of the structure of a data processing apparatus according to an embodiment of the present application. Figure 4 As shown, the device includes:
[0096] The first receiving module 401 is used to receive a first instruction, which is used to request the acquisition of first data.
[0097] Backup module 402 is configured to, in response to a first instruction, back up at least a portion of the first data in the cold data storage area to the hot data storage area if it is determined that the first data is cold data.
[0098] The second receiving module 403 is used to receive a second instruction, which is used to request the acquisition of the first data.
[0099] The output module 404 is configured to, in response to the second instruction, output at least a portion of the first data in the hot data storage area when the receiving interval between the second instruction and the first instruction is less than a first preset time, so that the user can obtain at least a portion of the first data.
[0100] In this embodiment, the first receiving module 401 receives a first instruction for requesting to obtain first data, and the backup module 402 responds to the first instruction by backing up at least a portion of the first data in the cold data storage area to the hot data storage area if it is determined that the first data is cold data. Then, the second receiving module 403 receives a second instruction for requesting to obtain the first data, and the output module 404 outputs at least a portion of the first data in the hot data storage area in response to the second instruction if the receiving interval between the second instruction and the first instruction is less than a preset time, so that the user can obtain at least a portion of the first data. Therefore, in this application, when the first instruction requests the acquisition of cold data, at least a portion of the first data is first backed up from the cold data storage area to the hot data storage area. After receiving the second instruction, if the reception interval between the second instruction and the first instruction is less than a first preset time, at least a portion of the first data is acquired from the hot data storage area. Thus, by first backing up at least a portion of the first data in the cold data storage area to the hot data storage area, the data in the hot data storage area, which has faster read and write speeds, can be directly output to the user, improving the efficiency of acquiring and outputting cold data. Moreover, acquiring and outputting cold data from the hot data storage area takes less time and consumes less computing power than acquiring and outputting cold data from the cold data storage area, thereby reducing data storage power consumption.
[0101] Figure 5 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application is shown.
[0102] An electronic device may include a processor 501 and a memory 502 storing computer program instructions.
[0103] Specifically, the processor 501 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0104] Memory 502 may include mass storage for data or instructions. For example, and not limitingly, memory 502 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 502 may include removable or non-removable (or fixed) media. Where appropriate, memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 502 is non-volatile solid-state memory.
[0105] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0106] The processor 501 implements any of the data processing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 502.
[0107] In one example, the electronic device may also include a communication interface 503 and a bus 510. Wherein, as... Figure 5 As shown, the processor 501, memory 502, and communication interface 503 are connected through bus 510 and complete communication with each other.
[0108] The communication interface 503 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0109] Bus 510 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 510 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0110] Furthermore, in conjunction with the data processing methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the data processing methods in the above embodiments.
[0111] This application provides a computer program product in which the instructions are executed by the processor of an electronic device, enabling the electronic device to perform the aforementioned data processing method.
[0112] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0113] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0114] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0115] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0116] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A data processing method, characterized in that, include: Receive a first instruction, the first instruction being used to request the acquisition of first data; In response to the first instruction, if it is determined that the first data is cold data, at least a portion of the first data in the cold data storage area is backed up to the hot data storage area; Receive a second instruction, the second instruction being used to request the acquisition of the first data; If the interval between receiving the second instruction and the first instruction is less than a first preset time, in response to the second instruction, at least a portion of the first data in the hot data storage area is output so that the user can obtain at least a portion of the first data.
2. The method according to claim 1, characterized in that, Backing up at least a portion of the first data in the cold data storage area to the hot data storage area includes: If the size of the first data exceeds the first threshold, a portion of the first data is obtained from the cold data storage area. Back up a portion of the first data to the hot data storage area; After receiving the second instruction, the method further includes: backing up the second data in the cold data storage area to the hot data storage area, wherein the second data is the remaining data other than a portion of the first data.
3. The method according to claim 1, characterized in that, The method further includes: If the second instruction is not received within a second preset time after the first instruction is received, at least a portion of the first data in the hot data storage area is deleted.
4. The method according to claim 1, characterized in that, If the reception interval between the second instruction and the first instruction is less than a first preset time, after outputting at least a portion of the first data in the hot data storage area in response to the second instruction, the method further includes: Change the data type label of the first data in the hot data storage area from the cold data label to the hot data label; Delete the first data from the cold data storage area.
5. The method according to claim 1, characterized in that, Before receiving the first instruction, the method further includes: Get the access frequency value of all data; The data type labels of data whose access frequency value is greater than or equal to the second threshold are marked as hot data labels, and the data type labels of data whose access frequency value is less than the second threshold are marked as cold data labels; The data corresponding to the cold data tag is stored in the cold data storage area, and the data corresponding to the hot data tag is stored in the hot data storage area.
6. The method according to claim 1, characterized in that, Before receiving the first instruction, the method further includes: Obtain the storage location information of all data, including all cold data in the cold data storage area and all hot data in the hot data storage area; Generate a location index corresponding to each data based on the storage location information; Based on the storage data attributes of each data item, generate corresponding data attribute tags; Establish the association between the data attribute labels and the location indexes of each data item; After receiving the first instruction, and in response to the first instruction, before backing up at least a portion of the first data in the cold data storage area to the hot data storage area when it is determined that the first data is cold data, the method further includes: Determine the data attribute label corresponding to the first data; In response to the first instruction, the stored data attribute corresponding to the data attribute tag is displayed so that the user can determine whether the data corresponding to the stored data attribute is the data that needs to be obtained. In response to the first instruction, if it is determined that the first data is cold data, backing up at least a portion of the first data in the cold data storage area to the hot data storage area includes: Determine the location index associated with the data attribute label corresponding to the first data; The storage location information corresponding to the first data is determined by the location index; At least a portion of the first data is obtained from the cold data storage area using the storage location information; At least a portion of the first data in the cold data storage area is backed up to the hot data storage area.
7. A data processing apparatus, characterized in that, include: A first receiving module is configured to receive a first instruction, wherein the first instruction is configured to request the acquisition of first data. A backup module is configured to, in response to the first instruction, back up at least a portion of the first data in the cold data storage area to the hot data storage area if it is determined that the first data is cold data. The second receiving module is used to receive a second instruction, which is used to request the acquisition of the first data. An output module is configured to, in response to the second instruction, output at least a portion of the first data in the hot data storage area, so that the user can obtain at least a portion of the first data, if the receiving interval between the second instruction and the first instruction is less than a first preset time.
8. An electronic device, characterized in that, The electronic device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the data processing method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the data processing method as described in any one of claims 1-6.
10. A computer program product, characterized in that, When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device is able to perform the data processing method as described in any one of claims 1-6.
Citation Information
Patent Citations
Data storage method and device, terminal equipment and storage medium
CN113779426A
Cold and hot data processing method and device, electronic equipment and storage medium
CN116361290A