Data write method and apparatus, and solid-state disk, electronic device and non-volatile readable storage medium

By preprocessing and mirroring the data of the solid-state drive, the problem of low response efficiency of the solid-state drive when processing random small data block write requests is solved, efficient data writing and fault tolerance are achieved, and performance and user experience are improved.

WO2024212783A1PCT designated stage expired Publication Date: 2024-10-17INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/083115
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-10
Filing Date
2024-03-21
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

In the existing technology, solid-state drives have low response efficiency when processing a large number of random small data block write requests, resulting in poor write performance and being unable to meet high IOPS requirements.

Method used

By preprocessing the data to be written, segmenting and integrating it to form multiple preprocessed data blocks, and mirroring them to the first partition of the solid state drive to achieve data redundancy and fault tolerance, and then determine the writing status based on the mirroring results, in real time Send response information to the client to avoid waiting for all data blocks to be written.

Benefits of technology

It improves data writing response efficiency, reduces latency, ensures effective data writing, and reduces write amplification problems through data mirroring and preprocessing, improving the performance and user experience of solid-state drives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024083115_17102024_PF_FP_ABST
    Figure CN2024083115_17102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data processing. Provided are a data write method and apparatus, and a solid-state disk, an electronic device and a non-volatile readable storage medium. The method comprises: receiving a data write request which is sent by a target object, so as to acquire data to be written; performing pre-processing on each original data block in said data, so as to obtain a plurality of pre-processed data blocks of said data, wherein the pre-processing comprises segmentation and / or integration; mirroring the plurality of pre-processed data blocks to a first partition of a target solid-state disk; according to a mirroring result, sending, to the target object, response information corresponding to said data, wherein the response information comprises write state information; and writing each pre-processed data block into a second partition of the target solid-state disk from the first partition, wherein the first partition is a data caching space for caching said data, and the second partition is a data storage space for storing said data. The present application improves the data writing response efficiency while ensuring effective data writing.
Need to check novelty before this filing date? Find Prior Art

Description

Data writing method, device, solid-state hard disk, electronic device and non-volatile readable storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on April 10, 2023, with application number 2023103706237 and application name “Data Writing Method, Device, Solid State Drive, Electronic Device and Storage Medium”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the field of data processing technology, and in particular to a data writing method, device, solid-state drive, electronic device, and non-volatile readable storage medium. Background Art

[0004] With the continuous development of hyper-convergence technology, all-in-one machines that integrate software and hardware are increasingly being used in various scenarios. They mainly rely on the high IOPS (Input Output Operations Per Second) performance of the underlying solid-state disk to quickly respond to various read and write requests from front-end customers.

[0005] Typically, the write requests sent by front-end customers contain a large number of random small data blocks. The solid-state disk needs to write data one by one according to the write requirements of each small data block. Only after all small data blocks are written will it send a response message of write success or write failure to the client, resulting in low response efficiency.

[0006] Summary of the Invention

[0007] The present application provides a data writing method, device, solid-state drive, electronic device and non-volatile readable storage medium to solve the defect of low write response efficiency in related technologies, thereby ensuring that data is effectively written while improving data write response efficiency.

[0008] This application provides a data writing method, comprising:

[0009] Receive a data write request from the target object and obtain the data to be written according to the data write request;

[0010] Preprocessing each original data block in the data to be written to obtain multiple preprocessed data blocks of the data to be written; the preprocessing includes segmentation and / or integration;

[0011] mirroring the plurality of pre-processed data blocks to a first partition of a target solid-state drive;

[0012] According to the mirroring result, obtain the response information corresponding to the data to be written and send the response information to the target object; the response information includes the writing status information;

[0013] Writing each pre-processed data block from the first partition into a second partition of the target solid-state drive;

[0014] The first partition is a data cache space for caching data to be written, and the second partition is a data storage space for storing data to be written.

[0015] According to a data writing method provided by the present application, obtaining response information corresponding to the data to be written according to the mirroring result includes:

[0016] According to the mirroring result, determining whether there is an abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition; the abnormal data block includes a data block in a mirroring failure state or a data block in a verification failure state;

[0017] When it is determined that there is no abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition, the response information is determined to be first response information; the first response information includes response information that the write status of the data to be written is write successful.

[0018] According to a data writing method provided by the present application, the method further includes:

[0019] When it is determined that an abnormal data block exists in the plurality of pre-processed data blocks mirrored by the first partition, a maximum delay duration is obtained from a configuration file of the target solid-state drive;

[0020] During the maximum delay time, the plurality of pre-processed data blocks mirrored in the first partition are updated until an update stop condition is satisfied;

[0021] Get response information based on the update result;

[0022] The update stop condition includes that there is no abnormal data block in the plurality of pre-processed data blocks mirrored in the first partition, and / or the update duration reaches a maximum delay duration.

[0023] According to a data writing method provided by the present application, obtaining response information according to the update result includes:

[0024] If it is determined according to the update result that abnormal data blocks exist in the plurality of pre-processed data blocks mirrored by the first partition during each update process, the response information is determined to be second response information; the second response information includes response information indicating that the write status of the data to be written is write failure;

[0025] When it is determined according to the update result that no abnormal data block exists in the plurality of pre-processed data blocks mirrored in the first partition during at least one update process, the response information is determined to be the first response information.

[0026] According to a data writing method provided by the present application, determining whether there is an abnormal data block in a plurality of pre-processed data blocks mirrored by a first partition according to a mirroring result includes:

[0027] Determining, according to the mirroring result, a first to-be-checked data block in a mirroring success state among the plurality of pre-processed data blocks;

[0028] Obtain a first coding value and a second coding value of a first data block to be checked; the first coding value is a coding value generated before the first data block to be checked is mirrored to the first partition; the second coding value is a coding value generated in each mirror file in the first partition after the first data block to be checked is mirrored to each mirror file;

[0029] Verify the first data block to be verified according to the first code value and the second code value of the first data block to be verified to obtain a verification result;

[0030] According to the verification result, it is determined whether there is an abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition.

[0031] According to a data writing method provided by the present application, a first data block to be checked is checked according to a first code value and a second code value of the first data block to be checked to obtain a check result, including:

[0032] Comparing the second encoding value of the first data block to be verified in each mirror file to obtain a first comparison result;

[0033] If it is determined according to the first comparison result that the second code value of the first data block to be checked in each mirror file is the same, the second code value of the first data block to be checked in any mirror file is compared with the first code value of the first data block to be checked to obtain a second comparison result;

[0034] When it is determined according to the second comparison result that the second coding value is identical to the first coding value, the verification result is determined to be that the verification of the first data block to be verified is successful.

[0035] According to a data writing method provided by the present application, the method further includes:

[0036] If it is determined according to the first comparison result that the second code values ​​of the first data block to be checked in each mirror file are different, the second code value of the first data block to be checked in each mirror file is compared with the first code value of the first data block to be checked to obtain a third comparison result;

[0037] If it is determined according to the third comparison result that the second code value of the first data block to be verified in each image file is different from the first code value of the first data block to be verified, determining that the verification result is that the first data block to be verified has failed verification;

[0038] During the maximum delay period, multiple pre-processed data blocks mirrored in the first partition are updated, including:

[0039] Within the maximum delay time, the first data block to be verified is re-mirrored to each mirror file of the first partition.

[0040] According to a data writing method provided by the present application, the method further includes:

[0041] If it is determined, based on the third comparison result, that the first image file and the second image file exist in the first partition, determining that the verification result is that the first data block to be verified has failed verification; wherein the second coding value of the first data block to be verified in the first image file is the same as the first coding value of the first data block to be verified, and the second coding value of the first data block to be verified in the second image file is different from the first coding value of the first data block to be verified;

[0042] During the maximum delay period, multiple pre-processed data blocks mirrored in the first partition are updated, including:

[0043] The plurality of pre-processed data blocks mirrored in the first mirror file are synchronized to the second mirror file within the maximum delay time.

[0044] According to a data writing method provided by the present application, each pre-processed data block is written from the first partition to the second partition of the target solid-state drive, including:

[0045] When it is monitored that the remaining storage capacity of the second partition is greater than or equal to the preset storage capacity, obtaining a write strategy for the data to be written according to the data write request;

[0046] Determining a write priority of each pre-processed data block according to a write order in the write strategy and / or a cache duration of each pre-processed data block in the first partition;

[0047] According to the write priority, each pre-processed data block is written from the first partition to the second partition of the target solid state drive.

[0048] According to a data writing method provided by the present application, the writing priority of each pre-processed data block is determined according to the cache duration of each pre-processed data block in the first partition, including:

[0049] If there is any pre-processed data block in the first partition whose cache duration is greater than or equal to the maximum delay duration, it is determined that the write priority of any pre-processed data block is the highest; the maximum delay duration is obtained from the configuration file of the target solid state drive.

[0050] According to a data writing method provided by the present application, after writing each pre-processed data block from the first partition to the second partition of the target solid-state drive, the method further includes:

[0051] Obtaining a pre-processed data block in a write-completed state as a second data block to be verified;

[0052] Verifying the second data block to be verified;

[0053] When it is determined according to the verification result that the second data block to be verified has failed verification, obtaining a write log of the second data block to be verified in the log partition of the target solid-state drive;

[0054] Determine a target image file from the plurality of image files in the first partition according to the write log;

[0055] The second data block to be verified is written from the target image file to the second partition of the target solid-state hard disk.

