Data writing method, system and device and computer equipment
Data writing can be completed by pre-allocating the write memory of the storage array card and interacting with the host card and the storage array card, which solves the problem of write delay in the prior art and improves the efficiency and performance of data storage .
Patent Information
- Application Number
- CN202411580492.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-06
Smart Images

Figure CN119415038A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a data writing method, system, device and computer equipment. Background Art
[0002] With the development of big data technology, in order to improve the security and reliability of business data, it is becoming increasingly important to back up business data through storage systems.
[0003] The storage system includes a host end, a host card of the host end, a storage array end, a storage array card of the storage array end, and a storage array backend. During the business data backup process, the host end indirectly interacts with the storage array backend through the host card, the storage array card, and the storage array end to complete the data backup. Therefore, the process of the host card writing the business data to the storage array card is particularly important for data backup. In the related art, the host card mainly sends the business data to the storage array card to instruct the storage array card to write the business data to the write memory allocated during the data processing process.
[0004] However, in the related art, when the host card writes service data to the storage array card, there is a problem of large write delay. Summary of the invention
[0005] Based on this, it is necessary to provide a data writing method, system, device and computer equipment to address the above technical problems, which can reduce the write latency when the host card writes business data to the storage array card.
[0006] In a first aspect, an embodiment of the present application provides a data writing method, which is applied to a storage array card at a storage array end, and the method includes:
[0007] In response to a data storage command sent by a host card at the host end, obtaining a data type of the service data carried in the data storage command;
[0008] When the data type is a preset type, the service data is written into the current write memory of the storage array card; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card.
[0009] The technical solution in the embodiment of the present application responds to a data storage command sent by a host card at the host end, obtains the data type of the business data carried in the data storage command, and writes the business data to the current write memory of the storage array card when the data type is a preset type, wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card and the host card establish a connection; the above method does not require the two interactive processes of first allocating the write memory of the storage array card and then writing the business data to the write memory each time responding to a write business, but can dynamically configure the write memory based on the original write memory pre-allocated before the storage array card and the host card establish a connection, so that the host card and the storage array card can complete the data writing through only one interaction, thereby reducing By eliminating one interaction process between the host card and the storage array card, the time for responding to write services can be shortened, that is, the write delay in long-distance transmission scenarios is greatly reduced, the write delay of write services is reduced, and the performance of application services involved in write services is improved; at the same time, the above method does not need to allocate write memory in real time during data storage, and can dynamically configure the write memory for responding to write services based on the original write memory pre-allocated before the storage array card and the host card establish a connection, which can greatly reduce the allocation time of write memory during data storage, thereby accelerating the response speed of write services; furthermore, the above method can reduce the write delay of write services, and is suitable for actual application scenarios such as remote replication and active-active services that require long-distance transmission, and can improve the business processing performance of such scenarios.
[0010] In one embodiment, obtaining the data type of the business data carried in the data storage command includes:
[0011] Parse and process the data storage command to obtain the header information in the data storage command;
[0012] Identify and process the header information to determine the data type of the business data in the header information.
[0013] The technical solution in the embodiment of the present application parses and processes the data storage command, obtains the header information in the data storage command, and identifies and processes the header information to determine the data type of the business data in the header information; the above method can obtain the data type of the business data carried in the data storage command to provide dependency information to further ensure whether the data storage command can be successfully responded to, and in an environment where the host card and the storage array card support the transmission protocol, it can correctly respond to the data storage command that complies with the transmission protocol specification according to the data type of the business data.
[0014] In one embodiment, if there are multiple data storage commands; before writing the service data into the current write memory of the storage array card, the method further includes:
[0015] Detecting whether multiple candidate write memories of the storage array card meet the current command response requirements; each candidate write memory is a corresponding original write memory or a write memory after each original write memory is configured;
[0016] If not, determine the additional quantity according to the total quantity of each candidate write memory and the command response requirement, allocate the additional quantity of write memories from the shared memory pool on the storage array side as each additional write memory, and determine each candidate write memory and each additional write memory as the current write memory;
[0017] If satisfied, the current write memory is determined based on each candidate write memory.
[0018] The technical solution in the embodiment of the present application detects whether multiple candidate write memories of the storage array card meet the current command response requirements. If not, an additional number is determined according to the total number of candidate write memories and the command response requirements, and an additional number of write memories are allocated from the shared memory pool of the storage array end as each additional write memory, and each candidate write memory and each additional write memory are determined as the current write memory. If satisfied, the current write memory is determined according to each candidate write memory, wherein each candidate write memory is a corresponding original write memory or a write memory after configuring each original write memory; the above method can detect whether multiple candidate write memories of the storage array card meet the current command response requirements, and dynamically determine the current write memory that responds to the current data storage command according to the detection result, so that the current write memory can meet the response requirements of the current data storage command, thereby improving the response success rate of the data storage command, and the current write memory is not completely allocated in real time, so that the speed of determining the current write memory can be accelerated, thereby improving the response speed of the data storage command; at the same time, the above method can flexibly configure the current write memory required by the current data storage command during the data storage process to improve the resource utilization of the shared write memory on the storage array end.
[0019] In one embodiment, before detecting whether the candidate write memory of the storage array card meets the storage requirement of the service data, the method further includes:
[0020] Obtaining the memory quantity of at least one initial write memory of the storage array card;
[0021] When the memory quantity is greater than a preset quantity threshold, determining the release quantity corresponding to each initial write memory according to the memory quantity and the preset quantity threshold;
[0022] A released number of initial write memories in each initial write memory is released to a shared memory pool at the storage array end, and unreleased initial write memories are determined as candidate write memories.
[0023] The technical solution in the embodiment of the present application obtains the memory quantity of at least one initial write memory of the storage array card, releases the released number of initial write memories in each initial write memory to the shared memory pool of the storage array end, and determines the unreleased initial write memories as candidate write memories; the above method can release the allocated excess write memory according to the actual situation of the allocated write memory during the data storage process, dynamically adjust the quantity of the allocated write memory, so as to dynamically manage the allocated write memory, so that the allocated write memory can be maximized, and reduce the pressure of the storage array end on reserving memory for other storage array cards.
[0024] In one embodiment, the method further comprises:
[0025] Write the business data currently in the write memory to the back end of the storage array;
[0026] When the service data is written to the back end of the storage array, a storage response message is sent to the host card, and the processable command quantity is sent to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity.
[0027] The technical solution in the embodiment of the present application writes the business data in the current write memory to the storage array backend, and when the business data is written to the storage array backend, sends a storage response message to the host card, and sends the processable command quantity to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity; the above method can send a storage response message to the host card to remind the user that the data storage command has been successfully responded to when the data storage command response is completed, and at the same time, the storage array card can send the processable command quantity to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity, which can avoid the congestion problem of other data storage commands and reduce the response pressure of the storage array card to other data storage commands.
[0028] In a second aspect, an embodiment of the present application provides a data writing method, which is applied to a host card at a host end, and the method includes:
[0029] Sending a data storage command to the storage array card at the storage array end, indicating obtaining the data type of the business data carried in the data storage command, and writing the business data to the current write memory of the storage array card when the data type is a preset type; wherein the current write memory is based on the original write memory configuration pre-allocated before the storage array card establishes a connection with the host card;
[0030] Get the storage response message fed back by the storage array card after responding to the data storage command.
[0031] The technical solution in the embodiment of the present application sends a data storage command to the storage array card at the storage array end, instructs to obtain the data type of the business data carried in the data storage command, and when the data type is a preset type, writes the business data to the current write memory of the storage array card, and obtains the storage response message fed back by the storage array card after responding to the data storage command; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card; the above method does not require the two interactive processes of first allocating the write memory of the storage array card and then writing the business data to the write memory each time responding to a write business, and can be based on the original write memory pre-allocated before the storage array card establishes a connection with the host card The original write memory dynamically configured with the write memory allows the host card and the storage array card to complete the writing of data through only one interaction, thus reducing the one-time interaction process between the host card and the storage array card, and shortening the time for responding to the write service, that is, greatly reducing the write delay in the long-distance transmission scenario, reducing the write delay of the write service, and thus improving the performance of the application service involved in the write service; at the same time, the above method does not need to allocate the write memory in real time during the data storage process, and can dynamically configure the write memory responding to the write service based on the original write memory pre-allocated before the storage array card and the host card establish a connection, which can greatly reduce the allocation time of the write memory during the data storage process, thereby accelerating the response speed of the write service.
[0032] In one embodiment, the method further comprises:
[0033] Get the amount of processable commands sent by the storage array card;
[0034] Control the frequency of sending other data storage commands based on the amount of commands that can be processed.
[0035] The technical solution in the embodiments of the present application can obtain the processable command quantity sent by the storage array card, and control the sending frequency of other data storage commands according to the processable command quantity, thereby controlling the speed at which the storage array card receives the data storage command to reduce the command processing pressure of the storage array card. In one embodiment, controlling the sending frequency of other data storage commands according to the processable command quantity includes:
[0036] If the processable command quantity is less than the preset command quantity threshold, other data storage commands are sent according to the target sending frequency to control the sending frequency of other data storage commands; the target sending frequency is less than the sending frequency of the data storage commands;
[0037] If the processable command quantity is greater than or equal to the command quantity threshold, the sending frequency of the data storage command is maintained to control the sending frequency of other data storage commands.
[0038] The technical solution in the embodiment of the present application can, when it is determined that the amount of processable commands is less than a preset command quantity threshold, send other data storage commands according to the target sending frequency to control the sending frequency of other data storage commands; when the amount of processable commands is greater than or equal to the command quantity threshold, maintain the sending frequency of data storage commands to complete the control of the sending frequency of other data storage commands; the above method can control the sending frequency of other data storage commands according to the size relationship between the amount of processable commands and the preset command quantity threshold, and the control process is relatively simple and does not require the participation of complex algorithms, thereby reducing the complexity of the control process.
[0039] In a third aspect, an embodiment of the present application provides a data writing device, the device comprising:
[0040] A response module, used for responding to a data storage command sent by a host card at the host end, and obtaining a data type of the service data carried in the data storage command;
[0041] The storage module is used to write the business data into the current write memory of the storage array card when the data type is a preset type; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card.
[0042] In a fourth aspect, an embodiment of the present application provides a data writing device, the device comprising:
[0043] A sending module is used to send a data storage command to a storage array card at the storage array end, indicating the data type of the business data carried in the data storage command, and when the data type is a preset type, write the business data into the current write memory of the storage array card; wherein the current write memory is based on the original write memory configuration pre-allocated before the storage array card establishes a connection with the host card;
[0044] The message acquisition module is used to acquire the storage response message fed back by the storage array card after responding to the data storage command.
[0045] In a fifth aspect, an embodiment of the present application further provides a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the method of any one of the embodiments of the first and second aspects above when executing the computer program.
[0046] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method of any embodiment of the first aspect and the second aspect above are implemented.
[0047] In the seventh aspect, an embodiment of the present application further provides a computer program product, the computer program product comprising a computer program, which, when executed by a processor, implements the steps of the method of any one of the embodiments of the first and second aspects above.
[0048] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] FIG1 is an application environment diagram of a data writing method in one embodiment;
[0050] FIG2 is a schematic diagram of a flow chart of a data writing method in one embodiment;
[0051] FIG3 is a schematic diagram of a flow chart of a data writing method in another embodiment;
[0052] FIG4 is a schematic diagram of a flow chart of a data writing method in another embodiment;
[0053] FIG5 is a schematic diagram of a flow chart of a data writing method in another embodiment;
[0054] FIG6 is a schematic flow chart of a data writing method in another embodiment;
[0055] FIG7 is a schematic flow chart of a data writing method in another embodiment;
[0056] FIG8 is a schematic flow chart of a data writing method in another embodiment;
[0057] FIG9 is a structural block diagram of a data writing device in one embodiment;
[0058] FIG10 is a structural block diagram of a data writing device in another embodiment;
[0059] FIG. 11 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] In the field of big data, the amount of business data generated by each enterprise is increasing. In order to improve the security and reliability of business data, it is necessary to back up business data through a storage system. Among them, the storage system includes a host end, a host card of the host end, a storage array end, a storage array card of the storage array end, and a storage array backend. During the business data backup process, the host end indirectly interacts with the storage array backend through the host card, the storage array card, and the storage array end to complete data backup or data disaster recovery. Therefore, the process of the host card writing business data to the storage array card is particularly important for data backup or data disaster recovery. In the related art, the host card mainly sends a write request to the storage array end through the storage array card, instructing the storage array end to successfully allocate write memory for the storage array card after responding to the write request and feedback the allocation completion message to the host card, and then the host card sends the business data to the storage array card, instructing the storage array card to write the business data to the allocated write memory.
[0062] However, in the related art, two interactive processes are required when the host card writes service data to the storage array card, which will cause a large write delay. Based on this, an embodiment of the present application provides a data writing method, which can reduce the write delay when the host card writes service data to the storage array card.
[0063] The data writing method provided in the embodiment of the present application can be applied to the application environment diagram shown in Figure 1. The application environment includes a data storage system, which can include a host end, at least one host card installed on the host end, a storage array end, at least one storage array card installed on the storage array end, and a storage array backend. Among them, the storage array end and the storage array backend are connected by communication, and the communication method can be Wi-Fi, mobile network, wired connection or Bluetooth connection, etc. At the same time, each host card and the corresponding storage array card are connected by communication, and the communication method can be a wired connection of optical fiber or copper twisted wire. Optionally, the above-mentioned host end can be but not limited to a server or a computer device, and the computer device can be a personal computer, a laptop, a tablet computer, a smart phone, etc.; the above-mentioned storage array end can be a computer device, a server, a database system, etc. with data storage function; the above-mentioned storage array backend can be an electronic device deployed with a disk and / or a hard disk; the above-mentioned host cards and each storage array card can be a network card, but in the embodiment of the present application, each host card and each storage array card are a Fiber Channel (Host Bus Adapter, HBA) card as an example for explanation. Optionally, the HBA card may be, but is not limited to, an Emulex HBA card or a Qlogic HBA card.
[0064] In practical applications, each host card and each storage array card supports the same transmission protocol, which can be the Internet Small Computer System Interface (iSCSI) protocol, Serial Attached SCSI (SAS) protocol, ATA transmission (Ata over Ethernet, AoE) protocol, etc., but in the embodiment of the present application, each host card and each storage array card supports the Fibre Channel (FC) protocol as an example for illustration, in order to improve data transmission performance. Among them, this embodiment does not limit the specific forms of the host side, host card, storage array side, storage array card and storage array back end. Figure 1 is illustrated by taking a host card and a storage array card connected thereto as an example. The following introduces the specific process of the data writing method by taking any storage array card and any host card as the execution subject of the data writing method.
[0065] As shown in FIG. 2 , it is a flow chart of a data writing method provided in an embodiment of the present application. The method is applied to a storage array card at a storage array end. The method can be implemented by the following steps:
[0066] S101. In response to a data storage command sent by a host card at a host end, obtain a data type of service data carried in the data storage command.
[0067] The format of the data storage command complies with the specification of the transmission protocol supported by the host card and the storage array card, and in the embodiment of the present application, complies with the specification of the FC protocol. Optionally, the data storage command may be composed of header information and tail information, the tail information may include business data and multiple connection identifiers, and the header information may include the data type, length, source information, receiver information, etc. of the business data.
[0068] It should be noted here that the business data in the tail information exists in the form of multiple sub-data, and the multiple sub-data are combined to obtain the business data, wherein, except for the last sub-data in the business data, each sub-data carries a connection identifier, and the connection identifier of each sub-data is different. The connection identifier carried by the sub-data here can be understood as a pointer to the next sub-data combined after the sub-data or the position in the tail information. Optionally, the above-mentioned business data can be different types of business data, such as communication data, Internet data, video data, audio data, financial data, education data, etc., which is not limited in the embodiments of the present application.
[0069] In practical applications, the storage array card at the storage array end may be any storage array card installed on the storage array end; the host card at the host end may be any host card installed on the host end, but a communication connection is established between the storage array card selected by the execution subject.
[0070] Among them, the host card needs to transmit data storage commands to the storage array card according to the transmission protocol supported by itself. Correspondingly, the host card can send multiple data storage commands to the storage array card in sequence in the form of command stream. Here, the host card sends any data storage command to the storage array card as an example for explanation.
[0071] Specifically, the storage array card may receive a data storage command sent by a host card on the host side, and in response to the data storage command sent by the host card on the host side, obtain the data type of the service data carried in the data storage command.
[0072] In one embodiment, the method for obtaining the data type of the business data carried in the data storage command can be to pre-train an algorithm model, and then input the data storage command into the algorithm model, and the algorithm model outputs the data type of the business data carried in the data storage command.
[0073] In another embodiment, the data type of the business data carried in the data storage command may be obtained by reading the data type of the business data from a corresponding position in the data storage command according to a pre-defined rule.
[0074] S102: When the data type is a preset type, write the service data into the current write memory of the storage array card, wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card.
[0075] Specifically, after the storage array card obtains the data type of the business data, it can determine whether the data type of the business data is a preset type. If the data type of the business data is a preset type, the business data is written into the current write memory of the storage array card. The data type of the above business data can be an integer, a floating point number, character data, Boolean data, pointer data, array, etc. However, in the embodiment of the present application, the data storage command complies with the specification of the FC protocol. Naturally, the data type of the business data carried in the data storage command is an immediate number. Correspondingly, the above preset type is an immediate number, that is, type 6.
[0076] It should be noted here that the above-mentioned current write memory is configured based on the original write memory pre-allocated before the storage array card and the host card establish a connection, which can be understood as the original write memory pre-allocated before the storage array card and the host card establish a connection, or the write memory configured based on the original write memory pre-allocated before the storage array card and the host card establish a connection during data storage, that is, the current write memory is not allocated in real time during data storage.
[0077] In an embodiment of the present application, the storage array end can allocate at least one original write memory to the storage array card before the storage array card establishes a connection with the host card. The specific process is described as follows: the processor at the storage array end can obtain the target storage capacity of each write memory to be allocated input by the user, and send the target storage capacity to the storage array card. Correspondingly, after receiving the target storage capacity, the storage array card can actively or passively perform a restart operation to make the target storage capacity effective. Afterwards, after the restart operation of the storage array card is completed, a memory application command can be sent to the processor at the storage array end, instructing the processor at the storage array end to allocate at least one original write memory according to the memory application command; at the same time, after completing the original write memory allocation, the processor at the storage array end associates each original write memory with the hardware of the storage array card, so that the storage array card can normally apply each original write memory. Optionally, the above-mentioned memory application command can carry a target storage capacity and a write memory application quantity, and the write memory application quantity can be less than or equal to the concurrency number of the storage array card responding to the data storage command; in actual applications, the processor on the storage array side can allocate the write memory application quantity of original write memories from its own initial shared memory pool according to the target storage capacity and the write memory application quantity, and the storage capacity of each original write memory can be equal to the target storage capacity.
[0078] Further, the storage array card can send a registration (i.e., FLOGI) request to the host card. After the host card successfully responds to the FLOGI request, it can send an FLOGI request to the storage array card. Then, the host card can send a process login (i.e., PLOGI) request to the storage array card. After the storage array card successfully responds to the PLOGI request, it can send a process login acceptance (i.e., PLOGI ACC) message to the host card. After receiving the PLOGI ACC message, the host card can send a port login (i.e., PRLI) request to the storage array card. After the storage array card successfully responds to the PRLI request, it feeds back the total number of its own original write memories to the host card to instruct the host card to control the frequency of sending the first data storage command to the storage array card.
[0079] Among them, the above FLOGI request carries important identification information of the sender itself, such as the World Wide Port Name (WWPN) and the World Wide Node Name (WWNN), which is used by the receiver to register in its internal table (such as the name server database) according to the important identification information; one of the sender and the receiver is a host card, and the other is a storage array card. At the same time, the above PLOGI request can carry the identification information of the host card itself, such as the network address, port number or other unique identifier for identifying itself, which is used to determine the node type to which the host card belongs (server network card or storage device network card, etc.), and its position in the entire system, that is, to let the storage array card identify the host card.
[0080] Optionally, after receiving the PLOGI request, the storage array card may verify the information carried in the PLOGI request. If the verification passes and the storage array card has sufficient resources and permissions to accept the connection request, the storage array card may send a PLOGI ACC message to the host card as a response.
[0081] Among them, the stage of initiating a PRLI request can be understood as the stage of negotiation between the host card and the storage array card. This stage mainly involves negotiation on specific parameters of the port. After the negotiation is completed, the host card and the storage array card reach an agreement on the port parameters, and the two parties complete the establishment of a connection. Specifically, the host card and the storage array card can exchange detailed information about the ports of both parties, such as the working mode of the port (full-duplex or half-duplex), cache size, maximum transmission unit (MTU), etc.
[0082] In practical applications, the total amount of the pre-allocated original write memory and the current write memory may be less than or equal to the number of concurrency to which the storage array card responds to the data storage command, and greater than or equal to 1, wherein the total amount of the original write memory and the current write memory may be equal or unequal. Here, the total amount of the original write memory and the current write memory is 1 as an example for explanation. In an embodiment of the present application, the storage capacity of the current write memory is the same as the storage capacity of the original write memory, and the storage capacity may be user-defined.
[0083] The technical solution in the embodiment of the present application responds to a data storage command sent by a host card at the host end, obtains the data type of the business data carried in the data storage command, and writes the business data to the current write memory of the storage array card when the data type is a preset type, wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card and the host card establish a connection; the above method does not require the two interactive processes of first allocating the write memory of the storage array card and then writing the business data to the write memory each time responding to a write business, but can dynamically configure the write memory based on the original write memory pre-allocated before the storage array card and the host card establish a connection, so that the host card and the storage array card can complete the data writing through only one interaction, thereby reducing By eliminating one interaction process between the host card and the storage array card, the time for responding to write services can be shortened, that is, the write delay in long-distance transmission scenarios is greatly reduced, the write delay of write services is reduced, and the performance of application services involved in write services is improved; at the same time, the above method does not need to allocate write memory in real time during data storage, and can dynamically configure the write memory for responding to write services based on the original write memory pre-allocated before the storage array card and the host card establish a connection, which can greatly reduce the allocation time of write memory during data storage, thereby accelerating the response speed of write services; furthermore, the above method can reduce the write delay of write services, and is suitable for actual application scenarios such as remote replication and active-active services that require long-distance transmission, and can improve the business processing performance of such scenarios.
[0084] The process of obtaining the data type of the business data carried in the data storage command is described below. In one embodiment, as shown in FIG3 , the process of obtaining the data type of the business data carried in the data storage command in S101 can be implemented by the following steps:
[0085] S1011. Analyze and process the data storage command to obtain header information in the data storage command.
[0086] Specifically, the storage array card can call a command parsing tool to parse and process the data storage command to obtain header information in the data storage command.
[0087] In addition, the storage array card can also extract the header information from the data storage command according to the string length of the header information and the tail information specified when constructing the data storage command, so as to parse the data storage command and obtain the header information in the data storage command.
[0088] S1012: Identify and process the header information to determine the data type of the business data in the header information.
[0089] In one embodiment, the storage array card can use an information extraction algorithm to extract and process the header information in the data storage command to complete the identification processing of the header information and obtain the data type of the business data in the header information. Optionally, the above-mentioned information extraction algorithm can be implemented by at least one of a keyword extraction algorithm, a feature extraction algorithm, a similarity method, etc.
[0090] In another embodiment, the storage array card may perform similarity calculation on the header information in the data storage command and the standard header information, and determine the data type of the business data in the header information according to the similarity value.
[0091] In another embodiment, the storage array card may pre-train a recognition model, and then input the header information into the recognition model. The recognition model performs recognition processing on the header information and then outputs the data type of the business data in the header information.
[0092] The technical solution in the embodiment of the present application parses and processes the data storage command, obtains the header information in the data storage command, and identifies and processes the header information to determine the data type of the business data in the header information; the above method can obtain the data type of the business data carried in the data storage command to provide dependency information to further ensure whether the data storage command can be successfully responded to, and in an environment where the host card and the storage array card support the transmission protocol, it can correctly respond to the data storage command that complies with the transmission protocol specification according to the data type of the business data.
[0093] In some scenarios, the host card may send multiple data storage commands to the storage array card, that is, the storage array card needs to respond to multiple data storage commands. The following is an explanation of the process of obtaining the current write memory of the storage array card that responds to multiple data storage commands in this case. In one embodiment, if there are multiple data storage commands; before executing the step of writing the business data into the current write memory of the storage array card in S102, as shown in FIG4, the method may further include the following steps:
[0094] S103, detecting whether multiple candidate write memories of the storage array card meet the current command response requirements, wherein each candidate write memory is a corresponding original write memory or a write memory after configuring each original write memory.
[0095] It should be noted here that if the data storage process is the first data storage process after the storage array card and the host card establish a connection, at this time, each candidate write memory can be a corresponding original write memory or a write memory obtained by configuring each original write memory once; if the data storage process is the nth data storage process (where n is greater than 1) after the storage array card and the host card establish a connection, at this time, each candidate write memory can be a corresponding original write memory or a write memory obtained by performing at least one configuration on each original write memory.
[0096] In practical applications, each of the above-mentioned candidate write memories is an idle write memory of the storage array card. Among them, the total number of original write memories pre-allocated before the storage array card establishes a connection with the host card can be greater than or equal to 1; the total number of candidate write memories can be equal to, less than or greater than the total number of original write memories. In an embodiment of the present application, each of the original write memories pre-allocated before the storage array card establishes a connection with the host card is an idle write memory; if the total number of candidate write memories is less than the total number of original write memories, correspondingly, the multiple candidate write memories can be multiple write memories obtained after configuring each original write memory; if the total number of candidate write memories is equal to the total number of original write memories, correspondingly, each original write memory can be used as each candidate write memory; if the total number of candidate write memories is greater than the total number of original write memories, correspondingly, multiple original write memories can be arbitrarily selected from all original write memories as multiple candidate write memories.
[0097] Optionally, the total number of the plurality of candidate write memories may be less than or equal to the number of concurrent responses to data storage commands by the storage array card. Meanwhile, the current command response requirement may be the total number of data storage commands currently received by the storage array card.
[0098] In actual applications, the storage array card can detect whether multiple candidate write memories of the storage array card meet the current command response requirements, that is, detect whether the total number of multiple candidate write memories of the storage array card is greater than or equal to the total number of data storage commands currently received by itself.
[0099] S104: If not satisfied, determine an additional quantity according to the total quantity of candidate write memories and the command response requirement, allocate an additional quantity of write memories from the shared memory pool on the storage array side as additional write memories, and determine the candidate write memories and the additional write memories as current write memories.
[0100] Specifically, if it is detected that multiple candidate write memories of the storage array card do not meet the current command response requirements, that is, when it is detected that the total number of multiple candidate write memories of the storage array card is less than the total number of data storage commands currently received by itself, the total number of data storage commands in the command response requirements minus the total number of candidate write memories can be used to obtain the additional number, and then the memory allocation algorithm is called or according to the preset memory allocation strategy, the additional number of write memories are dynamically allocated from the shared memory pool of the storage array end as each additional write memory, and each candidate write memory and each additional write memory are determined as the current write memory to complete the configuration of each original write memory. Optionally, the above-mentioned memory allocation algorithm can be at least one of the first adaptation algorithm, the best adaptation algorithm, the worst adaptation algorithm, the cyclic first adaptation algorithm, etc.
[0101] Among them, the shared memory pool of the above-mentioned storage array end can be understood as a shared reserved memory pool of all storage array cards installed on the storage array end; when the storage array end allocates write memory to any storage array card, it is allocated from the shared memory pool. Optionally, the shared memory pool can be understood as a large resource pool, and when allocating write memory, the write memory of the corresponding storage capacity can be allocated from the shared memory pool according to the storage capacity of the write memory to be allocated. In an embodiment of the present application, during the storage process, the storage capacity of the dynamically allocated write memory is equal to the storage capacity of the original write memory.
[0102] It should be noted here that since the current write memory is not all allocated in real time during the data storage process, but a part of the current write memory is dynamically allocated during the data storage process, this can shorten the time for real-time allocation of the current write memory, thereby reducing the write latency of writing data.
[0103] S105: If satisfied, determine the current write memory according to each candidate write memory.
[0104] In an embodiment of the present application, if it is detected that multiple candidate write memories of the storage array card meet the current command response requirements, that is, when it is detected that the total number of multiple candidate write memories of the storage array card is greater than or equal to the total number of data storage commands currently received by itself, the current write memory can be determined based on each candidate write memory.
[0105] Specifically, if the total number of candidate write memories is equal to the total number of data storage commands currently received by the storage array card, each candidate write memory can be determined as the current write memory; if the total number of candidate write memories is greater than the total number of data storage commands currently received by the storage array card, the same number of candidate write memories as the total number of data storage commands currently received by the storage array card can be arbitrarily selected from the candidate write memories as the current write memory.
[0106] The technical solution in the embodiment of the present application detects whether multiple candidate write memories of the storage array card meet the current command response requirements. If not, an additional number is determined according to the total number of candidate write memories and the command response requirements, and an additional number of write memories are allocated from the shared memory pool of the storage array end as each additional write memory, and each candidate write memory and each additional write memory are determined as the current write memory. If satisfied, the current write memory is determined according to each candidate write memory, wherein each candidate write memory is a corresponding original write memory or a write memory after configuring each original write memory; the above method can detect whether multiple candidate write memories of the storage array card meet the current command response requirements, and dynamically determine the current write memory that responds to the current data storage command according to the detection result, so that the current write memory can meet the response requirements of the current data storage command, thereby improving the response success rate of the data storage command, and the current write memory is not completely allocated in real time, so that the speed of determining the current write memory can be accelerated, thereby improving the response speed of the data storage command; at the same time, the above method can flexibly configure the current write memory required by the current data storage command during the data storage process to improve the resource utilization of the shared write memory on the storage array end.
[0107] In other scenarios, the amount of available write memory of the storage array card is large. In order to improve the resource rate of the allocated write memory, the allocated excess write memory can be released to the shared memory pool of the storage array end for use by other storage array cards installed on the storage array card. The following is an explanation of the write memory release process of the storage array card. In one embodiment, before executing the step of detecting whether the candidate write memory of the storage array card meets the storage demand of the business data in S103, as shown in FIG5 , the method can also include the following steps:
[0108] S106: Obtain the memory quantity of at least one initial write memory of the storage array card.
[0109] In practical applications, the memory quantity of at least one initial write memory, that is, the total quantity of the initial write memories, may be equal to, less than, or greater than the total quantity of the original write memories. In an embodiment of the present application, each initial write memory may be a corresponding original write memory, or may be a plurality of write memories obtained by performing at least one configuration on each original write memory.
[0110] S107: When the memory quantity is greater than a preset quantity threshold, determine the release quantity corresponding to each initial write memory according to the memory quantity and the preset quantity threshold.
[0111] Among them, the storage array card can determine whether the memory quantity of at least one initial write memory is greater than a preset quantity threshold. When the memory quantity is greater than the preset quantity threshold, the memory quantity is subtracted from the preset quantity threshold to obtain the release quantity corresponding to each initial write memory, that is, the memory quantity minus the preset quantity threshold is used to obtain the quantity corresponding to the excess initial write memory in each initial write memory.
[0112] Optionally, the preset quantity threshold may be user-defined or determined based on historical experience. However, in an embodiment of the present application, the preset quantity threshold may be equal to the total number of data storage commands currently received by the storage array card.
[0113] S108: Release the released number of initial write memories in each initial write memory to the shared memory pool of the storage array, and determine the unreleased initial write memories as candidate write memories.
[0114] Specifically, the storage array card can call a memory release algorithm or release any number of initial write memories in each initial write memory to the shared memory pool of the storage array end according to a preset memory release strategy, and determine the unreleased initial write memories as each candidate write memory. Optionally, the above-mentioned memory release algorithm can be at least one of a mark-sweep algorithm, a mark-collate algorithm, a mark-copy algorithm, etc. Among them, the total number of unreleased initial write memories is equal to the total number of each candidate write memory.
[0115] The technical solution in the embodiment of the present application obtains the memory quantity of at least one initial write memory of the storage array card, releases the released number of initial write memories in each initial write memory to the shared memory pool of the storage array end, and determines the unreleased initial write memories as candidate write memories; the above method can release the allocated excess write memory according to the actual situation of the allocated write memory during the data storage process, dynamically adjust the quantity of the allocated write memory, so as to dynamically manage the allocated write memory, so that the allocated write memory can be maximized, and reduce the pressure of the storage array end on reserving memory for other storage array cards.
[0116] In actual applications, the storage array card writes the service data to the current write memory in order to ease or control the storage speed of the storage array backend, and finally writes the service data in the current write memory to the storage array backend. The specific process after the current write memory of the storage array card writes the service data is introduced below. In one embodiment, after executing the steps in S102 above, as shown in FIG6 , the method may further include the following steps:
[0117] S109: Write the business data currently in the write memory to the back end of the storage array.
[0118] Specifically, the storage array card can determine the writing time of the business data in the current write memory to the storage array back end according to the preset control strategy, and then write the business data in the current write memory to the storage array back end when the writing time arrives. This can reduce the writing speed of the business data in the current write memory to the storage array back end, thereby reducing the storage pressure on the storage array back end.
[0119] In actual applications, the storage array end can obtain the business data in the data storage command, convert the type 6 business data into type 9 business data, and forward both the type identifier of the business data and the type 9 business data to the processor at the storage array end. Further, when the processor at the storage array end recognizes that the type identifier of the business data is an immediate number identifier, the type 9 business data can be sent to the storage array back end to instruct the type 9 business data to be backed up, so as to complete writing the business data in the current write memory to the storage array back end.
[0120] In the embodiment of the present application, the immediate value identifier can be represented by the First Burst 2 Received IOCB information, and the type 9 type of business data can be represented by the type 9 ATIO IOCB. Specifically, the processor at the storage array end can receive the First Burst 2 Received IOCB and the type 9 ATIO IOCB, and send the type 9 ATIO IOCB to the storage array backend to instruct the storage array backend to back up the type 9 ATIO IOCB, that is, complete the writing of the business data currently in the write memory to the storage array backend.
[0121] S110. When the business data is written to the back end of the storage array, a storage response message is sent to the host card, and a processable command quantity is sent to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity.
[0122] Furthermore, when all business data is written to the storage array backend, it indicates that the data storage command response is completed. At this time, the storage array backend can send a storage response message to the processor on the storage array end, and the processor of the storage response message can send the storage response message to the storage array card. Correspondingly, after the storage array card receives the storage response message, it sends the storage response message to the host card, which is forwarded to the processor on the host end through the host card, so that the processor on the host end outputs the storage response message to remind the user.
[0123] At the same time, when the storage array card sends a storage response message to the host card, it can also synchronously send the processable command quantity to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity. Among them, the storage array card can obtain the processable command quantity by subtracting the total number of current data storage commands from its own processable concurrency number; the processable concurrency number can be understood as the maximum data storage command quantity that the storage array card can process, and the processable command quantity can be understood as the number of concurrent data storage commands that the storage array card can currently process.
[0124] The technical solution in the embodiment of the present application writes the business data in the current write memory to the storage array backend, and when the business data is written to the storage array backend, sends a storage response message to the host card, and sends the processable command quantity to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity; the above method can send a storage response message to the host card to remind the user that the data storage command has been successfully responded to when the data storage command response is completed, and at the same time, the storage array card can send the processable command quantity to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity, which can avoid the congestion problem of other data storage commands and reduce the response pressure of the storage array card to other data storage commands.
[0125] In one embodiment, the present application also provides a data writing method, which is applied to a storage array card at a storage array end, and the method includes the following process:
[0126] (1) In response to a data storage command sent by a host card at the host end, the data storage command is parsed and processed to obtain header information in the data storage command;
[0127] (2) Identify and process the header information to determine the data type of the business data in the header information;
[0128] (3) When the data type is a preset type, detecting whether multiple candidate write memories of the storage array card meet the current command response requirements; each candidate write memory is a corresponding original write memory or a write memory after each original write memory is configured;
[0129] (4) If not satisfied, obtain the memory quantity of at least one initial write memory of the storage array card;
[0130] (5) When the memory quantity is greater than a preset quantity threshold, determine the release quantity corresponding to each initial write memory according to the memory quantity and the preset quantity threshold;
[0131] (6) releasing the number of initial write memories released in each initial write memory to the shared memory pool at the storage array end, and determining the unreleased initial write memories as candidate write memories;
[0132] (7) determining an additional number according to the total number of candidate write memories and the command response requirement, allocating an additional number of write memories from the shared memory pool on the storage array side as each additional write memory, and determining each candidate write memory and each additional write memory as the current write memory;
[0133] (8) If satisfied, determine the current write memory based on each candidate write memory;
[0134] (9) writing the service data into the current write memory of the storage array card; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card;
[0135] (10) Write the business data currently in the write memory to the back end of the storage array;
[0136] (11) When the business data is written to the back end of the storage array, a storage response message is sent to the host card, and the processable command quantity is sent to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity.
[0137] The execution process of the above (1) to (11) can be specifically referred to the description of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0138] As shown in FIG. 7 , it is a flow chart of a data writing method provided in an embodiment of the present application. The method is applied to a host card at the host end. The method can be implemented by the following steps:
[0139] S201. Send a data storage command to a storage array card at the storage array end, instructing to obtain the data type of the business data carried in the data storage command, and when the data type is a preset type, write the business data to the current write memory of the storage array card; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card.
[0140] Among them, there can be multiple host cards installed on the host side, and the host card on the host side can be any host card installed on the host side. In actual applications, after the processor on the host side receives the write data input by the user, it can convert the write data into business data according to the specifications of the transmission protocol supported by the host card and the storage array card, and then generate a data storage command based on the business data. Among them, the format of the data storage command conforms to the specifications of the transmission protocol supported by the host card and the storage array card, and in the embodiment of the present application, it conforms to the specifications of the FC protocol. Optionally, the above-mentioned data storage command can be composed of header information and tail information, the tail information can include business data and multiple connection identifiers, and the header information can include the data type, length, source information, receiver information, etc. of the business data.
[0141] It should be noted here that the business data in the tail information exists in the form of multiple sub-data, and the multiple sub-data are combined to obtain the business data, wherein, except for the last sub-data in the business data, each sub-data carries a connection identifier, and the connection identifier of each sub-data is different. The connection identifier carried by the sub-data here can be understood as a pointer to the next sub-data combined after the sub-data or the position in the tail information. Optionally, the above-mentioned business data can be different types of business data, such as communication data, Internet data, video data, audio data, financial data, education data, etc., which is not limited in the embodiments of the present application.
[0142] Specifically, the processor at the host end can send a data storage command to the host card at the host end, and correspondingly, the host card can send the data storage command to the storage array card at the storage array end, indicating the data type of the business data carried in the data storage command, and when the data type is a preset type, the business data is written to the current write memory of the storage array card. Among them, the host card needs to transmit the data storage command to the storage array card according to the transmission protocol supported by itself, and correspondingly, the host card can send multiple data storage commands to the storage array card in sequence in the form of a command stream. Here, the host card sends any data storage command to the storage array card as an example for explanation.
[0143] S202: Obtain a storage response message fed back by the storage array card in response to a data storage command.
[0144] In actual applications, the storage array card can determine the writing time of the business data in the current write memory to the storage array back end according to the preset control strategy, and then write the business data in the current write memory to the storage array back end when the writing time arrives. This can reduce the writing speed of the business data in the current write memory to the storage array back end, thereby reducing the storage pressure on the storage array back end.
[0145] In actual applications, the storage array end can obtain the business data in the data storage command, convert the type 6 business data into type 9 business data, and forward both the type identifier of the business data and the type 9 business data to the processor at the storage array end. Further, when the processor at the storage array end recognizes that the type identifier of the business data is an immediate number identifier, the type 9 business data can be sent to the storage array back end to instruct the type 9 business data to be backed up, so as to complete writing the business data in the current write memory to the storage array back end.
[0146] At the same time, when the storage array card indirectly writes all the business data in the current write memory to the storage array backend through the processor on the storage array end, it indicates that the data storage command response is completed. At this time, the storage array backend can send a storage response message to the processor on the storage array end, and the processor of the storage response message can send the storage response message to the storage array card. Correspondingly, after receiving the storage response message, the storage array card sends the storage response message to the host card, which is forwarded to the processor on the host end through the host card, so that the processor on the host end outputs the storage response message to remind the user.
[0147] Furthermore, the host card may obtain a storage response message fed back by the storage array card in response to the data storage command.
[0148] The technical solution in the embodiment of the present application sends a data storage command to the storage array card at the storage array end, instructs to obtain the data type of the business data carried in the data storage command, and when the data type is a preset type, writes the business data to the current write memory of the storage array card, and obtains the storage response message fed back by the storage array card after responding to the data storage command; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card; the above method does not require the two interactive processes of first allocating the write memory of the storage array card and then writing the business data to the write memory each time responding to a write business, and can be based on the original write memory pre-allocated before the storage array card establishes a connection with the host card The original write memory dynamically configured with the write memory allows the host card and the storage array card to complete the writing of data through only one interaction, thus reducing the one-time interaction process between the host card and the storage array card, and shortening the time for responding to the write service, that is, greatly reducing the write delay in the long-distance transmission scenario, reducing the write delay of the write service, and thus improving the performance of the application service involved in the write service; at the same time, the above method does not need to allocate the write memory in real time during the data storage process, and can dynamically configure the write memory responding to the write service based on the original write memory pre-allocated before the storage array card and the host card establish a connection, which can greatly reduce the allocation time of the write memory during the data storage process, thereby accelerating the response speed of the write service.
[0149] In some scenarios, the storage array card can instruct the host card to indirectly control the number of data storage commands processed by itself according to its own processing of data storage commands, so as to reduce the command processing pressure of the storage array card. The following is a description of how the host card controls the number of data storage commands processed by the storage array card. In one embodiment, as shown in FIG8 , in the process of the storage array card feeding back a storage response message to the host card, the above method may further include the following steps:
[0150] S203: Obtain the processable command quantity sent by the storage array card.
[0151] When the storage array card feeds back the storage response message to the host card, the storage array card can also feed back its own processable command quantity to the host card synchronously. Correspondingly, the host card can obtain the processable command quantity sent by the storage array card.
[0152] Optionally, the storage array card can subtract the total number of current data storage commands from its own processable concurrency number to obtain the processable command volume; the processable concurrency number can be understood as the maximum number of data storage commands that the storage array card can process, and the processable command volume can be understood as the number of data storage commands that the storage array card can currently process.
[0153] S204: Control the sending frequency of other data storage commands according to the processable command quantity.
[0154] In one implementation, the host card can pre-train a control model, and then input the processable command quantity into the control model, the control model outputs a sending frequency control strategy, and then controls the sending frequency of other subsequent data storage commands according to the sending frequency control strategy. Optionally, the above control model can be composed of at least one of a convolutional neural network model, a recurrent neural network model, a long short-term memory neural network model, a fully connected neural network model, a residual neural network model, etc.
[0155] In another implementation, the host card may also perform comparison processing, analysis processing, matching processing and other operations according to the processable command quantity, and control the sending frequency of other subsequent data storage commands according to the processing operation results.
[0156] In one embodiment, the step of controlling the sending frequency of other data storage commands according to the processable command quantity in S204 above can be implemented in the following manner:
[0157] If the amount of processable commands is less than the preset command quantity threshold, other data storage commands are sent according to the target sending frequency to control the sending frequency of other data storage commands; the target sending frequency is less than the sending frequency of data storage commands; if the amount of processable commands is greater than or equal to the command quantity threshold, the sending frequency of data storage commands is maintained to complete the control of the sending frequency of other data storage commands.
[0158] In the embodiment of the present application, the host card can determine that the amount of processable commands is less than a preset command quantity threshold. If it is determined that the amount of processable commands is less than the command quantity threshold, other data storage commands are subsequently sent according to the target sending frequency to control the sending frequency of other data storage commands. The above-mentioned target sending frequency is less than the sending frequency of the data storage command, that is, the speed of sending other data storage commands according to the target sending frequency will be less than the speed of sending the data storage command.
[0159] Optionally, the above-mentioned preset command quantity threshold may be user-defined or determined based on historical experience values, but the command quantity threshold is greater than or equal to 1, which is not limited in the embodiments of the present application.
[0160] In addition, if it is determined that the processable command volume is greater than or equal to the command quantity threshold, the sending frequency of the data storage command can be used as the sending frequency of other subsequent data storage commands, that is, the sending frequency of the data storage command is maintained to complete the control of the sending frequency of other subsequent data storage commands.
[0161] This embodiment can send other data storage commands at a target sending frequency to control the sending frequency of other data storage commands when it is determined that the amount of processable commands is less than a preset command quantity threshold. When the amount of processable commands is greater than or equal to the command quantity threshold, the sending frequency of data storage commands is maintained to complete the control of the sending frequency of other data storage commands. The above method can control the sending frequency of other data storage commands based on the size relationship between the amount of processable commands and the preset command quantity threshold. The control process is relatively simple and does not require the participation of complex algorithms, thereby reducing the complexity of the control process.
[0162] The technical solution in the embodiment of the present application can obtain the processable command quantity sent by the storage array card, and control the sending frequency of other data storage commands according to the processable command quantity, thereby controlling the speed at which the storage array card receives the data storage commands to reduce the command processing pressure of the storage array card.
[0163] In one embodiment, the present application also provides a data writing method, which is applied to a host card at a host end, and the method includes the following process:
[0164] (1) Sending a data storage command to the storage array card at the storage array end, indicating the data type of the business data carried in the data storage command, and writing the business data to the current write memory of the storage array card when the data type is a preset type; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card;
[0165] (2) Obtaining a storage response message fed back by the storage array card in response to the data storage command;
[0166] (3) Obtain the amount of processable commands sent by the storage array card;
[0167] (4) If the processable command quantity is less than a preset command quantity threshold, other data storage commands are sent according to a target sending frequency to control the sending frequency of other data storage commands; the target sending frequency is less than the sending frequency of the data storage commands;
[0168] (5) If the processable command quantity is greater than or equal to the command quantity threshold, the sending frequency of the data storage command is maintained to complete the control of the sending frequency of other data storage commands.
[0169] The execution process of the above (1) to (5) can be specifically referred to the description of the above embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0170] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0171] Based on the same inventive concept, an embodiment of the present application further provides a data storage system, as shown in FIG1 , the system comprises: a storage array end, at least one storage array card installed on the storage array end, a host end, and at least one host card installed on the host end;
[0172] Wherein, each storage array card is used to execute the steps of the method of the embodiment in Figures 2 to 6;
[0173] Each host card is used to execute the steps of the method in the embodiments of Figures 7 and 8.
[0174] In one embodiment, the above system further includes: a storage array backend;
[0175] The storage array backend is used to store the corresponding business data sent by each storage array card.
[0176] The data storage system provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0177] Based on the same inventive concept, the embodiment of the present application also provides a data writing device for implementing the data writing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data writing device embodiments provided below can refer to the limitations on the data writing method above, and will not be repeated here.
[0178] In one embodiment, FIG9 is a schematic diagram of the structure of a data writing device in an embodiment of the present application. The data writing device provided in the embodiment of the present application can be applied to a storage array card at a storage array end. As shown in FIG9 , the data writing device in the embodiment of the present application may include: a response module 11 and a storage module 12, wherein:
[0179] A response module 11 is used to respond to a data storage command sent by a host card at the host end, and obtain a data type of the service data carried in the data storage command;
[0180] The storage module 12 is used to write the business data into the current write memory of the storage array card when the data type is a preset type; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card.
[0181] The data writing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0182] In one embodiment, the response module 11 includes: a parsing processing unit and an identification processing unit, wherein:
[0183] A parsing and processing unit, used to parse and process the data storage command to obtain header information in the data storage command;
[0184] The identification and processing unit is used to identify and process the header information to determine the data type of the business data in the header information.
[0185] The data writing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0186] In one embodiment, if there are multiple data storage commands, the data writing device further includes: a detection module, an allocation module and a first determination module, wherein:
[0187] A detection module is used to detect whether multiple candidate write memories of the storage array card meet the current command response requirements; each candidate write memory is a corresponding original write memory or a write memory after each original write memory is configured;
[0188] an allocation module, for determining an additional quantity according to the total quantity of each candidate write memory and the command response requirement when the detection result of the detection module is unsatisfactory, allocating an additional quantity of write memories from the shared memory pool at the storage array end as each additional write memory, and determining each candidate write memory and each additional write memory as the current write memory;
[0189] The first determination module is used to determine the current write memory according to each candidate write memory when the detection result of the detection module is satisfied.
[0190] The data writing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0191] In one embodiment, the data writing device further includes: a quantity acquisition module, a second determination module and a memory release module, wherein:
[0192] A quantity acquisition module, used to acquire the memory quantity of at least one initial write memory of the storage array card;
[0193] A second determination module is used to determine the release quantity corresponding to each initial write memory according to the memory quantity and the preset quantity threshold when the memory quantity is greater than the preset quantity threshold;
[0194] The memory release module is used to release the released number of initial write memories in each initial write memory to the shared memory pool of the storage array end, and determine the unreleased initial write memories as each candidate write memory.
[0195] The data writing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0196] In one embodiment, the data writing device further includes: a data writing module and a message sending module, wherein:
[0197] The data writing module is used to write the business data currently in the write memory to the storage array backend;
[0198] The message sending module is used to send a storage response message to the host card when the business data is written to the back end of the storage array, and to send the processable command quantity to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity.
[0199] The data writing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0200] In another embodiment, FIG10 is a schematic diagram of the structure of a data writing device in an embodiment of the present application. The data writing device provided in the embodiment of the present application can be applied to a host card at the host end. As shown in FIG10, the data writing device in the embodiment of the present application may include: a sending module 21 and a message acquisition module 22, wherein:
[0201] The sending module 21 is used to send a data storage command to the storage array card at the storage array end, indicating the data type of the business data carried in the data storage command, and when the data type is a preset type, write the business data into the current write memory of the storage array card; wherein the current write memory is based on the original write memory configuration pre-allocated before the storage array card establishes a connection with the host card;
[0202] The message acquisition module 22 is used to acquire the storage response message fed back by the storage array card after responding to the data storage command.
[0203] The data writing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0204] In one embodiment, the data writing device further includes: a command quantity acquisition module and a control module, wherein:
[0205] A command quantity acquisition module is used to acquire the processable command quantity sent by the storage array card;
[0206] The control module is used to control the sending frequency of other data storage commands according to the processable command quantity.
[0207] The data writing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0208] In one embodiment, the control module is specifically used to:
[0209] If the processable command quantity is less than the preset command quantity threshold, other data storage commands are sent according to the target sending frequency to control the sending frequency of other data storage commands; the target sending frequency is less than the sending frequency of the data storage commands;
[0210] If the processable command quantity is greater than or equal to the command quantity threshold, the sending frequency of the data storage command is maintained to control the sending frequency of other data storage commands.
[0211] The data writing device provided in the embodiment of the present application can be used to execute the technical solution in the above-mentioned data writing method embodiment of the present application. Its implementation principle and technical effect are similar and will not be repeated here.
[0212] For the specific definition of the data writing device, please refer to the definition of the data writing method above, which will not be repeated here. Each module in the above-mentioned data writing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0213] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in FIG11. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide processing capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store business data. The network interface of the computer device is used to communicate with an external endpoint via a network connection. When the computer program is executed by the processor, a data writing method is implemented.
[0214] Those skilled in the art will understand that the structure shown in FIG. 11 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0215] In one embodiment, a computer device is also provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the technical solution in the above-mentioned data writing method embodiment of the present application is implemented, and its implementation principle and technical effect are similar and will not be repeated here.
[0216] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the technical solution of the above-mentioned data writing method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0217] In one embodiment, a computer program product is also provided, including a computer program. When the computer program is executed by a processor, the technical solution of the above-mentioned data writing method of the present application is implemented. The implementation principle and technical effect are similar and will not be repeated here.
[0218] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0219] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0220] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A data writing method, characterized in that: A storage array card applied to a storage array end, the method comprising: In response to a data storage command sent by a host card at the host end, obtaining a data type of the service data carried in the data storage command; When the data type is a preset type, the business data is written into the current write memory of the storage array card; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card.
2. The method according to claim 1, characterized in that The data type of the business data carried in the data storage command for obtaining the data includes: Parsing the data storage command to obtain header information in the data storage command; The header information is identified and processed to determine the data type of the business data in the header information.
3. The method according to claim 1 or 2, characterized in that: If there are multiple data storage commands; before writing the service data into the current write memory of the storage array card, the method further includes: Detecting whether a plurality of candidate write memories of the storage array card meet the current command response requirements; each of the candidate write memories is a corresponding original write memory or a write memory after each original write memory is configured; If not satisfied, determining an additional quantity according to the total quantity of each candidate write memory and the command response requirement, allocating the additional quantity of write memories from the shared memory pool at the storage array end as each additional write memory, and determining each candidate write memory and each additional write memory as the current write memory; If satisfied, determining the current write memory according to each of the candidate write memories; Correspondingly, before detecting whether the candidate write memory of the storage array card meets the storage requirement of the business data, the method further includes: Obtaining the memory quantity of at least one initial write memory of the storage array card; In the case where the memory quantity is greater than a preset quantity threshold, determining the release quantity corresponding to each of the initial write memories according to the memory quantity and the preset quantity threshold; A released number of initial write memories in each of the initial write memories are released to a shared memory pool at the storage array end, and unreleased initial write memories are determined as each of the candidate write memories.
4. The method according to claim 1 or 2, characterized in that: The method further comprises: Writing the business data in the current write memory to the storage array backend; When the business data is written to the storage array back end, a storage response message is sent to the host card, and a processable command quantity is sent to the host card to instruct the host card to control the sending frequency of other data storage commands according to the processable command quantity.
5. A data writing method, characterized in that: The method for a host card applied to a host side includes: Sending a data storage command to the storage array card at the storage array end, instructing to obtain the data type of the business data carried in the data storage command, and writing the business data into the current write memory of the storage array card when the data type is a preset type; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card; A storage response message fed back by the storage array card after responding to the data storage command is obtained.
6. The method according to claim 5, characterized in that The method further comprises: Obtaining the processable command quantity sent by the storage array card; According to the processable command amount, controlling the sending frequency of other data storage commands; Correspondingly, controlling the sending frequency of other data storage commands according to the processable command quantity includes: If the processable command quantity is less than a preset command quantity threshold, sending the other data storage commands according to a target sending frequency to control the sending frequency of the other data storage commands; the target sending frequency is less than the sending frequency of the data storage commands; If the processable command quantity is greater than or equal to the command quantity threshold, the sending frequency of the data storage command is maintained to complete the control of the sending frequency of the other data storage commands.
7. A data storage system, characterized in that: The system comprises: a storage array end, at least one storage array card installed on the storage array end, a host end and at least one host card installed on the host end; Wherein, each of the storage array cards is used to execute the steps of any one of the methods of claims 1 to 4 above; Each of the host cards is used to execute the steps of any one of the methods described in claims 5-6.
8. A data writing device, characterized in that: The device comprises: A response module, configured to respond to a data storage command sent by a host card at a host end, and obtain a data type of the service data carried in the data storage command; A storage module is used to write the business data into the current write memory of the storage array card when the data type is a preset type; wherein the current write memory is configured based on the original write memory pre-allocated before the storage array card establishes a connection with the host card.
9. A data writing device, characterized in that: The device comprises: A sending module, used for sending a data storage command to a storage array card at a storage array end, indicating to obtain a data type of the service data carried in the data storage command, and writing the service data into a current write memory of the storage array card when the data type is a preset type; wherein the current write memory is configured based on an original write memory pre-allocated before the storage array card establishes a connection with the host card; The message acquisition module is used to acquire the storage response message fed back by the storage array card after responding to the data storage command.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Target port processing of a data transfer
CN105683934A
Data migration method, accelerator board, host and data migration system
CN107870879A
Solid state disk access method and storage equipment
CN112579311A
Space sharing method and device of writable file system
CN115809021A
Memory management method, electronic device, chip system, and readable storage medium
WO2024041219A1