Data management method and device and computer readable storage medium
By obtaining and analyzing the operating environment information in the data operation request, selecting memory blocks with low loss for operation, and carrying out data transfer, the problem of shortening the life of the flash memory device is solved, and the life of the storage device is extended and the loss balance is achieved.
Patent Information
- Application Number
- CN202310863118.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2025-01-14
AI Technical Summary
Flash memory devices are prone to become bad blocks after writing operations, resulting in the number of erasings of memory blocks affecting the life of the memory, and the prior art is difficult to effectively extend the life of the memory device.
By obtaining data operation requests, determine the operating environment information, including application information and storage block loss information, select the loss degree less than the target storage block for operation, and determine the data transfer strategy based on the operating environment information, and place the storage block with higher loss degree in the storage block with higher loss The data is moved to memory blocks with low loss, thereby extending the life of the storage device.
By balancing the loss of memory blocks, the life of the storage device is extended, and the data transfer strategy is optimized through neural network models, further improving the service life of the storage device.
Smart Images

Figure CN119311201A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a data management method, device, and computer-readable storage medium. Background Art
[0002] Memory is a general term for electronic, magnetic, laser, chemical and other products used to temporarily or long-term store data. In recent years, flash memory has developed rapidly. Flash is a non-volatile memory that can be erased and reprogrammed in blocks of storage units called "blocks". Any write operation of Flash can only be performed in empty or erased storage cells, so in most cases, it must be erased before the write operation.
[0003] Taking NAND Flash as an example, each storage block may become a bad block after a certain number of erase / write operations. Therefore, the number of erase operations of a storage block will affect the life of the memory. Summary of the invention
[0004] To solve the above problems, the present application provides a data management method, device and computer-readable storage medium, which are conducive to extending the life of the storage device.
[0005] A technical solution adopted in the present application is: to provide a data management method, which includes: obtaining a data operation request; wherein the data operation request corresponds to a first storage block; determining operating environment information corresponding to the data operation request; wherein the operating environment information includes application information and storage block loss information; determining a second storage block based on the operating environment information; wherein the loss degree of the second storage block is less than the loss degree of the first storage block; and operating the second storage block based on the data operation request.
[0006] In one embodiment, after operating the second storage block according to the data operation request, it also includes: determining a data migration strategy according to the operation environment information; moving the data in the third storage block to the fourth storage block according to the data migration strategy; wherein the loss degree of the fourth storage block is less than the loss degree of the third storage block.
[0007] In one embodiment, determining a second storage block based on operating environment information and determining a data migration strategy based on the operating environment information include: processing the operating environment information using a trained target neural network model to determine the second storage block and the data migration strategy.
[0008] In an optional embodiment, after operating on the second storage block, data migration operations can be further performed on the remaining storage blocks to move data from other storage blocks with higher wear rates to storage blocks with lower wear rates, thereby further making the wear rates of all storage blocks more balanced, thereby extending the life of the storage device. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0010] Figure 1 It is a flowchart of the first embodiment of the data management method provided by the present application;
[0011] Figure 2 yes Figure 1 Corresponding data operation diagram;
[0012] Figure 3 It is a flowchart of the second embodiment of the data management method provided by the present application;
[0013] Figure 4 yes Figure 3 A schematic diagram of a flow chart of an embodiment of step 33 in FIG.
[0014] Figure 5 yes Figure 4 Corresponding data operation diagram;
[0015] Figure 6 It is a flowchart of the third embodiment of the data management method provided by the present application;
[0016] Figure 7 is a structural diagram of a first embodiment of a data management device provided by the present application;
[0017] Figure 8 is a structural diagram of a second embodiment of a data management device provided by the present application;
[0018] Fig. 9 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0020] The terms "first", "second", etc. in this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0021] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0022] See also Figure 1 , Figure 1 : is a flow chart of a first embodiment of a data management method provided by the present application, the method comprising:
[0023] Step 11: Obtain a data operation request; wherein the data operation request corresponds to the first storage block.
[0024] Optionally, the data operation request is used to request an operation to be performed on the first storage block, and a specific manner may include any one of a read request, a write request (ie, a program request) and an erase request.
[0025] It can be understood that the data operation request is generally initiated by an APP (application). In one application scenario, taking a social APP as an example, a picture sent by a friend is received through the social APP. This picture is initially cached in the memory. If the user needs to save the picture in the album, the user can click on the picture and select the "Save Album" option to generate the above data operation request. Similarly, when using the album APP, the user can delete the pictures in it. Specifically, the user can click on the picture and select the "Delete" option to generate the above data operation request. In addition to the above application scenarios, it can also be for song downloads in music APPs, file storage in office APPs, video downloads in video APPs, etc., and examples are not given one by one here.
[0026] Step 12: Determine the operating environment information corresponding to the data operation request; wherein the operating environment information includes application information and storage block loss information.
[0027] The operating environment information is the current operating environment information corresponding to the received data operation request. In one embodiment, the operating environment information can be refreshed in real time based on a preset rule. For example, the operating environment information is refreshed based on a preset time interval, or when a data operation request is received, the operating environment information is refreshed immediately.
[0028] The application information refers to the relevant information of the application that initiates the data operation request. In an optional embodiment, the application information may include at least one of the application type, the application urgency, and the application memory occupancy rate.
[0029] Optionally, the application types can be divided according to the functions of the application, for example, they can include social APP, game APP, audio and video multimedia APP, office APP, data processing APP. It can be understood that different types of APPs have different requirements for data management. For example, social APPs such as WeChat generally store pictures, and office APPs such as Office generally store text. These two types of APPs do not have high requirements for storage; for example, game APPs require instant data storage and no delay in the game, while data processing APPs such as video editing require the storage of large amounts of data.
[0030] Optionally, the urgency of an application can be determined based on the running state of the application, for example, a foreground application can be considered to have a high urgency, while a background application can be considered to have a low urgency. Alternatively, it can be determined based on the historical usage data of the application (i.e., user habits), for example, if a user uses a music app at 8-9 o'clock every day, then if the user uses the music app at 8-9 o'clock every day, then the music app is considered to have a high urgency.
[0031] Optionally, the application memory occupancy rate may be determined according to the memory occupancy rate of a CPU (central processing unit), and an application with a high memory occupancy rate may be currently processing related data.
[0032] The storage block loss information refers to the loss degree determined according to the number of write / erase times. The loss degree can be directly the number of erased times, expressed in numbers, or the ratio of the number of erased times to the estimated erasable times, expressed in percentages. For example, if the estimated erasable times of a TLC NAND Flash storage block is 2000 times and the number of erased times is 500, then the loss degree can be expressed as 500, or as 500 / 2000.
[0033] In an optional embodiment, the storage block loss information includes at least one of a single block loss degree, a total loss degree, and an average loss degree. The single block loss degree refers to the loss degree of each storage block, the total loss degree refers to the sum of the damage degrees of all storage blocks, and the average loss degree refers to the average value of the loss degrees of all storage blocks.
[0034] Step 13: Determine a second storage block according to the operating environment information; wherein the wear degree of the second storage block is less than the wear degree of the first storage block.
[0035] It can be understood that in step 12, the first storage block corresponding to the application information, storage block loss information and data operation request is determined. In some application scenarios, based on the application information and storage block loss information, if the original first storage block is used for operation, it may affect the effect of the data operation or affect the life of the storage device.
[0036] In one application scenario, take the application type as an example: for example, according to the application information, it is found that the application is a music APP, and according to the user's habits, the music APP generally stores the downloaded songs in the memory for a long time without changing, so the second storage block with a large number of erasures (but less than the estimated number of erasable times) can be selected for data writing. For another example, according to the application information, it is found that the application is a game APP, and according to the user's habits, the data of the game APP is often updated, so the second storage block with a small number of erasures can be selected for data writing.
[0037] In one application scenario, take the first storage block corresponding to the data operation request as an example: for example, the number of erasure times of the first storage block is greater than the average number of erasure times of all storage blocks, therefore, a second storage block whose number of erasure times is less than the average number of erasure times of all storage blocks can be selected for data writing.
[0038] Step 14: Perform an operation on the second storage block according to the data operation request.
[0039] See below Figure 2 , Figure 2 yes Figure 1 Schematic diagram of corresponding data operations. For example, the first storage block determined according to the data operation request is the storage block numbered "3", and its corresponding wear degree (erasure times) is 86. According to the distribution of the wear degrees of all storage blocks, there are still storage blocks with lower wear degrees, such as the storage block numbered "9", and its corresponding wear degree is 61. Therefore, it can be used as the second storage block, that is, the storage block numbered "9" is operated accordingly according to the data operation request.
[0040] Further reading Figure 2 , when only the storage block loss information is considered, the requested storage block numbered "3" is not operated, but the corresponding operation is performed on another storage block numbered "9". Then, if the storage block loss information and application information are considered comprehensively, different results may be produced. For example, the application that initiates the data operation request is an image processing APP (such as Photo shop). According to the user's historical usage data, the image processing APP is used frequently, and each time it is used, operations such as writing and erasing pictures are performed. Then, the storage block numbered "9" can be selected for corresponding operations. For another example, the application that initiates the data operation request is a network disk APP. According to the user's historical usage data, the network disk APP is used very rarely, and the written data generally does not change, and most of the subsequent operations are read operations. Therefore, considering the storage block loss information and application information comprehensively, the storage block numbered "3" is still selected for corresponding operations.
[0041] In another embodiment, in addition to the above selection of the storage block, it is also possible to determine whether the data in the storage block needs to be moved after the data is operated accordingly. Figure 3 , Figure 3 : is a flow chart of a second embodiment of a data management method provided by the present application, the method comprising:
[0042] Step 31: Determine the data migration strategy based on the operating environment information.
[0043] The data migration strategy refers to performing data migration on other storage blocks after performing a corresponding operation on the second storage block based on the data operation request.
[0044] It can be understood that after performing corresponding operations on the second storage block, the response changes generated by the storage device, such as the total loss rate and the average loss rate, have changed. Therefore, based on these changes, it can be judged whether the storage device needs to move data to help extend the life of the storage device.
[0045] Optionally, in one embodiment, if Figure 4 As shown, Figure 4 yes Figure 3 The flowchart of step 31 in the embodiment of FIG. 1 is shown in FIG. 31 , and step 31 may specifically include:
[0046] Step 311: Determine whether data migration conditions are met based on the operating environment.
[0047] Optionally, when determining whether the data migration condition is met, two factors, namely, application information and storage block loss information, are mainly considered.
[0048] On the one hand, the storage block loss information can be used to determine the single block loss degree, and then determine whether it is necessary to move the data of the storage block with a larger single block loss degree; or, the storage block loss information can be used to determine the total loss degree and the average loss degree, and then determine whether it is necessary to move the data in the storage block with a loss degree greater than the average loss degree.
[0049] like Figure 5 As shown, Figure 5 yes Figure 4 Schematic diagram of corresponding data operations. For example, the first storage block determined according to the data operation request is the storage block numbered "3", and its corresponding wear degree (number of erasures) is 86. According to the distribution of the wear degrees of all storage blocks, there are still storage blocks with lower wear degrees, such as the storage block numbered "9", whose corresponding wear degree tail is 61. Therefore, it can be used as the second storage block, that is, the storage block numbered "9" is operated accordingly according to the data operation request. Then, the distribution of the wear degrees of all storage blocks is analyzed and it is found that the wear degree of the storage block numbered "5" is 199, which is much larger than the wear degrees of other storage blocks, and it is determined that the data migration conditions are met.
[0050] On the other hand, the application can be referenced based on the degree of loss. Figure 5For example, the storage block numbered "5" is judged to meet the migration conditions based on the degree of loss, and the data stored on the storage block numbered "5" is determined not to be suitable for data migration based on its application type, application urgency or application memory occupancy. Therefore, it is finally determined that the storage block numbered "5" does not meet the data migration conditions.
[0051] For example, the data stored in the storage block numbered "5" is the data of a game APP, and the game APP is currently running. Therefore, it can be determined that the storage block numbered "5" does not meet the data migration conditions.
[0052] Step 312: If the data migration conditions are met, inquire whether to perform the data migration operation.
[0053] Step 313: If a data migration instruction is received in response to the inquiry, a data migration strategy is determined.
[0054] Optionally, step 312 may be inquired in the form of a pop-up dialog box, and "yes" and "no" buttons may be displayed. When an instruction generated by the user clicking the "yes" button is received, the data migration strategy is determined.
[0055] Step 32: Move the data in the third storage block to the fourth storage block according to the data migration strategy; wherein the wear degree of the fourth storage block is less than the wear degree of the third storage block.
[0056] Reference again Figure 5 , the storage block numbered “5” can be used as the third storage block, and the storage block numbered “10” with less wear and tear can be used as the fourth storage block, and the data in the third storage block can be moved to the fourth storage block.
[0057] It is worth noting that the third storage block and the fourth storage block here can be any two storage blocks, that is, the third storage block can be the first storage block or the second storage block in the above embodiment, and the fourth storage block can also be the first storage block or the second storage block in the above embodiment. Of course, the third storage block and the fourth storage block can also be other storage blocks except the first storage block and the second storage block.
[0058] It is understandable that the above judgment on data migration mainly considers the loss of storage blocks and the relevant information of the application. In another embodiment, the current CPU load can also be considered when judging data migration. Since data migration needs to occupy CPU resources, when the CPU load is high, it can be decided not to migrate data temporarily, and when the CPU load is low, it can be decided to migrate data.
[0059] It can be understood that, in combination with the above two embodiments, in one application scenario, the above step 31 can be executed after executing step 14, that is, after determining the second storage block according to the operating environment information and operating the second storage block, the subsequent data migration is performed; in the second application scenario, the embodiments of steps 31 and 32 can also be executed separately independently of the embodiments of steps 11-14; in the third application scenario, the embodiments of steps 31 and 32 can also be executed synchronously with the embodiments of steps 11-14, for example, steps 13 and 31 can be executed synchronously, that is: determine the second storage block and the data migration strategy according to the operating environment information.
[0060] The data management method provided in this embodiment includes: obtaining a data operation request; wherein the data operation request corresponds to a first storage block; determining the operating environment information corresponding to the data operation request; wherein the operating environment information includes application information and storage block loss information; determining a second storage block according to the operating environment information; wherein the loss degree of the second storage block is less than the loss degree of the first storage block; and operating the second storage block according to the data operation request. In the above manner, based on the application corresponding to the operating environment information and the loss distribution of the storage block, the storage block required for the data operation is selected, and the storage block with a lower loss degree can be operated preferentially based on the current application characteristics, so that the loss degree of all storage blocks is relatively balanced, thereby extending the life of the storage device as a whole.
[0061] In an optional embodiment, after operating on the second storage block, data migration operations can be further performed on the remaining storage blocks to move data from other storage blocks with higher wear rates to storage blocks with lower wear rates, thereby further making the wear rates of all storage blocks more balanced, thereby extending the life of the storage device.
[0062] On the basis of the first and second embodiments described above, a neural network model may be further used to select an operation storage block and determine whether data migration is required according to the user's usage habits.
[0063] First, let’s introduce the training process of the neural network model. Figure 6 , Figure 6 : is a flow chart of a third embodiment of a data management method provided by the present application, the method comprising:
[0064] Step 61: Construct an initial neural network model.
[0065] Among them, Neural Networks (NN) is a complex network system formed by a large number of simple processing units (called neurons) that are widely interconnected. It reflects many basic characteristics of human brain functions and is a highly complex nonlinear dynamic learning system. Neural networks have large-scale parallel, distributed storage and processing, self-organization, self-adaptation and self-learning capabilities, and are particularly suitable for processing imprecise and fuzzy information processing problems that require considering many factors and conditions at the same time.
[0066] In this embodiment, a convolutional neural network, a long short-term memory neural network, a feedforward neural network, etc. may be used, without limitation here.
[0067] Step 62: Process the sample data using the initial neural network model to determine the storage block to be evaluated and the data migration strategy to be evaluated; wherein the sample data includes application information, storage block loss information, and requested storage block.
[0068] The sample data here may be historical data corresponding to the user's historical data operations, or may be experimental data. It is understandable that the sample data is large in number, including multiple historical data or experimental data corresponding to multiple data operations, and each historical data or experimental data may include application information, storage block loss information, and requested storage blocks.
[0069] Specifically, the sample data is input into the initial neural network model, and the sample data is processed using the initial neural network model. Taking the convolutional neural network as an example, the processing process may specifically include feature extraction (convolution), pooling, feature connection, normalization and output, so as to output the storage block to be evaluated and the data migration strategy to be evaluated.
[0070] Optionally, in another embodiment, the sample data may further include processor load information.
[0071] Step 63: Evaluate the storage block to be evaluated and the data migration strategy to be evaluated to obtain an evaluation result.
[0072] Optionally, the evaluation result may indicate whether the storage block to be evaluated or the data migration strategy to be evaluated meets the requirements.
[0073] For example, if the loss degree of the storage block to be evaluated is determined to be small, or lower than the average loss degree, or the one with the lowest loss degree among all storage blocks, then the storage block to be evaluated can be considered to meet the requirements. For example, if the data migration strategy to be evaluated is to move data from a storage block with a higher loss degree to a storage block with a lower loss degree when the application is in the background state and the processor load is low, then the data migration strategy to be evaluated can also be considered to meet the requirements.
[0074] For another example, if the loss degree of the storage block to be evaluated is greater than the average loss degree, then it can be considered that the storage block to be evaluated does not meet the requirements. For example, if the data migration strategy to be evaluated is to move data from one storage block to another storage block when the application is in the foreground and the memory usage is high, then it can be considered that the data migration strategy to be evaluated does not meet the requirements.
[0075] Step 64: Feedback the evaluation results to the initial neural network model to train the initial neural network model, thereby obtaining a target neural network model.
[0076] Optionally, if the evaluation result indicates that the storage block to be evaluated and the data migration strategy to be evaluated meet the requirements, direct feedback can be given; if the evaluation result indicates that the storage block to be evaluated and the data migration strategy to be evaluated do not meet the requirements, direct feedback can be given, or the storage block and migration strategy that meet the requirements determined by other means can be fed back to the initial neural network model, so that the initial neural network model can modify the network parameters to achieve the purpose of training.
[0077] It can be understood that each sample data needs to go through the above-mentioned process of step 62, step 63 and step 64, and a large amount of sample data is continuously used to train the initial neural network model to obtain the target neural network model.
[0078] The trained target neural network model is used to process the operating environment information to determine the second storage block and data migration strategy.
[0079] In combination with the third embodiment described above, a neural network model is mainly used to train sample data. Since the neural network model is capable of large-scale parallel, distributed storage and processing, self-organization, self-adaptation and self-learning capabilities, it is able to perform good feature extraction for information such as application information, storage block loss information and the first storage block corresponding to the data operation request, thereby performing learning and training. Therefore, when selecting storage blocks and making data migration judgments, there is no need to select storage blocks and migrate data in a fixed manner, but rather to better refer to sample data and take into account user habits. Therefore, the results can be more in line with user needs, and unnecessary operations that are not in line with user wishes are avoided, thereby reducing the power consumption of the storage device.
[0080] See also Figure 7 , Figure 7 is a structural diagram of the first embodiment of the data management device provided in the present application. The data management device 700 includes an interface module 71 , a processing module 72 and a driving module 73 .
[0081] Among them, the interface module 71 is used to obtain a data operation request; wherein the data operation request corresponds to a first storage block; the processing module 72 is used to determine the operating environment information corresponding to the data operation request, and determine the second storage block according to the operating environment information; wherein the operating environment information includes application information and storage block loss information, and the loss degree of the second storage block is less than the loss degree of the first storage block; the driving module 73 is used to operate the second storage block according to the data operation request.
[0082] Optionally, the interface module 71 is specifically a data access service interface, which is mainly used to obtain data operation requests sent by the application. The processing module 72 is connected to the interface module 71. The processing module 72 receives the data operation request obtained by the interface module 71 on the one hand, and obtains the operating environment information on the other hand, and determines the second storage block according to the data operation request and the operating environment information; the driving module 73 then operates the second storage block according to the data operation request.
[0083] In one embodiment, the processing module 72 is specifically a neural network module, which is used to process the operating environment information to determine the second storage block and the data migration strategy. The driving module 73 is used to operate the second storage block according to the data operation request, and to move the data in the third storage block to the fourth storage block according to the data migration strategy.
[0084] See also Figure 8 , Figure 8 8 is a schematic diagram of the structure of the second embodiment of the data management device provided in the present application. The data management device 800 includes a processor 81 and a memory 82 .
[0085] Among them, the memory 82 is used to store program data, and the processor 81 is used to execute the program data to implement the following method: obtain a data operation request; wherein the data operation request corresponds to a first storage block; determine the operating environment information corresponding to the data operation request; wherein the operating environment information includes application information and storage block loss information; determine a second storage block according to the operating environment information; wherein the loss degree of the second storage block is less than the loss degree of the first storage block; operate on the second storage block according to the data operation request.
[0086] Optionally, the above Figure 7 and Figure 8 The data management device in the embodiment can be a PC, a laptop, a mobile phone, a tablet computer, a smart wearable device (such as a watch, glasses), etc., and the memory 92 can be a Flash memory, such as a NAND Flash memory.
[0087] See also Fig. 9 , Fig. 9It is a structural diagram of an embodiment of a computer-readable storage medium provided by the present application, wherein the computer-readable storage medium 900 stores program data 91, and the program data 91, when executed by a processor, is used to implement the following method: obtaining a data operation request; wherein the data operation request corresponds to a first storage block; determining operating environment information corresponding to the data operation request; wherein the operating environment information includes application information and storage block loss information; determining a second storage block according to the operating environment information; wherein the loss degree of the second storage block is less than the loss degree of the first storage block; and operating the second storage block according to the data operation request.
[0088] Optionally, the computer-readable storage medium 900 mentioned above may be a Flash memory, such as a NAND Flash memory.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0090] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0091] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0092] If the integrated units in the above other embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.
[0093] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made according to the description and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A data management method, characterized in that: The data management method comprises: Obtaining a data operation request; wherein the data operation request corresponds to a first storage block; Determine the operation environment information corresponding to the data operation request; wherein the operation environment information includes application information and storage block loss information; Determining a second storage block according to the operating environment information; wherein the loss degree of the second storage block is less than the loss degree of the first storage block; The second storage block is operated according to the data operation request.
2. The data management method according to claim 1, characterized in that: After operating the second storage block according to the data operation request, the method further includes: Determine a data migration strategy according to the operating environment information; The data in the third storage block are moved to the fourth storage block according to the data migration strategy; wherein the loss degree of the fourth storage block is less than the loss degree of the third storage block.
3. The data management method according to claim 2, characterized in that: The determining of the second storage block according to the operating environment information, and the determining of the data migration strategy according to the operating environment information, include: The operating environment information is processed using a trained target neural network model to determine a second storage block and a data migration strategy.
4. The data management method according to claim 3, characterized in that: The method further comprises: Build an initial neural network model; Processing sample data using the initial neural network model to determine storage blocks to be evaluated and data migration strategies to be evaluated; wherein the sample data includes application information, storage block loss information, and requested storage blocks; Evaluating the storage block to be evaluated and the data migration strategy to be evaluated to obtain an evaluation result; The evaluation result is fed back to the initial neural network model to train the initial neural network model, thereby obtaining the target neural network model.
5. The data management method according to claim 4, characterized in that: The application information includes at least one of an application type, an application urgency, and an application memory occupancy rate.
6. The data management method according to claim 5, characterized in that: The application emergency procedure is determined by application historical usage data.
7. The data management method according to claim 5, characterized in that: The storage block loss information includes at least one of a single block loss degree, a total loss degree and an average loss degree.
8. The data management method according to claim 5, characterized in that: The sample data and the operating environment information also include processor load information.
9. The data management method according to claim 2, characterized in that: The determining of the data migration strategy according to the operating environment information includes: Determining whether a data migration condition is met according to the operating environment; If the data migration conditions are met, you will be asked whether to perform the data migration operation; If a data migration instruction is received in response to the inquiry, a data migration strategy is determined.
10. The data management method according to claim 1, characterized in that: The method further comprises: A block address is calculated according to the data operation request to determine the first storage block.
11. The data management method according to claim 1, characterized in that: The data operation request includes any one of a read request, a write request and an erase request.
12. A data management device, characterized in that: The data management device comprises: An interface module, used to obtain a data operation request; wherein the data operation request corresponds to a first storage block; a processing module, configured to determine the operating environment information corresponding to the data operation request, and determine the second storage block according to the operating environment information; wherein the operating environment information includes application information and storage block loss information, and the loss degree of the second storage block is less than the loss degree of the first storage block; A driving module is used to operate the second storage block according to the data operation request.
13. A data management device, characterized in that: The data management device comprises a processor and a memory, the memory is used to store program data, and the processor is used to execute the program data to implement the data management method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program data, and when the program data is executed by a processor, it is used to implement the data management method according to any one of claims 1 to 12.