[0056] According to a data writing method provided by the present application, verifying a second data block to be verified includes:

[0057] In a case where a write strategy for the data to be written includes a consistency check strategy, calculating a parity check value of a second data block to be checked;

[0058] The parity check value of the second data block to be checked is compared with a preset parity value, and a consistency check is performed on the second data block to be checked according to the comparison result.

[0059] According to a data writing method provided by the present application, a plurality of pre-processed data blocks are mirrored to a first partition of a target solid-state drive, comprising:

[0060] According to the plurality of pre-processed data blocks, a mirror request is sent to the first partition, so that the first partition calls the target logical storage block according to the mirror request and the local logical address management table, and mirrors each pre-processed data block to the first partition.

[0061] According to a data writing method provided by the present application, each original data block in the data to be written is preprocessed to obtain multiple preprocessed data blocks of the data to be written, including:

[0062] Obtain a configuration file of the target solid-state drive, and obtain the preset data block specifications from the configuration file;

[0063] Sort the original data in the data to be written according to the data block specifications of the original data;

[0064] According to the sorting result, each original data is added to the first data queue to obtain a second data queue;

[0065] Splitting data blocks in the second data queue whose data block size is larger than the preset data block size according to the preset data block size;

[0066] The second data queue is updated according to the segmentation result to obtain a third data queue;

[0067] Integrate the data blocks in the third data queue whose data block size is smaller than the preset data block size according to the preset data block size, and update the third data queue according to the integration result to obtain the target data queue;

[0068] Determine the pre-processing data blocks according to the data blocks in the target data queue.

[0069] According to a data writing method provided by the present application, the method further includes:

[0070] Determining a written data block in a successfully written state among the plurality of pre-processed data blocks;

[0071] The local logical address management table of the first partition is updated according to the written data block, and the written data block is erased in the first partition.

[0072] According to a data writing method provided by the present application, before mirroring the plurality of pre-processed data blocks to the first partition of the target solid-state drive, the method further includes:

[0073] Perform initialization operations on the first partition and the second partition, and obtain initialization results;

[0074] When it is determined that there is alarm information in the initialization result, matching the alarm information with preset keywords in the knowledge base to obtain at least one target keyword matching the alarm information;

[0075] Determine candidate processing strategies corresponding to each target keyword in the knowledge base;

[0076] Determine the first target processing strategy corresponding to the alarm information based on the candidate processing strategies corresponding to each target keyword;

[0077] The processing component corresponding to the first target processing strategy is called to process the alarm information.

[0078] According to a data writing method provided by the present application, a first target processing strategy corresponding to the alarm information is determined based on candidate processing strategies corresponding to each target keyword, including:

[0079] Determining, based on the number of each candidate processing strategy, the degree of correlation between each candidate processing strategy and the alarm information;

[0080] The candidate processing strategy with the greatest correlation is determined as the first target processing strategy.

[0081] According to a data writing method provided by the present application, the method further includes:

[0082] Get the processing result of the alarm information;

[0083] When the processing result of the alarm information is successful, extract keywords from the alarm information to obtain new keywords;

[0084] Update the knowledge base with new keywords and first target processing strategies.

[0085] According to a data writing method provided by the present application, the method further includes:

[0086] If the processing result of the alarm information is a processing failure, the alarm information is sent to the client, so that the client can process the alarm information according to the second target processing strategy;

[0087] Monitoring the alarm processing information returned by the client, and obtaining a second target processing strategy when determining, based on the alarm processing information, that the processing status of the alarm information is successful;

[0088] The newly added keywords extracted from the alarm information are updated to the knowledge base with the second target processing strategy.

[0089] According to a data writing method provided by the present application, a plurality of pre-processed data blocks are mirrored to a first partition of a target solid-state drive, comprising:

[0090] mirroring the plurality of pre-processed data blocks to a primary cache space and a backup cache space of a first partition; the primary cache space and the backup cache space belong to different fault domains;

[0091] Writing each pre-processed data block from the first partition to the second partition of the target solid-state drive includes:

[0092] Each pre-processed data block is written into the second partition from any cache space of the primary cache space and the backup cache space.

[0093] According to a data writing method provided by the present application, before mirroring the plurality of pre-processed data blocks to the first partition of the target solid-state drive, the method further includes:

[0094] According to the configuration file of the target solid-state drive, the partition ratio of each partition in the target solid-state drive is obtained;

[0095] Determine the capacity of the first partition and the capacity of the second partition according to the division ratio of each partition;

[0096] The target solid-state hard disk is partitioned according to the capacity of the first partition and the capacity of the second partition to obtain a first partition and a second partition.

[0097] The present application also provides a data writing device, comprising:

[0098] An acquisition module is configured to receive a data write request sent by a target object and acquire the data to be written according to the data write request;

[0099] A processing module is configured to pre-process each original data block in the data to be written to obtain a plurality of pre-processed data blocks of the data to be written; the pre-processing includes segmentation and / or integration;

[0100] a mirroring module configured to mirror the plurality of pre-processed data blocks to a first partition of a target solid-state drive;

[0101] The response module is configured to obtain response information corresponding to the data to be written according to the mirroring result, and send the response information to the target object; the response information includes write status information;

[0102] a writing module configured to write each pre-processed data block from the first partition into a second partition of the target solid-state drive;

[0103] The first partition is a data cache space for caching data to be written, and the second partition is a data storage space for storing data to be written.

[0104] The present application also provides a solid-state hard disk, the solid-state hard disk includes a control chip and a storage chip; the storage chip includes a first partition, a second partition and a log partition;

[0105] When the control chip executes the computer program, any of the above data writing methods is implemented.

[0106] The present application also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned data writing methods is implemented.

[0107] The present application also provides a non-volatile readable storage medium having a computer program stored thereon, which implements any of the above-mentioned data writing methods when executed by a processor.

[0108] The present application also provides a computer program product, including a computer program, which implements any of the above-mentioned data writing methods when executed by a processor.

[0109] The data writing method, device, solid-state drive, electronic device and non-volatile readable storage medium provided by the present application pre-process the data to be written and mirror the pre-processed data block to the first partition of the target solid-state drive. On the one hand, data redundancy can be achieved through data mirroring, and the problem of data write amplification can be avoided through data pre-processing, thereby effectively ensuring the effective writing of the data to be written. On the other hand, after obtaining the mirroring result, it can be determined whether the data to be written can be completely and correctly mirrored to the first partition of the target solid-state drive, and further determined whether the data to be written can be completely and correctly written from the first partition to the second partition of the target solid-state drive. Then, a response message can be sent to the client during the mirroring stage, and a real-time response can be achieved without waiting for all data blocks to be written, effectively reducing the delayed response time caused by data block writing, thereby improving the data write response efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0111] FIG1 is a flow chart of a data writing method provided by the present application;

[0112] FIG2 is a schematic diagram of the structure of a solid-state hard disk provided by the present application;

[0113] FIG3 is a second flow chart of the data writing method provided by the present application;

[0114] FIG4 is a schematic structural diagram of a data writing device provided by the present application;

[0115] FIG5 is a schematic structural diagram of the electronic device provided in this application. DETAILED DESCRIPTION

[0116] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions in this application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0117] The data writing method of the present application is described below in conjunction with Figures 1 to 3. The data writing method in this embodiment can be applied to various devices that require data writing, such as a hyper-converged all-in-one machine or a single server. Among them, the hyper-converged all-in-one machine is a multi-server cluster that integrates computing, storage, and network, and integrates hardware and software. The underlying storage system of the hyper-converged all-in-one machine requires the use of multiple sets of solid-state disks, and data shared storage can be performed; the underlying storage system of the hyper-converged all-in-one machine is composed of a pooled virtual device, which breaks the limitations of the physical host.

[0118] The following describes the data writing method provided in this embodiment using a hyper-converged all-in-one machine as an example application scenario.

[0119] FIG1 is a flow chart of a data writing method provided in this embodiment, which includes the following steps:

[0120] Step 101: Receive a data write request sent by a target object, and obtain the data to be written and the write strategy of the data to be written according to the data write request;

[0121] The target object may be a front-end system of the host to which the target solid-state drive belongs or other hosts that share storage with the host to which the target solid-state drive belongs, etc., which is not limited in this embodiment.

[0122] The data write request is used to request writing of data to be written, and is issued when data writing is required.

[0123] A data write request can be user input from the host's front-end system, or it can be information generated by the host's controller under certain conditions, such as a timer-triggered data write request. User input can be information input through touch input, drop-down selection input, voice input, gesture input, visual input, brain-computer input, etc.

[0124] Optionally, data write requests are monitored in real time, and when a data write request is monitored, the data to be written and the write strategy for the data to be written are directly parsed from the data write request; or a write request identifier is parsed from the data write request, and a corresponding data to be written identifier and a write strategy identifier are obtained based on the write request identifier, so as to obtain the corresponding data to be written and the write strategy for the data to be written based on the data to be written identifier and the write strategy identifier. This embodiment does not limit this.

[0125] After obtaining the write policy, you can store it in the log partition so that you can access it at any time.

[0126] The data to be written is data required to be written to the target solid-state drive, and includes at least one original data block.

[0127] The write strategy includes, but is not limited to, the destination address, verification strategy, and write order required for each data block in the data to be written, which are not limited in this embodiment.

[0128] Step 102: pre-processing each original data block in the data to be written to obtain a plurality of pre-processed data blocks of the data to be written; the pre-processing includes segmentation and / or integration;

[0129] Since the sizes of the original data blocks in the data to be written are different and have a certain degree of randomness, the actual amount of physical data written is many times the amount of data written, which in turn leads to serious write amplification problems in solid-state disks. In addition, users have increasingly high requirements for data copies (such as RAID5, RAID6 or RAID10, etc.), resulting in the all-flash hyper-converged machine being unable to achieve the expected performance in many scenarios (a large number of random small block data write requests), greatly affecting the customer experience.

[0130] To address these issues, related technologies have proposed solutions, such as reducing the number of random writes of small blocks of data at the code logic level to achieve batch write compression. However, this solution relies heavily on the design of the top-level software system and cannot adapt to changing customer needs. Another example is using solid-state disk master chips to compress written data, which relies heavily on hardware support and has performance implications. However, hyper-converged appliances cannot control the code logic of top-level applications and need to host a variety of applications. They also cannot be strongly bound to related hardware and require compatibility with multiple solid-state drives, making them difficult to apply to hyper-converged appliances.

[0131] The method provided in this embodiment pre-processes the small blocks of random write data in the data to be written received by the all-flash hyper-converged appliance before writing the data to the first partition. That is, the small blocks of data in the data to be written are merged and the large blocks of data are split and reorganized so that the re-merged and split data blocks are compatible with the minimum processing unit of the solid-state disk erasure operation. This can reduce the write amplification problem caused by multiple requests for solid-state disk erase blocks (that is, data blocks) and reduce the additional loss caused by solid-state disk write amplification, so as to prepare for subsequent whole-block writes to the solid-state disk.

[0132] The preprocessed data block here is the data block finally formed after segmentation and / or integration preprocessing.

[0133] The order of the splitting and combining steps here can be configured according to actual needs, such as splitting first and then combining, or combining first and then splitting.

[0134] Step 103 , mirroring the plurality of pre-processed data blocks to the first partition of the target solid-state drive; wherein the first partition is a data cache space for caching data to be written, and the second partition is a data storage space for storing data to be written.

[0135] As shown in Figure 2, it is a schematic diagram of the structure of the target solid-state hard disk; the storage chip of the target solid-state hard disk can be divided into at least three partitions, namely the first partition, the second partition and the log partition; among them, the first partition is the data cache space for data to be cached and written, the second partition is the data storage space for data to be written, and the log partition is used to store various operation logs and write strategies.

[0136] As shown in FIG3 , after the original data blocks to be written are re-divided and combined, the multiple pre-processed data blocks obtained by pre-processing are mirrored to multiple image files in the first partition of the target solid state drive, which is not limited in this embodiment.

[0137] The mirroring mode may be RAID1, RAID5, RAID6 or RAID10, etc., which is not limited in this embodiment.

[0138] It should be noted that the two copies of the mirror can be placed in different failure domains to prevent data corruption due to copy loss.

[0139] By mirroring multiple pre-processed data blocks to be written to multiple mirror files in the first partition, data redundancy can be achieved. This not only ensures that when the data in one of the mirror files fails, data synchronization can be performed from another mirror file, but also facilitates reading data directly from the mirror file when the original data is busy, thereby improving reading performance and improving the reliability of data reading and writing through mirror fault tolerance.

[0140] Step 104: Obtain response information corresponding to the data to be written based on the mirroring result, and send the response information to the target object; the response information includes write status information;

[0141] Optionally, since a log partition can be used to save the mirroring results in real time during the mirroring process, after the mirroring is completed, the mirroring results can be obtained from the log partition to determine the mirroring status of the multiple pre-processed data blocks mirrored by the first partition based on the mirroring results, and to further determine whether each pre-processed data block is completely and correctly mirrored to the first partition based on the mirroring status;

[0142] Once it is determined that all pre-processed data blocks are completely and correctly mirrored to the first partition, it can be ensured that the data to be written can be completely and correctly written from the first partition to the second partition, and a response message indicating that the write status of the data to be written is a successful write can be sent to the target object in real time to improve the response efficiency. After sending the response message, the pre-processed data blocks to be written can be quickly written from the first partition to the second partition of the target solid-state hard disk in a short period of time without the client's perception.

[0143] When it is determined that some pre-processed data blocks cannot be completely and correctly mirrored to the first partition, the data to be written mirrored in the first partition can be quickly updated within a certain delay period, so that the pre-processed data blocks with data to be written are completely and correctly mirrored in the updated first partition. In this case, the response information indicating that the write status of the data to be written is successful can also be sent to the target object in real time.

[0144] If the pre-processed data blocks of the data to be written cannot be completely and correctly mirrored in the updated first partition within a certain delay period, it cannot be ensured that the multiple pre-processed data blocks of the data to be written can be completely and correctly written from the first partition to the second partition. At this time, a response message indicating that the write status of the data to be written is write failure is sent to the target object in real time.

[0145] Among them, the method of further determining whether each pre-processed data block is completely and correctly mirrored to the first partition according to the mirroring status includes: determining whether there is an abnormal data block among the multiple pre-processed data blocks mirrored by the first partition according to the mirroring status, that is, whether there is a data block in a mirroring failure state or a data block in a verification failure state; if it is determined according to the mirroring status that there is an abnormal data block among the multiple pre-processed data blocks mirrored by the first partition, then it is determined that the pre-processed data block cannot be completely and correctly mirrored to the first partition; if it is determined according to the mirroring status that there is no abnormal data block among the multiple pre-processed data blocks mirrored by the first partition, then it is determined that all pre-processed data blocks can be completely and correctly mirrored to the first partition.

[0146] In this embodiment, a plurality of pre-processed data blocks to be written are first cached in the first partition by adopting a data mirroring method, and the reliability of data reading and writing is improved by using mirroring fault tolerance. Even if there is a write failure, the data can be quickly updated in the first partition of the local target solid-state hard disk, avoiding the request delay required for re-requesting data from the target object, thereby improving data writing performance and writing efficiency. In addition, since the data mirroring process does not consider the original write strategy of the data, the mirroring efficiency is significantly higher than the data writing efficiency. In addition, by adopting data mirroring, it is determined whether the image of the data to be written can be completely and correctly written from the first partition to the second partition of the target solid-state hard disk, that is, a response information can be sent to the client in the mirroring stage, without waiting for all data blocks to be written, and a real-time response can be achieved, effectively reducing the delayed response time caused by the data block writing, thereby improving the data writing response efficiency, and thus improving the user experience.

[0147] Step 105 , writing each pre-processed data block from the first partition to the second partition of the target solid state drive;

[0148] As shown in Figure 3, while sending the response information to the target object, the resource usage of the second partition is monitored, so that when there are idle resources in the second partition, the pre-processed data blocks in the first partition are written to the disk according to the corresponding write strategy of the data write request (that is, the data is written to the second partition). At the same time, the written pre-processed data blocks can also be subjected to consistency checks and other related checks. This process is not perceived by the end customer.

[0149] Optionally, a write strategy can be obtained in the log partition, and each pre-processed data block in the data to be written can be written from the first partition to the second partition according to the destination address and writing order of the data to be written in the write strategy. The pre-processed data blocks that have been written can also be verified according to the verification strategy in the write strategy to determine that each pre-processed data block of the data to be written can be completely and correctly written to the second partition from the first partition.

[0150] The data writing method provided in this embodiment pre-processes the data to be written and mirrors the pre-processed data blocks to the first partition of the target solid-state drive. On the one hand, data redundancy can be achieved through data mirroring, and the problem of data write amplification can be avoided through data pre-processing, thereby effectively ensuring the effective writing of the data to be written. On the other hand, after obtaining the mirroring result, it can be determined whether the data to be written can be completely and correctly mirrored to the first partition of the target solid-state drive, and further determined whether the data to be written can be completely and correctly written from the first partition to the second partition of the target solid-state drive. Then, a response message can be sent to the client during the mirroring stage, without waiting for all data blocks to be written. A real-time response can be achieved, effectively reducing the delayed response time caused by data block writing, thereby improving the data writing response efficiency.

[0151] In some embodiments, obtaining response information corresponding to the data to be written according to the mirroring result includes:

[0152] According to the mirroring result, determining whether there is an abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition; the abnormal data block includes a data block in a mirroring failure state or a data block in a verification failure state;

[0153] When it is determined that there is no abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition, the response information is determined to be first response information; the first response information includes response information that the write status of the data to be written is write successful.

[0154] Optionally, after obtaining the mirroring result (that is, the mirroring result after all pre-processed data blocks in the data to be written are mirrored), the mirroring status and verification status of each pre-processed data block in the data to be written mirrored by the first partition can be directly obtained according to the mirroring result, that is, the mirroring process includes not only data mirroring but also data verification.

[0155] If it is determined based on the mirroring status and the verification status that there are no pre-processed data blocks that fail mirroring or verification among the multiple pre-processed data blocks mirrored by the first partition, that is, all pre-processed data blocks in the data to be written mirrored by the first partition are in a mirroring success and verification success state, then it indicates that each pre-processed data block in the data to be written mirrored by the first partition is completely and correctly written to the first partition. On the one hand, since the first partition caches complete and correct data to be written, on the other hand, data redundancy can be achieved through data mirroring, and thus the effective writing of the data to be written can be effectively ensured. At this time, the write success response information can be fed back to the target object, so that the data response efficiency can reach the RAID1 level, effectively improving the data write response efficiency.

[0156] In some embodiments, the method further comprises:

[0157] When it is determined that an abnormal data block exists in the plurality of pre-processed data blocks mirrored by the first partition, a maximum delay duration is obtained from a configuration file of the target solid-state drive;

[0158] During the maximum delay time, the plurality of pre-processed data blocks mirrored in the first partition are updated until an update stop condition is satisfied;

[0159] Get response information based on the update result;

[0160] The update stop condition includes that there is no abnormal data block in the plurality of pre-processed data blocks mirrored in the first partition, and / or the update duration reaches a maximum delay duration.

[0161] It should be noted that the maximum delay time is determined based on the minimum tolerable delay required by the user to read the data to be written and the safety margin delay time. That is, if the write status of the data to be written is fed back to the user as a response information of successful write, it is necessary to ensure that the data can be successfully mirrored within the maximum delay time to further ensure that the data to be written can be successfully obtained when the user needs to read the data to be written. This can achieve the goal of improving the user experience while ensuring the successful writing of the data and ensuring the efficiency of the data write response.

[0162] Optionally, if there are data blocks that failed to be mirrored or pre-processed data blocks that failed verification among the multiple pre-processed data blocks mirrored by the first partition, it indicates that there are abnormal data blocks that have not been completely and correctly written among the multiple pre-processed data blocks mirrored by the first partition. In this case, the data blocks that failed to be mirrored or the pre-processed data blocks that failed verification can be treated as abnormal data blocks, and the multiple pre-processed data blocks mirrored by the first partition can be updated within the maximum delay time until there are no abnormal data blocks among the multiple pre-processed data blocks mirrored in the first partition and / or the update time reaches the maximum delay time, then the update is stopped. Based on the update results, it is determined whether all pre-processed data blocks have been successfully mirrored and verified during the update process, so as to determine whether the response information of write failure or write success will be fed back to the target object accordingly.

[0163] The method provided in this embodiment can update the multiple pre-processed data blocks mirrored in the first partition within the maximum delay time by using the presence of abnormal data blocks in the multiple pre-processed data blocks mirrored in the first partition, that is, configure fault tolerance measures for data writing, and further determine response information of write failure or write success based on the update result, thereby improving the fault tolerance of data writing while improving user experience and ensuring data write response efficiency.

[0164] In some embodiments, obtaining response information according to the update result includes:

[0165] If it is determined according to the update result that abnormal data blocks exist in the plurality of pre-processed data blocks mirrored by the first partition during each update process, the response information is determined to be second response information; the second response information includes response information indicating that the write status of the data to be written is write failure;

[0166] When it is determined according to the update result that no abnormal data block exists in the plurality of pre-processed data blocks mirrored in the first partition during at least one update process, the response information is determined to be the first response information.

[0167] Optionally, if during any update process, it is determined that there are no data blocks that failed to be mirrored or data blocks that failed to be verified among the multiple pre-processed data blocks mirrored by the first partition, it can be determined that the data to be written is completely and correctly mirrored to the first partition of the target solid-state drive. At this time, the response information of the successful write can be fed back to the target object, so that the data response efficiency can reach the RAID1 level; if during all update processes, it is determined that there are still data blocks that failed to be mirrored or data blocks that failed to be verified among the multiple pre-processed data blocks mirrored by the first partition, it can be determined that the data to be written cannot be completely and correctly mirrored to the first partition of the target solid-state drive. At this time, the response information of the write failure can be fed back to the target object.

[0168] The method provided in this embodiment updates multiple pre-processed data blocks of the mirrored data to be written in the first partition within the maximum delay time, and further determines the response information of write failure or write success based on the update result. This can further improve the fault tolerance of data writing while improving the user experience and ensuring the data write response efficiency.

[0169] In some embodiments, determining whether there is an abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition according to the mirroring result includes:

[0170] Determining, according to the mirroring result, a first to-be-checked data block in a mirroring success state among the plurality of pre-processed data blocks;

[0171] Obtain a first code value and a second code value of a first data block to be checked; the first code value is a code value generated before the first data block to be checked is mirrored to the first partition; the second code value is a code value generated in each mirror file in the first partition after the first data block to be checked is mirrored to each mirror file;

[0172] Verify the first data block to be verified according to the first code value and the second code value of the first data block to be verified to obtain a verification result;

[0173] According to the verification result, it is determined whether there is an abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition.

[0174] Optionally, a first data block to be verified that is in a successfully mirrored state among the plurality of pre-processed data blocks is selected based on the mirroring result, and a coding value generated before the first data block to be verified is mirrored to the first partition, i.e., a first coding value, and a coding value generated by mirroring the first data block to be verified in each mirror file, i.e., a second coding value, are obtained. The encoding method required before mirroring to the first partition and after mirroring the first data block to be verified is the same, such as using MD5 encoding.

[0175] Since the encoding method used before and after mirroring to the first partition is the same, if the first data block to be verified is completely and correctly mirrored to the first partition, it is necessary to ensure that the encoding of the first data block to be verified is consistent before and after mirroring to the first partition.

[0176] Therefore, next, it is necessary to compare the first coding value and the second coding value of the first data block to be checked to determine whether the coding values ​​of the first data block to be checked are all the same (that is, whether the second coding values ​​are the same as the first coding values), so as to determine whether the first data block to be checked passes the verification based on the comparison result, and then determine whether there is an abnormal data block in the data to be written mirrored by the first partition, that is, whether the first data block to be checked is an abnormal data block.

[0177] Here, the order in which the second code value and the first code value of the first data block to be verified in each image file are compared can be determined based on actual needs. For example, the second code value of the first data block to be verified in each image file can be compared first, and then compared with the first code value of the first data block to be verified; alternatively, the second code value of the first data block to be verified in each image file can be compared with the first code value of the first data block to be verified.

[0178] The method provided in this embodiment can efficiently and accurately determine whether there are abnormal data blocks in the multiple pre-processed data blocks mirrored by the first partition by comparing whether the encoding of the first data block to be checked is consistent before and after mirroring to the first partition. This can improve the simplicity of data verification while further improving the efficiency of data write response information feedback.

[0179] In some embodiments, verifying the first data block to be verified based on the first code value and the second code value of the first data block to be verified to obtain a verification result includes:

[0180] Comparing the second encoding value of the first data block to be verified in each mirror file to obtain a first comparison result;

[0181] If it is determined according to the first comparison result that the second code value of the first data block to be checked in each mirror file is the same, the second code value of the first data block to be checked in any mirror file is compared with the first code value of the first data block to be checked to obtain a second comparison result;

[0182] When it is determined according to the second comparison result that the second coding value is identical to the first coding value, the verification result is determined to be that the verification of the first data block to be verified is successful.

[0183] Optionally, the step of verifying the first data block to be verified includes:

[0184] First, the second code values ​​of the first data block to be verified in each mirror file are compared to see if they are the same. If they are the same, the second code value of the first data block to be verified in one of the mirror files needs to be further compared with the first code value of the first data block to be verified to determine whether the code values ​​of the first data block to be verified before and after mirroring are the same, and then determine whether the first data block to be verified that is successfully mirrored in each mirror file can pass the verification, that is, to verify whether the first data block to be verified is correct and complete.

[0185] If it is further determined according to the second comparison result that the second coding value is also the same as the first coding value, it indicates that the verification of the first data block to be verified is successful.

[0186] If all pre-processed data blocks in the data to be written to the first partition are in the mirroring success state and pass the verification, it indicates that the data to be written can be completely and correctly mirrored to the first partition. At this time, a response message indicating that the write status of the data to be written is successful can be sent to the target object.

[0187] The method provided in this embodiment can simply and conveniently verify the correctness and integrity of the data to be written mirrored to the first partition by comparing the encoding consistency of the first data block to be verified before and after mirroring to the first partition, and can provide response information feedback to the target object in real time based on the verification result, thereby ensuring that the data to be written can be effectively written to the second partition while further improving the efficiency of data write response information feedback.

[0188] In some embodiments, the method further comprises:

[0189] If it is determined according to the first comparison result that the second code values ​​of the first data block to be checked in each mirror file are different, the second code value of the first data block to be checked in each mirror file is compared with the first code value of the first data block to be checked to obtain a third comparison result;

[0190] If it is determined according to the third comparison result that the second code value of the first data block to be verified in each image file is different from the first code value of the first data block to be verified, determining that the verification result is that the first data block to be verified has failed verification;

[0191] During the maximum delay period, multiple pre-processed data blocks mirrored in the first partition are updated, including:

[0192] Within the maximum delay time, the first data block to be verified is re-mirrored to each mirror file of the first partition.

[0193] Optionally, if in the first comparison result, it is determined that the second coding values ​​of the first data block to be checked in each mirror file are different, it indicates that a write exception occurs when the mirror data is written to the mirror file. At this time, it is necessary to further compare with the first coding value of the first data block to be checked to further locate the root cause of the mirror error, that is, to determine whether the exception occurs during the data reading process, causing the exception of the first data block to be checked written in the mirror file, or the exception occurs during the data writing process.

[0194] Optionally, if it is determined that the second coding value of the first data block to be verified in each mirror file is different from the first coding value of the first data block to be verified, it indicates that an abnormality has occurred in both the data reading process and the data writing process to the mirror file. In this case, it indicates that the verification of the first data block to be verified has failed, that is, there is an abnormal data block in the data to be written (that is, multiple pre-processed data blocks) mirrored by the first partition. At this time, it is necessary to re-initiate the data mirroring request and make multiple re-mirroring requests within the maximum delay time until there are no abnormal data blocks in the multiple pre-processed data blocks mirrored in the first partition of each mirror file, and / or the update time reaches the maximum delay time, and then stop the re-mirroring operation. Based on the re-mirroring result, the corresponding response information can be sent to the target object.

[0195] The method provided in this embodiment can accurately locate the root cause of the abnormal mirroring of the first data block to be checked, and promptly perform repairs to determine the correctness and integrity of the data to be written mirrored to the first partition, by further comparing the second code value of the data block with the first code value of the first data block to be checked when the second code value of the first data block to be checked in each mirror file is different. This ensures that the data to be written can be effectively written to the second partition, and further improves the efficiency of data write response information feedback.

[0196] In some embodiments, the method further comprises:

[0197] If it is determined, based on the third comparison result, that the first image file and the second image file exist in the first partition, determining that the verification result is that the first data block to be verified has failed verification; wherein the second coding value of the first data block to be verified in the first image file is the same as the first coding value of the first data block to be verified, and the second coding value of the first data block to be verified in the second image file is different from the first coding value of the first data block to be verified;

[0198] During the maximum delay period, multiple pre-processed data blocks mirrored in the first partition are updated, including:

[0199] The plurality of pre-processed data blocks mirrored in the first mirror file are synchronized to the second mirror file within the maximum delay time.

[0200] Optionally, if in the third comparison result, it is determined that in the first partition, the second coding value of the first data block to be verified in some of the first mirror files is the same as the first coding value of the first data block to be verified, and the second coding value of the first data block to be verified in some of the second mirror files is different from the first coding value of the first data block to be verified, then it indicates that an abnormality occurs in the second image file when writing mirror data. At this time, the mirror data of the second image file can be discarded, and a copy of the mirror data can be requested to be synchronized from the first mirror file for writing, so that each mirror file in the first partition completely and correctly mirrors the data to be written.

[0201] The method provided in this embodiment, on the one hand, directly performs data repair locally, and can provide response information feedback, effectively improving the efficiency of information response; on the other hand, it can provide a redundant copy for data writing to the second partition. Even if the second partition fails to write through one mirror file, data can be directly written through another mirror file. The data can be rewritten on the local end without the need to frequently access the target object, reducing the data request delay and the data remote transmission delay, effectively ensuring data writing performance while improving data writing efficiency.

[0202] In some embodiments, step 105 further includes:

[0203] When it is monitored that the remaining storage capacity of the second partition is greater than or equal to the preset storage capacity, obtaining a write strategy for the data to be written according to the data write request;

[0204] Determining a write priority of each pre-processed data block according to a write order in the write strategy and / or a cache duration of each pre-processed data block in the first partition;

[0205] According to the write priority, each pre-processed data block is written from the first partition to the second partition of the target solid state drive.

[0206] Optionally, when writing each pre-processed data block mirrored by the first partition into the second partition, it is necessary to monitor the resource usage of the second partition in real time, so as to obtain the remaining storage capacity of the second partition based on the resource usage, and compare the remaining storage capacity with the preset storage capacity to determine whether there are idle resources in the second partition for writing the data to be written; if so, determine the first write priority of each pre-processed data block according to the write order in the write strategy and / or determine the second write priority according to the cache length of each pre-processed data block in the first partition; and determine the final write priority of each pre-processed data block according to the first write priority and / or the second write priority;

[0207] Here, the method of determining the final write priority of each pre-processed data block includes: taking the first write priority or the second write priority as the final write priority, or taking the highest priority between the first write priority and the second write priority as the final write priority.

[0208] Then, according to the final write priority of each pre-processed data block and the write address in the write strategy, each pre-processed data block is written to the corresponding position of the second partition from one of the mirror files in the first partition to achieve adaptive writing of data and avoid affecting user use. That is, the write operation is processed in a hierarchical manner to respond to the customer's multi-copy write request and the problem of increased latency caused by the customer's multi-copy write request. The performance of the solid-state disk is fully utilized while ensuring accurate writing, thereby improving the performance of the all-flash hyper-converged machine and enhancing the customer experience.

[0209] In some embodiments, determining the write priority of each pre-processed data block according to the cache duration of each pre-processed data block in the first partition includes:

[0210] If there is any pre-processed data block in the first partition whose cache duration is greater than or equal to the maximum delay duration, it is determined that the write priority of any pre-processed data block is the highest; the maximum delay duration is obtained from the configuration file of the target solid state drive.

[0211] Optionally, during the data writing process, it is necessary to monitor in real time the cache duration of each pre-processed data block in the first partition that has not been written to the second partition. If there is any pre-processed data block whose cache duration is greater than or equal to the maximum delay duration, it is necessary to configure the highest write priority for it so that the operation of writing to the second partition can be completed first to avoid affecting the user's use of data in the second partition, improve the user experience, and further achieve the full performance of the solid-state disk while ensuring accurate writing, thereby improving the performance of the all-flash hyper-converged machine and enhancing customer perception.

[0212] In some embodiments, after step 105, the method further includes:

[0213] Obtaining a pre-processed data block in a write-completed state as a second data block to be verified;

[0214] Verifying the second data block to be verified;

[0215] When it is determined according to the verification result that the second data block to be verified has failed verification, obtaining a write log of the second data block to be verified in the log partition of the target solid-state drive;

[0216] Determine a target image file from the plurality of image files in the first partition according to the write log;

[0217] The second data block to be verified is written from the target image file to the second partition of the target solid-state hard disk.

[0218] The write verification strategy included in the write strategy includes a first verification strategy, a second verification strategy, or a third verification strategy. The first verification strategy includes a strategy that does not perform data verification if data accuracy verification has been completed in the first partition. The second verification strategy includes a consistency verification strategy. The third verification strategy includes a data accuracy verification strategy and a consistency verification strategy. The execution steps of the data accuracy verification strategy are similar to the verification steps performed for the mirrored data of the first partition and are not repeated here.

[0219] Optionally, after the write operation of writing each pre-processed data block of the data to be written from the first partition to the second partition is completed, the pre-processed data block in which the writing is completed, that is, the second data block to be verified, can be further checked to ensure that each pre-processed data block of the data to be written is completely and correctly written to the second partition.

[0220] According to the verification strategy included in the write strategy, the second data block to be verified is verified accordingly, and a verification result is obtained. If the verification result shows that the second data block to be verified passes the verification, it indicates that the data block has been successfully written to the second partition; if the verification result shows that the second data block to be verified fails the verification, it indicates that the data block has not been correctly and completely written to the second partition, that is, the write has failed. In this case, it is necessary to obtain the write log of the second data block to be verified in the log partition of the target solid-state drive based on the encoding of the second data block to be verified, so as to determine from the write log the historical image file used by the second data block to be verified to write to the second partition, and select a new image file other than the historical image file from the multiple image files in the first partition as the target image file.

[0221] Then, within the maximum delay time, multiple rewrite requests are initiated to rewrite the second data block to be verified from the target image file to the second partition of the target solid-state hard disk to achieve data repair, until the second data block to be verified written to the second partition is successfully verified or the rewrite time reaches the maximum delay time, so as to meet the user's demand for writing data while ensuring that all pre-processed data blocks of the data to be written are completely and correctly written to the second partition.

[0222] In some embodiments, verifying the second data block to be verified includes:

[0223] In a case where a write strategy for the data to be written includes a consistency check strategy, calculating a parity check value of a second data block to be checked;

[0224] The parity check value of the second data block to be checked is compared with a preset parity value, and the second data block to be checked is checked according to the comparison result.

[0225] Optionally, the write verification strategy included in the write strategy includes a consistency verification strategy, which can be achieved by calculating the parity value of the second data block to be verified and checking it with the preset parity value on the verification disk. If the parity values ​​are the same, the verification passes, indicating that the data block is successfully written to the second partition; if the parity values ​​are different, the verification fails, and the target mirror file is determined to initiate multiple requests to rewrite to the second partition within the maximum delay time according to the write log until the data block is successfully written.

[0226] The method provided in this embodiment can achieve data consistency verification by performing parity check on the data blocks written to the second partition, thereby ensuring that each pre-processed data block of the data to be written is completely and correctly written to the second partition, thereby improving data writing performance.

[0227] In some embodiments, the step of mirroring the plurality of pre-processed data blocks to the first partition of the target solid-state drive in step 103 further includes:

[0228] According to the plurality of pre-processed data blocks, a mirror request is sent to the first partition, so that the first partition calls the target logical storage block according to the mirror request and the local logical address management table, and mirrors each pre-processed data block to the first partition.

[0229] Optionally, after obtaining multiple pre-processed data blocks, a mirror request can be sent to the first partition at any time, so that after receiving the mirror request, the first partition calls the idle target logical storage block according to the local logical address management table to perform data mirroring on each pre-processed data block.

[0230] In some embodiments, preprocessing each original data block in the data to be written to obtain multiple preprocessed data blocks of the data to be written includes:

[0231] Obtaining a configuration file of the target solid-state drive, and obtaining a preset data block specification from the configuration file; sorting each original data in the data to be written according to the data block specification of each original data;

[0232] According to the sorting result, each original data is added to the first data queue to obtain a second data queue;

[0233] Splitting data blocks in the second data queue whose data block size is larger than the preset data block size according to the preset data block size;

[0234] The second data queue is updated according to the segmentation result to obtain a third data queue;

[0235] Integrate the data blocks in the third data queue whose data block size is smaller than the preset data block size according to the preset data block size, and update the third data queue according to the integration result to obtain the target data queue;

[0236] Determine the pre-processing data blocks according to the data blocks in the target data queue.

[0237] The preset data block size is configured according to an integer multiple of the minimum processing unit of the erase operation, such as 1 times, 2 times, etc., of the minimum processing unit of the erase operation.

[0238] Optionally, the steps of data segmentation and integration include:

[0239] First, the original data to be written are sorted from largest to smallest according to the data block specifications and added to the first data queue to obtain the second data queue. In the second data queue, each data block is recorded as Mi (M1 / M2 / M3 / M4...), and the data blocks in the second data queue are sorted and judged (new data blocks will continue to be added to the second data queue over time);

[0240] The preset data block size is configured as bs, and the data blocks with a data block size larger than bs in the second data queue are first split according to the multiple of bs, and the split data blocks are updated to the second data queue as new data blocks for sorting and refreshing the data block queue to obtain the third data queue; after all data blocks larger than bs are processed, small data blocks with a data block size smaller than bs are selected from the latest data block queue (that is, the third data queue), and the data block Mj with the largest data size is selected from the small data blocks and the difference Ni with bs is calculated, and the remaining data block queues are refreshed, and then the data blocks are sorted from the third data queue according to the first difference. The data block closest to the difference Ni is selected from the data queue for merging, and the third data queue is updated based on the merging result (the two merged small data blocks are also updated to the new merged data block). The difference Ni between the merged data block and bs is then calculated. Then, a data block smaller than the difference Ni is searched again from the third data queue. If it can be found, the merging is continued, and the third data queue is updated based on the merging result, and the difference Ni is calculated. This process continues until no data block smaller than Ni is found. The remaining small data blocks are then merged and the data queue is updated according to the above merging logic to obtain the target data queue. The data blocks in the target data queue are then directly used as preprocessing data blocks.

[0241] The method provided by this implementation can concentrate as small a database as possible into certain logical storage blocks to avoid frequent access bottlenecks when subsequent read requests occur. It can also reduce the complexity of logical storage block management, improve data storage performance, and reduce the additional loss caused by solid-state disk write amplification.

[0242] In some embodiments, after executing step 105, the method further includes: determining a written data block in a successful write state among multiple pre-processed data blocks; updating the local logical address management table of the first partition based on the written data block, and erasing the written data block in the first partition.

[0243] Optionally, during the data writing process, if it is determined that there is a pre-processed data block in the data to be written that has been successfully written (the write status is writing completed and passed verification) to the second partition, it will be treated as a written data block, the relevant pre-processed data block in the first-level partition can be erased, and the status of the relevant logical storage block in the first-level partition can be reset. At the same time, the local logical address management table is updated to clear out more logical storage blocks to provide storage space for subsequent data writing.

[0244] In some embodiments, before executing step 103, the method also includes: performing initialization operations on the first partition and the second partition to obtain initialization results; when it is determined that there is alarm information in the initialization result, matching the alarm information with preset keywords in the knowledge base to obtain at least one target keyword that matches the alarm information; determining candidate processing strategies corresponding to each target keyword in the knowledge base; determining a first target processing strategy corresponding to the alarm information based on the candidate processing strategies corresponding to each target keyword; and calling the processing component corresponding to the first target processing strategy to process the alarm information.

[0245] Among them, initialization includes but is not limited to storage space initialization and configuration parameter initialization, which is not limited in this embodiment. For example, the initialization of the first partition at least includes: reading the parameter BlockSize in the configuration file (that is, the solid-state hard disk Block size, the minimum processing unit of the deletion operation, and the parameter value is determined by the hard disk specification), calling the trim() function on the first-level partition according to BlockSize to perform an erase action to clear more whole blocks of space that are multiples of BlockSize; and initializing the local logical address management table to perform real-time scheduling and management of the logical storage blocks in the first-level partition at any time, so as to facilitate the rapid writing of subsequent data, and record related operations in the log partition.

[0246] Optionally, during the initialization process, the initialization result is monitored in real time to determine whether there is any alarm information. If there is any alarm information, the fault tolerance module is called to perform alarm processing.

[0247] Here, the knowledge base in the fault-tolerant module pre-stores the mapping relationship between alarm information keywords and processing strategies, as well as the mapping relationship between each processing strategy and each processing component, to provide automated alarm processing operations. The mapping relationship here can be a many-to-many relationship.

[0248] After receiving the alarm information, the fault-tolerant module first calls all the preset keywords in the knowledge base to perform keyword matching on the alarm information. If there is a target keyword that matches the alarm information, the candidate processing strategy corresponding to the target keyword is obtained until all preset keywords in all knowledge bases are matched;

[0249] The candidate processing strategies corresponding to all target keywords are integrated to obtain the first target processing strategy, and the processing component corresponding to the first target processing strategy is called to automatically process the alarm information to improve fault tolerance and ensure data writing performance.

[0250] Here, the fusion method can be to select the candidate processing strategy with the largest number of occurrences as the first target processing strategy, or to integrate the candidate processing strategies corresponding to all target keywords to obtain a comprehensive processing strategy as the first target processing strategy. This embodiment does not limit this.

[0251] In some embodiments, the first target processing strategy corresponding to the alarm information is determined based on the candidate processing strategies corresponding to each target keyword, including: determining the correlation between each candidate processing strategy and the alarm information based on the number of each candidate processing strategy; and determining the candidate processing strategy with the largest correlation as the first target processing strategy.

[0252] Optionally, if a candidate processing strategy is matched during the matching process, the correlation degree is recorded as r. In a subsequent matching process, if the candidate processing strategy is matched again, the correlation degree is updated to 2r. The correlation degree of each candidate processing strategy is recorded in this way until all preset keywords are matched. At this time, the candidate processing strategy with the highest correlation degree is found as the first target processing strategy, and the relevant automated processing operation is called. By determining the correlation degree between each candidate processing strategy and the alarm information based on the number of each candidate processing strategy, the processing strategy corresponding to the alarm information can be quickly and accurately obtained, effectively improving fault tolerance efficiency and further improving data writing efficiency.

[0253] In some embodiments, the method further includes: obtaining the processing result of the alarm information; when the processing result of the alarm information is successful, extracting keywords from the alarm information to obtain new keywords; and updating the new keywords and the first target processing strategy to the knowledge base.

[0254] Optionally, after the alarm is processed, the results need to be monitored in real time to determine whether the alarm has been successfully processed, that is, whether the alarm has been resolved. If the alarm is successfully resolved, the alarm keywords and the corresponding first-target processing strategies are extracted and added to the knowledge base in the form of mapping relationships. This continuously increases the knowledge base content, improves fault tolerance, and further enhances data writing performance.

[0255] In some embodiments, the method also includes: when the processing result of the alarm information is a processing failure, sending the alarm information to the client, so that the client can process the alarm information according to the second target processing strategy; monitoring the alarm processing information returned by the client, and obtaining the second target processing strategy when it is determined that the processing status of the alarm information is a processing success based on the alarm processing information; and updating the new keywords extracted from the alarm information to the knowledge base with the second target processing strategy.

[0256] Optionally, after the alarm is processed, the results of the processing are monitored in real time to determine whether the alarm has been successfully processed, that is, whether the alarm has been resolved. If the alarm is not resolved, the solid-state drive is marked as temporarily unavailable and the alarm is sent to the client, awaiting manual intervention to resolve it.

[0257] After the alarm information is manually resolved, the alarm keywords and corresponding second-target processing strategies are extracted and added to the knowledge base so that similar problems encountered in the future can be automatically processed, improving fault tolerance efficiency and further improving data writing efficiency.

[0258] In some embodiments, step 103 further includes:

[0259] mirroring the plurality of pre-processed data blocks to a primary cache space and a backup cache space of a first partition; the primary cache space and the backup cache space belong to different fault domains;

[0260] Writing each pre-processed data block from the first partition to the second partition of the target solid-state drive includes:

[0261] Each pre-processed data block is written into the second partition from any cache space of the primary cache space and the backup cache space.

[0262] The first partition includes at least one set of primary cache space and backup cache space belonging to different fault domains to prevent cache data from being damaged due to copy loss; each cache space includes at least one mirror file.

[0263] Optionally, when performing data mirroring, each pre-processed data block can be mirrored to the main cache space and backup cache space of the first partition; it should be noted that during the data mirroring process, if one of the cache spaces is in a redundant failure state, each pre-processed data block can be mirrored to another cache space first, and after the cache space returns to normal, each pre-processed data block mirrored in the other cache space can be synchronized to the cache space.

[0264] Furthermore, when writing data, mirror files can be retrieved from either the primary or backup cache space to quickly and efficiently write each pre-processed data block to the second partition. It should be noted that during the data mirroring process, if writing data from one cache space fails, data can be written from another local cache space. This ensures that even in the event of a storage node failure and redundancy failure, each pre-processed data block can still be written and read, further improving write performance.

[0265] In some embodiments, before executing step 103, the method further includes:

[0266] According to the configuration file of the target solid-state drive, the partition ratio of each partition in the target solid-state drive is obtained;

[0267] Determine the capacity of the first partition and the capacity of the second partition according to the division ratio of each partition;

[0268] The target solid-state hard disk is partitioned according to the capacity of the first partition and the capacity of the second partition to obtain a first partition and a second partition.

[0269] Optionally, before using each partition of the target solid-state drive, it is necessary to divide the partitions according to the division ratio of each partition in the configuration file of the target solid-state drive.

[0270] Obtaining a configuration file of the target solid-state drive, parsing the configuration file to obtain the partition ratios of each partition, calculating the partition ratios of each partition, and determining the capacity of the first partition and the capacity of the second partition based on the partition ratios of each partition; then dividing the corresponding storage areas on the target solid-state drive based on the capacity of the first partition and the capacity of the second partition, thereby obtaining the first partition and the second partition. In addition, the target solid-state drive may also include a log partition. After the first partition and the second partition are obtained, the remaining storage space can be used as the log partition.

[0271] For example, when the division ratios of each partition are parsed from the configuration file, the division ratio of the first partition is 20%, the division ratio of the log partition is 5%, and the division ratio of the second partition is 75%, then 20% of the storage area can be divided into the first partition, 5% of the storage area can be divided into the log partition, and the remaining storage area can be divided into the second partition.

[0272] In addition, the configuration file can be updated in real time according to actual needs to re-divide the partitions.

[0273] The method provided in this embodiment can adaptively and accurately divide the target solid-state drive according to the division parameters in the configuration file, thereby providing users with more flexible and reliable read and write services.

[0274] The data writing device provided in the present application is described below. The data writing device described below and the data writing method described above can be referenced to each other.

[0275] As shown in Figure 4, it is a structural schematic diagram of the data writing device provided in this embodiment, which includes: an acquisition module 401 is configured to receive a data write request sent by a target object, and obtain the data to be written according to the data write request; a processing module 402 is configured to preprocess each original data block in the data to be written to obtain multiple preprocessed data blocks of the data to be written; the preprocessing includes segmentation and / or integration; the mirroring module 403 is configured to mirror the multiple preprocessed data blocks to the first partition of the target solid-state hard disk; the response module 404 is configured to obtain response information corresponding to the data to be written according to the mirroring result, and send the response information to the target object; the response information includes write status information; the writing module 405 is configured to write each preprocessed data block from the first partition to the second partition of the target solid-state hard disk; wherein the first partition is a data cache space for caching the data to be written, and the second partition is a data storage space for the data to be written.

[0276] The data writing device provided in this embodiment pre-processes the data to be written and mirrors the pre-processed data blocks to the first partition of the target solid-state hard disk. On the one hand, data redundancy can be achieved through data mirroring, and the problem of data write amplification can be avoided through data pre-processing, thereby effectively ensuring the effective writing of the data to be written. On the other hand, after obtaining the mirroring result, it can be determined whether the data to be written can be completely and correctly mirrored to the first partition of the target solid-state hard disk, and further determine whether the data to be written can be completely and correctly written from the first partition to the second partition of the target solid-state hard disk. Then, a response message can be sent to the client in the mirroring stage, and a real-time response can be achieved without waiting for all data blocks to be written, thereby effectively reducing the delayed response time caused by data block writing, thereby improving the data writing response efficiency.

[0277] The device provided in this embodiment is configured to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the process and details, which will not be repeated here.

[0278] The present application also provides a solid-state drive, including a control chip and a storage chip; as shown in FIG2 , the storage chip includes a first partition for providing data caching, a second partition for providing data writing, and a log partition for providing log storage and policy data storage. The control chip is configured to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the process and details, which will not be repeated here.

[0279] The solid-state hard disk provided by this embodiment pre-processes the data to be written and mirrors the pre-processed data blocks to the first partition of the target solid-state hard disk. On the one hand, data redundancy can be achieved through data mirroring, and the problem of data write amplification can be avoided through data pre-processing, thereby effectively ensuring the effective writing of the data to be written. On the other hand, after obtaining the mirroring result, it can be determined whether the data to be written can be completely and correctly mirrored to the first partition of the target solid-state hard disk, and further determine whether the data to be written can be completely and correctly written from the first partition to the second partition of the target solid-state hard disk. Then, a response message can be sent to the client in the mirroring stage, and there is no need to wait for all data blocks to be written. A real-time response can be achieved, which effectively reduces the delayed response time caused by the writing of data blocks, thereby improving the data writing response efficiency.

[0280] FIG5 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG5 , the electronic device may include: a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other via the communication bus 504. The processor 501 may call the logic instructions in the memory 503 to execute a data writing method, which includes: receiving a data writing request sent by a target object, and obtaining the data to be written according to the data writing request; preprocessing each original data block in the data to be written to obtain multiple preprocessed data blocks of the data to be written; the preprocessing includes segmentation and / or integration; mirroring the multiple preprocessed data blocks to the first partition of the target solid-state drive; obtaining response information corresponding to the data to be written based on the mirroring result, and sending the response information to the target object; the response information includes write status information; writing each preprocessed data block from the first partition to the second partition of the target solid-state drive; wherein the first partition is a data cache space for caching the data to be written, and the second partition is a data storage space for storing the data to be written.

[0281] In addition, the logic instructions in the above-mentioned memory 503 can be implemented in the form of a software functional unit and can be stored in a non-volatile readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the relevant technology or the 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, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0282] On the other hand, the present application also provides a computer program product, which includes a computer program, which can be stored on a non-volatile readable storage medium. When the computer program is executed by a processor, the computer can execute the data writing method provided by the above methods, which includes: receiving a data write request sent by the target object, and obtaining the data to be written according to the data write request; preprocessing each original data block in the data to be written to obtain multiple preprocessed data blocks of the data to be written; the preprocessing includes segmentation and / or integration; mirroring the multiple preprocessed data blocks to the first partition of the target solid-state hard disk; based on the mirroring result, obtaining response information corresponding to the data to be written, and sending the response information to the target object; the response information includes write status information; writing each preprocessed data block from the first partition to the second partition of the target solid-state hard disk; wherein the first partition is a data cache space for caching the data to be written, and the second partition is a data storage space for storing the data to be written.

[0283] On the other hand, the present application also provides a non-volatile readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the data writing method provided by the above-mentioned methods, the method comprising: receiving a data write request sent by a target object, and obtaining the data to be written according to the data write request; preprocessing each original data block in the data to be written to obtain multiple preprocessed data blocks of the data to be written; the preprocessing includes segmentation and / or integration; mirroring the multiple preprocessed data blocks to the first partition of the target solid-state hard disk; obtaining response information corresponding to the data to be written according to the mirroring result, and sending the response information to the target object; the response information includes write status information; writing each preprocessed data block from the first partition to the second partition of the target solid-state hard disk; wherein the first partition is a data cache space for caching the data to be written, and the second partition is a data storage space for storing the data to be written.

[0284] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0285] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. This computer software product can be stored in a non-volatile readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or certain parts of the embodiment.

[0286] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for writing data, It is characterized in that include: Receive a data write request sent by the target object, and obtain the data to be written according to the data write request; Preprocessing each original data block in the data to be written to obtain a plurality of preprocessed data blocks of the data to be written; The preprocessing includes segmentation and / or integration; mirroring the plurality of pre-processed data blocks to a first partition of a target solid state drive; According to the mirroring result, obtaining response information corresponding to the data to be written, and sending the response information to the target object; the response information includes writing status information; Writing each of the pre-processed data blocks into a second partition of the target solid state drive from the first partition; The first partition is a data cache space for caching the data to be written, and the second partition is a data storage space for storing the data to be written.

2. The data writing method according to claim 1, It is characterized in that The step of obtaining response information corresponding to the data to be written according to the mirroring result includes: According to the mirroring result, determining whether there is an abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition; the abnormal data block includes a data block in a mirroring failure state or a data block in a verification failure state; When it is determined that there is no abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition, the response information is determined to be first response information; the first response information includes response information that the write status of the data to be written is write successful.

3. The data writing method according to claim 2, It is characterized in that The method further comprises: When it is determined that there is an abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition, obtaining a maximum delay duration in a configuration file of the target solid state drive; Within the maximum delay time, updating the plurality of pre-processed data blocks mirrored in the first partition until an update stop condition is met; According to the update result, obtaining the response information; The update stop condition includes that there is no abnormal data block in the plurality of pre-processed data blocks mirrored in the first partition, and / or the update duration reaches the maximum delay duration.

4. The data writing method according to claim 3, It is characterized in that The obtaining the response information according to the update result includes: When it is determined according to the update result that abnormal data blocks exist in the plurality of pre-processed data blocks mirrored by the first partition in each update process, the response information is determined to be second response information; the second response information includes response information that the write status of the data to be written is write failure; When it is determined according to the update result that no abnormal data blocks exist in the plurality of pre-processed data blocks mirrored in the first partition during at least one update process, the response information is determined to be the first response information.

5. The data writing method according to claim 3, It is characterized in that The determining, according to the mirroring result, whether there is an abnormal data block in the plurality of pre-processed data blocks mirrored by the first partition comprises: According to the mirroring result, determining a first to-be-checked data block in a mirroring success state among the plurality of pre-processed data blocks; Obtain a first coding value and a second coding value of the first data block to be checked; the first coding value is a coding value generated before the first data block to be checked is mirrored to the first partition; the second coding value is a coding value generated in each mirror file in the first partition after the first data block to be checked is mirrored to the mirror files; Verifying the first data block to be verified according to the first encoding value of the first data block to be verified and the second encoding value to obtain a verification result; According to the verification result, it is determined whether the abnormal data block exists in the plurality of pre-processed data blocks mirrored by the first partition.

6. The data writing method according to claim 5, It is characterized in that The verifying the first data block to be verified according to the first coding value and the second coding value of the first data block to be verified to obtain a verification result includes: Comparing the second encoding values ​​of the first to-be-checked data blocks in the respective image files to obtain a first comparison result; When it is determined according to the first comparison result that the second coding values ​​of the first data block to be checked in each image file are the same, the second coding value of the first data block to be checked in any image file is compared with the first coding value of the first data block to be checked to obtain a second comparison result; When it is determined, according to the second comparison result, that the second coding value is the same as the first coding value, the verification result is determined to be that the verification of the first data block to be verified is successful.

7. The data writing method according to claim 6, It is characterized in that The method further comprises: When it is determined according to the first comparison result that the second coding values ​​of the first data block to be checked in the respective image files are different, the second coding value of the first data block to be checked in the respective image files is compared with the first coding value of the first data block to be checked to obtain a third comparison result; When it is determined according to the third comparison result that the second coding value of the first data block to be verified in each of the image files is different from the first coding value of the first data block to be verified, determining that the verification result is that the first data block to be verified fails to be verified; The updating of the plurality of pre-processed data blocks mirrored in the first partition within the maximum delay time includes: Within the maximum delay time, the first to-be-checked data block is re-mirrored to each mirror file of the first partition.

8. The data writing method according to claim 7, It is characterized in that The method further comprises: When it is determined according to the third comparison result that the first partition contains the first image file and the second image file, determining that the verification result is that the first data block to be verified fails to be verified; wherein the second coding value of the first data block to be verified in the first image file is the same as the first coding value of the first data block to be verified, and the second coding value of the first data block to be verified in the second image file is different from the first coding value of the first data block to be verified; The updating of the plurality of pre-processed data blocks mirrored in the first partition within the maximum delay time includes: Within the maximum delay time, the plurality of pre-processed data blocks mirrored in the first mirror file are synchronized into the second mirror file.

9. The data writing method according to any one of claims 1 to 8, It is characterized in that Writing each of the pre-processed data blocks from the first partition to the second partition of the target solid state drive comprises: When it is monitored that the remaining storage capacity of the second partition is greater than or equal to the preset storage capacity, obtaining a write strategy for the data to be written according to the data write request; Determining a write priority of each of the pre-processed data blocks according to a write order in the write strategy and / or a cache duration of each of the pre-processed data blocks in the first partition; According to the write priority, each of the pre-processed data blocks is written from the first partition to the second partition of the target solid state drive.

10. The data writing method according to claim 9, It is characterized in that Determining the write priority of each of the pre-processed data blocks according to the cache duration of each of the pre-processed data blocks in the first partition includes: When there is any pre-processed data block in the first partition whose cache duration is greater than or equal to the maximum delay duration, it is determined that the write priority of any pre-processed data block is the highest; the maximum delay duration is obtained from the configuration file of the target solid state drive.

11. The data writing method according to any one of claims 1 to 8, It is characterized in that After writing each of the pre-processed data blocks from the first partition into the second partition of the target solid state drive, the method further includes: Acquire a pre-processed data block in a write-completed state as a second data block to be verified; Verifying the second data block to be verified; When it is determined according to the verification result that the verification of the second data block to be verified fails, obtaining a write log of the second data block to be verified in the log partition of the target solid-state drive; Determining a target image file from a plurality of image files in the first partition according to the write log; The second to-be-verified data block is written from the target image file into the second partition of the target solid-state hard disk.

12. The data writing method according to claim 11, It is characterized in that The verifying the second data block to be verified includes: In a case where the write strategy of the data to be written includes a consistency check strategy, calculating a parity check value of the second data block to be checked; The parity check value of the second data block to be checked is compared with a preset parity value, and according to the comparison result, a consistency check is performed on the second data block to be checked.

13. The data writing method according to any one of claims 1 to 8, It is characterized in that The mirroring of the plurality of pre-processed data blocks to the first partition of the target solid state drive comprises: According to the plurality of pre-processed data blocks, a mirroring request is sent to the first partition, so that the first partition calls a target logical storage block according to the mirroring request and a local logical address management table, and mirrors each of the pre-processed data blocks to the first partition.

14. The data writing method according to claim 13, It is characterized in that The preprocessing of each original data block in the data to be written to obtain a plurality of preprocessed data blocks of the data to be written includes: Obtaining a configuration file of the target solid state drive, and obtaining a preset data block specification from the configuration file; sorting the original data in the data to be written according to the data block specifications of the original data; According to the sorting result, each of the original data is added to the first data queue to obtain a second data queue; The data blocks in the second data queue whose data block size is larger than the preset data block size are split according to the preset data block size; The second data queue is updated according to the segmentation result to obtain a third data queue; Integrate the data blocks in the third data queue whose data block size is smaller than the preset data block size according to the preset data block size, and update the third data queue according to the integration result to obtain a target data queue; The pre-processed data block is determined according to the data block in the target data queue.

15. The data writing method according to any one of claims 1 to 8, It is characterized in that The method further comprises: Determining a written data block in a successfully written state among the plurality of pre-processed data blocks; According to the written data block, the local logical address management table of the first partition is updated, and the written data block is erased in the first partition.

16. The data writing method according to any one of claims 1 to 8, It is characterized in that Before mirroring the plurality of pre-processed data blocks to the first partition of the target solid state drive, the method further includes: Performing an initialization operation on the first partition and the second partition to obtain an initialization result; In the case where it is determined that there is alarm information in the initialization result, matching the alarm information with preset keywords in a knowledge base to obtain at least one target keyword matching the alarm information; Determining candidate processing strategies corresponding to each target keyword in the knowledge base; Determine a first target processing strategy corresponding to the alarm information according to the candidate processing strategies corresponding to the target keywords; The processing component corresponding to the first target processing strategy is called to process the alarm information.

17. The data writing method according to claim 16, It is characterized in that The determining, according to the candidate processing strategies corresponding to the target keywords, a first target processing strategy corresponding to the alarm information includes: Determining, according to the number of each candidate processing strategy, a correlation degree between each candidate processing strategy and the alarm information; The candidate processing strategy with the greatest correlation is determined as the first target processing strategy.

18. The data writing method according to claim 16, It is characterized in that The method further comprises: Obtaining a processing result of the alarm information; When the processing result of the alarm information is successful, extracting keywords from the alarm information to obtain newly added keywords; The newly added keyword and the first target processing strategy are updated to the knowledge base.

19. The data writing method according to claim 16, It is characterized in that The method further comprises: When the processing result of the alarm information is a processing failure, the alarm information is sent to the client, so that the client processes the alarm information according to the second target processing strategy; monitoring the alarm processing information returned by the client, and obtaining the second target processing strategy when determining, based on the alarm processing information, that the processing status of the alarm information is successful; The newly added keywords extracted from the alarm information are updated to the knowledge base using the second target processing strategy.

20. The data writing method according to any one of claims 1 to 8, It is characterized in that The mirroring of the plurality of pre-processed data blocks to the first partition of the target solid state drive comprises: mirroring the plurality of pre-processed data blocks to a primary cache space and a backup cache space of the first partition; the primary cache space and the backup cache space belong to different fault domains; Writing each of the pre-processed data blocks from the first partition to the second partition of the target solid state drive comprises: Each of the pre-processed data blocks is written into the second partition from any cache space of the primary cache space and the backup cache space.

21. The data writing method according to any one of claims 1 to 8, It is characterized in that Before mirroring the plurality of pre-processed data blocks to the first partition of the target solid state drive, the method further includes: According to the configuration file of the target solid state drive, obtaining the division ratio of each partition in the target solid state drive; Determining the capacity of the first partition and the capacity of the second partition according to the division ratio of each partition; The target solid state drive is partitioned according to the capacity of the first partition and the capacity of the second partition to obtain the first partition and the second partition.

22. A data writing device, It is characterized in that include: An acquisition module is configured to receive a data write request sent by a target object, and acquire the data to be written according to the data write request; A processing module, configured to pre-process each original data block in the data to be written to obtain a plurality of pre-processed data blocks of the data to be written; The preprocessing includes segmentation and / or integration; A mirroring module, configured to mirror the plurality of pre-processed data blocks to a first partition of a target solid state drive; A response module, configured to obtain response information corresponding to the data to be written according to the mirroring result, and send the response information to the target object; the response information includes write status information; a writing module, configured to write each of the pre-processed data blocks from the first partition into a second partition of the target solid state drive; The first partition is a data cache space for caching the data to be written, and the second partition is a data storage space for storing the data to be written.

23. A solid state hard disk, It is characterized in that The solid state hard disk includes a control chip and a storage chip; the storage chip includes a first partition, a second partition and a log partition; When the control chip executes the computer program, the data writing method as described in any one of claims 1 to 21 is implemented.

24. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the data writing method according to any one of claims 1 to 21 is implemented.

25. A non-volatile readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the data writing method according to any one of claims 1 to 21 is implemented.

Citation Information

Patent Citations

  • Upgrade controlling device and method for upgrading memory device

    CN102163155A

  • Storage control method, storage control device and solid-state storage system

    CN103049220A

  • Method and device for processing IO request

    CN108268219A

  • Mirror image caching method and device, electronic equipment and storage medium

    CN114489937A

  • Global caching method and device of storage system and medium

    CN114816270A