A file reading and writing method and device

By introducing an acceleration device into the hospital information system to process file requests in parallel, the problem of low read and write efficiency was solved, and efficient reading and writing of file sequences was achieved.

CN112199338BActive Publication Date: 2025-10-24HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910611801.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-08
Publication Date
2025-10-24
Estimated Expiration
2039-07-08

AI Technical Summary

Technical Problem

Existing hospital information systems are slow in reading and writing medical image data, resulting in low read/write efficiency.

Method used

By introducing an acceleration device into the hospital information system, which communicates in parallel with multiple storage nodes, parallel reading and writing of files is achieved, and a parallel sub-request mechanism is adopted to improve read and write efficiency.

Benefits of technology

It effectively improves the reading and writing speed of file sequences, reduces the interaction time between the client and the server and between the server and the storage system, and improves reading and writing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112199338B_ABST
    Figure CN112199338B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a file reading and writing method and device, relates to the technical field of storage, and solves the problem of low reading efficiency. An acceleration device is added to the existing system, the data of the file sequence is read and written in parallel through the cooperation of the acceleration device and the storage node, and the reading and writing efficiency is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of storage, and in particular, to a file reading and writing method and device. BACKGROUND

[0002] A hospital information system is a platform that provides functions of collecting, storing, processing, extracting and data exchanging of patient diagnosis and treatment information and administrative management information for various departments in a hospital. The hospital information system usually stores a large amount of medical image data, such as image images of various radiological examinations, pathological images, ultrasonic examination images, etc. The existing hospital information system has a slow speed of reading / writing medical image data and a low reading and writing efficiency. SUMMARY

[0003] The present application provides a file reading and writing method and device, which can solve the problem of low reading and writing efficiency.

[0004] To achieve the above object, the present application adopts the following technical scheme:

[0005] In a first aspect, a file reading method is provided. After an acceleration device receives a read request for requesting reading data of a file sequence, the acceleration device sends a first sub-read request to a first storage node and a second sub-read request to a second storage node. The first sub-read request and the second sub-read request are sent in parallel. The first sub-read request is used to request reading data of a first file, and the second sub-read request is used to request reading data of a second file. The file sequence includes the first file and the second file. Then, after receiving the data of the first file sent by the first storage node and the data of the second file sent by the second storage node, the acceleration device sends the data of the first file and the data of the second file to a client.

[0006] The acceleration device communicates with the first storage node and the second storage node in parallel to realize parallel reading of the first file and the second file, thereby effectively improving the efficiency of reading the file sequence.

[0007] Optionally, in a possible implementation manner of the present application, the read request received by the acceleration device includes sequence information for indicating an arrangement order of the first file and the second file. Thus, the method of "the acceleration device sending the data of the first file and the data of the second file to the client" includes: the acceleration device arranges the data of the first file and the data of the second file according to the sequence information to obtain data of a file sequence; and then, the acceleration device sends the data of the file sequence to the client.

[0008] The first file and the second file in the file sequence are arranged in sequence, and the sequence information in the read request indicates the arrangement sequence. Therefore, after receiving the data of the first file and the data of the second file, the acceleration device needs to arrange the data of the first file and the data of the second file according to the sequence information to ensure the accuracy of the data of the file sequence.

[0009] Optionally, in another possible implementation manner of the present application, after receiving the data of the first file and the data of the second file, the acceleration device further buffers the data of the first file and the data of the second file. Correspondingly, after sending the data of the file sequence to the client, the data of the first file and the data of the second file in the buffer are further recovered to improve the effective utilization of the buffer.

[0010] In a second aspect, an acceleration device is provided, which can implement the functions in the first aspect and any possible implementation manner thereof. These functions can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0011] In a possible implementation manner of the present application, the acceleration device can include a reading unit and an interaction unit, which can perform the corresponding functions in the file reading method of the first aspect and any possible implementation manner thereof. For example, the reading unit is configured to receive a read request from a client, the read request being used to request reading data of a file sequence, the file sequence including a first file and a second file. The interaction unit is configured to send a first sub-read request to a first storage node and a second sub-read request to a second storage node, the first sub-read request and the second sub-read request being sent in parallel, the first sub-read request being used to request reading data of the first file, and the second sub-read request being used to request reading data of the second file. The interaction unit is further configured to receive the data of the first file sent by the first storage node and the data of the second file sent by the second storage node. The reading unit is further configured to send the data of the first file and the data of the second file received by the interaction unit to the client.

[0012] In a third aspect, a file writing method is provided. After receiving a first write request used to request writing data of a file in a file sequence, an acceleration device sends a first sub-write request to a first storage node and a second sub-write request to a second storage node, wherein the first sub-write request and the second sub-write request are sent in parallel, the file sequence including a first file and a second file, the first sub-write request being used to request writing data of the first file, and the second sub-write request being used to request writing data of the second file.

[0013] The acceleration device communicates with the first storage node and the second storage node in parallel to implement parallel writing of the first file and the second file, thereby effectively improving the efficiency of writing the file sequence.

[0014] Optionally, in a possible implementation of the present application, after determining that the data of the first file and the data of the second file have been written successfully, the acceleration device sends a write success response to the client.

[0015] The acceleration device communicates with the first storage node and the second storage node in parallel, and sends a message indicating that the writing is not successful to the client if the first file and / or the second file is not written successfully.

[0016] Optionally, in another possible implementation of the present application, the file sequence further includes a third file, and the first file, the second file and the third file are arranged in a preset order, and the first write request includes order information indicating the arrangement order of the first file, the second file and the third file. In a scenario where the third file is the last file in the file sequence, the acceleration device further sends a third sub-write request to the third storage node for requesting to write the data of the third file; and then, after determining that the data of the first file, the data of the second file and the data of the third file have been written successfully, the acceleration device sends a write success response to the client.

[0017] After receiving the write request, the acceleration device can first communicate with the first storage node and the second storage node in parallel, and then communicate with the third storage node, to implement the writing of the file data in the file sequence.

[0018] Optionally, in another possible implementation of the present application, the file sequence further includes a third file, and the first file, the second file and the third file are arranged in a preset order in sequence, and the third file is the last file in the file sequence. In this scenario, the acceleration device can further receive a second write request from the client for requesting to write the data of the third file, and send a third sub-write request to the third storage node for requesting to write the data of the third file; and then, after determining that the data of the first file, the data of the second file and the data of the third file have been written successfully, the acceleration device sends a write success response to the client.

[0019] During the writing of the data of the files in the file sequence, the client can send the first write request to the acceleration device first, and then send the second write request. Since the acceleration device communicates with the first storage node and the second storage node in parallel after receiving the first write request, the parallel writing of the first file and the second file is implemented, and therefore, the efficiency of writing the file sequence is improved.

[0020] In a fourth aspect, an acceleration apparatus is provided, which is capable of implementing the functions in the third aspect and any possible implementation thereof. These functions can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0021] In a possible implementation of the present application, the acceleration apparatus can include a write unit and an interaction unit, which can perform the corresponding functions in the file writing method of the third aspect and any possible implementation thereof. For example, the write unit is configured to receive a first write request from a client, the first write request being used to request writing data of a file in a file sequence, the file sequence including a first file and a second file. The interaction unit is configured to send a first sub-write request and a second sub-write request to a first storage node, the first sub-write request and the second sub-write request being sent in parallel, the first sub-write request being used to request writing data of the first file, and the second sub-write request being used to request writing data of the second file.

[0022] In a fifth aspect, an apparatus is provided, which includes one or more processors, and one or more memories; the one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions. When the one or more processors execute the computer instructions, the apparatus is caused to implement the file reading method of the first aspect and any possible implementation thereof, or the file writing method of the third aspect and any possible implementation thereof.

[0023] Optionally, the apparatus further includes a transceiver, which can be used to perform the steps of transceiving data, signaling or information in the file reading method of the first aspect and any possible implementation thereof, such as receiving a read request, receiving data of the first file and data of the second file, etc.; and can also be used to perform the steps of transceiving data, signaling or information in the file writing method of the third aspect and any possible implementation thereof, such as receiving a first write request, sending a first sub-write request, sending a second sub-write request, etc.

[0024] The apparatus can be a server (or a storage node), or a part of the apparatus in the server (or the storage node), such as a chip system in the server (or the storage node). The chip system is used to support the server (or the storage node) to implement the functions involved in the first aspect, the third aspect and any possible implementation thereof. The chip system includes a chip, and can also include other discrete devices or circuit structures.

[0025] In a sixth aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer instructions; when the computer instructions are run on a computer, the computer executes the file reading method according to the first aspect and possible implementation manners thereof, or executes the file writing method according to the third aspect and possible implementation manners thereof.

[0026] In a seventh aspect, a computer program product is provided, and the computer program product comprises computer instructions; when the computer instructions are run on a computer, the computer executes the file reading method according to the first aspect and possible implementation manners thereof, or executes the file writing method according to the third aspect and possible implementation manners thereof.

[0027] It should be noted that the computer instructions can be stored on a computer storage medium in whole or in part, and the first computer storage medium can be packaged together with the processor or packaged separately from the processor, and the present application does not limit this.

[0028] The fifth aspect, the sixth aspect, the seventh aspect and possible implementation manners thereof in the present application can refer to the detailed description in the first aspect, the third aspect and possible implementation manners thereof; and the beneficial effects of the fifth aspect, the sixth aspect, the seventh aspect and possible implementation manners thereof can refer to the beneficial effect analysis in the first aspect, the third aspect and possible implementation manners thereof, and will not be repeated here.

[0029] In the present application, the names of the above-mentioned acceleration devices do not constitute a limitation on the devices or functional modules themselves, and in actual implementation, these devices or functional modules can appear with other names. As long as the functions of each device or functional module are similar to those in the present application, they belong to the scope of the claims of the present application and equivalent technologies.

[0030] These aspects or other aspects of the present application will be more apparent in the following description. BRIEF DESCRIPTION OF DRAWINGS

[0031] Figure 1 Structure diagram of a communication system in an embodiment of the present application Figure 1 ;

[0032] Figure 2 Structure diagram of a communication system in an embodiment of the present application Figure 2 ;

[0033] Figure 3 Structure diagram of an acceleration device in an embodiment of the present application

[0034] Figure 4 Flowchart of a file reading method provided in an embodiment of the present application Figure 1 ;

[0035] Figure 5 A flowchart of communication between units in the acceleration device of the embodiment of the present application;

[0036] Figure 6 A flowchart of communication between units in the acceleration device of the embodiment of the present application;

[0037] Figure 7 A flowchart of the file reading method provided by the embodiment of the present application Figure 2 ;

[0038] Figure 8 A flowchart of the file reading method provided by the embodiment of the present application Figure 3 ;

[0039] Figure 9 A flowchart of communication between units in the acceleration device of the embodiment of the present application;

[0040] Figure 10 A flowchart of communication between units in the acceleration device of the embodiment of the present application;

[0041] Figure 11 A flowchart of the file writing method provided by the embodiment of the present application Figure 1 ;

[0042] Figure 12 A flowchart of the file writing method provided by the embodiment of the present application Figure 2 ;

[0043] Figure 13 A flowchart of the file writing method provided by the embodiment of the present application Figure 3 ;

[0044] Figure 14 A structural diagram of the device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0045] In the embodiments of the present application, the word "exemplary" or "for example" is used to mean serving as an example, instance, or illustration. Any implementation or design scheme described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or advantageous than other implementations or design schemes. Rather, the word "exemplary" or "for example" is used to present related concepts in a concrete manner.

[0046] A hospital information system usually stores a large amount of unstructured medical image data. The medical image data is medical data formed in the process of performing radiology, nuclear magnetic resonance, ultrasound, pathology, endoscopy and the like, and is usually stored, accessed and shared in a digital imaging and communications in medicine (DICOM) standard format.

[0047] A medical image device (such as a magnetic resonance imaging device, an ultrasound imaging device, etc.) usually generates a plurality of file sequences each including a plurality of source files in a DICOM format arranged in a preset order for each examination of a human body. Therefore, the medical image data has the characteristics of a large amount of data in a single file, a huge amount of data in a file sequence, and a fast growth rate of data amount per unit time.

[0048] The existing hospital information system usually reads and writes medical image data in a serial manner. For a certain file sequence, each file in the file sequence needs to be read and written in sequence when the file sequence is read and written, which consumes a large amount of time and has a low reading and writing efficiency.

[0049] Therefore, an embodiment of the present application provides a file reading and writing method and device. An acceleration device is added to the existing system, and the data in the file sequence is read and written in parallel by the cooperation of the acceleration device and the storage node, so that the reading and writing efficiency is effectively improved.

[0050] The file reading and writing method provided by the embodiment of the present application is applied to the reading and writing scene of a large amount of unstructured data, and is particularly suitable for a communication system including a client, a server, an acceleration device and a plurality of storage nodes. The plurality of storage nodes form a storage cluster (which can also be referred to as a storage system) for storing unstructured data in the communication system. The acceleration device can be placed in the server or in each storage node, and provides services through an application programming interface (API), a portable operating system interface of UNIX (POSIX) or other standard interfaces.

[0051] The communication system provided by the embodiment of the present application includes but is not limited to a hospital information system, a financial bill image management system, a system for training artificial intelligence algorithms and the like.

[0052] Figure 1 A structure of the communication system provided by the embodiment of the present application is shown. As shown in FIG. 1, the communication system includes a client 1, a server 2, an acceleration device 3 and a plurality of storage nodes 4. Figure 1As shown in the figure, the communication system comprises a client 10, a server 11 and a plurality of storage nodes 12, and the acceleration device 13 is deployed in the server 11.

[0053] The client 10 is configured to communicate with the server 11 and request a file sequence for reading or writing. The client 10 can be a program for providing services for a client, such as an image browser, or an image acquisition device, such as a magnetic resonance imaging device, an ultrasonic imaging device, etc. The embodiment of the present application does not make any limitation on this.

[0054] The server 11 refers to a device capable of communicating with the client and providing data support for the client. In actual application, the server 11 can provide services for one client 10 or simultaneously provide services for a plurality of clients 10. Figure 1 The client 10 is taken as an example for description.

[0055] The acceleration device 13 is integrated in the server 11 and is configured to, after receiving a read request for requesting data of the file sequence sent by the client 10, communicate with the plurality of storage nodes 12 in parallel to obtain data of each file in the file sequence; and is further configured to, after receiving a write request for requesting data of the file in the file sequence sent by the client 10, communicate with the plurality of storage nodes 12 in parallel to enable the storage nodes 12 to store data of a certain file in the file sequence.

[0056] The storage node 12 is configured to store unstructured data, such as medical image data. The storage node 12 can be a server or a desktop computer, and the embodiment of the present application does not make any limitation on this.

[0057] The data of the file in the communication system can be stored in the plurality of storage nodes 12 in a redundant manner. For example, in order to improve the reliability of the data and simultaneously improve the utilization rate of the storage space, the data of the file can be stored in the form of N data blocks + M check blocks (obtained according to an EC algorithm), wherein the N data blocks and the M check blocks are respectively located in different storage nodes 12.

[0058] Figure 2 Another structure of the communication system provided by the embodiment of the present application is shown. As shown in the figure, Figure 2 the communication system comprises a client 20, a server 21 and a plurality of storage nodes 22, and the acceleration device 23 is deployed in each storage node 22. The descriptions of the client 20, the server 21, the storage node 22 and the acceleration device 23 can refer to the descriptions of the client 10, the server 11, the storage node 12 and the acceleration device 13 described above, and will not be described in detail here. Figure 1

[0059] It should be noted that the Figure 1 and Figure 2 ​The structure of the communication system shown is only an example. In actual applications, the communication system can also include other devices, which are not described here one by one.

[0060] Figure 3 The logical architecture of the acceleration device (such as the acceleration device 13 or the acceleration device 23 described above) in the embodiment of the application is shown. As shown in the figure, from the perspective of logical functions, the acceleration device in the embodiment of the application includes an interface layer 30, a cache layer 31, and a data layer 32. Figure 3

[0061] The interface layer 30 is configured to provide a communication interface between the acceleration device and the server. The interface layer 30 can include a reading unit 300, a writing unit 301, and a cache recovery unit 302.

[0062] The reading unit 300 is configured to provide an interface for reading data. Specifically, the reading unit 300 is configured to receive a read request sent by a client for requesting data of a file sequence, and after receiving the read request, parse information of the file sequence in the request, and call the data layer 32 to read data in the file sequence in parallel. The reading unit 300 is also configured to receive data of each file sent by the data layer 32, and send the received data to the client. The reading unit 300 is further configured to arrange the received data of each file according to the arrangement order of the files.

[0063] The writing unit 301 is configured to provide an interface for writing data. Specifically, the writing unit 301 is configured to receive a write request sent by a client for requesting data of a file in a file sequence, and after receiving the write request, parse information of the file sequence in the request, and call the data layer 32 to write data in the file sequence to a storage node in parallel.

[0064] The cache recovery unit 302 is configured to provide an interface for cache recovery. Specifically, the cache recovery unit 302 is configured to communicate with the reading unit 300 or the writing unit 301, obtain information of a file sequence to be recovered, parse the information of the file sequence, and call the cache layer 31 to implement cache recovery of the file sequence to be recovered.

[0065] The cache layer 31 includes a cache unit 310, which is configured to cache non-persistent data temporarily saved in a file sequence or cache persistent data.

[0066] The data layer 32 is configured to implement interaction with a plurality of storage nodes. The data layer 32 includes an interaction unit 320, which is configured to communicate with the plurality of storage nodes in parallel to read data of each file in a file sequence or write received data of each file to the storage nodes.

[0067] It should be noted that, Figure 3 The logical architecture of the acceleration device shown is only an example. In actual applications, in addition to Figure 3 ​In addition to the illustrated components, the acceleration device can include more or fewer components, or combine some components, or different component arrangements.

[0068] The file reading and writing method provided by the embodiment of the present application is described below. For ease of understanding, the embodiment of the present application is described by taking an example in which the acceleration device is placed in a server.

[0069] The file reading and writing method provided by the embodiment of the present application includes a process of reading data of a file sequence and a process of writing data of a file sequence. The process of reading data of a file sequence is described first.

[0070] Figure 4 A flowchart of the process of reading data of a file sequence in the file reading method provided by the embodiment of the present application is shown in FIG. 4. Figure 4 As shown in FIG. 4, the file reading method provided by the embodiment of the present application includes the following steps.

[0071] S400, in response to a read operation of a user, the client sends a read request to the server, to request reading data of a file sequence.

[0072] After the client receives an operation input by the user for reading a file sequence, the client starts the process of reading data of the file sequence, sends a read request to the server, and requests reading data of the file sequence.

[0073] The file sequence includes a first file and a second file, and the first file and the second file are arranged in a preset order. The read request includes an identifier of the file sequence, order information, a storage address of the first file, and a storage address of the second file. The order information is used to indicate the arrangement order of the first file and the second file.

[0074] Here, the storage address of the first file can be a logical storage address of the first file or a physical storage address of the first file, and the embodiment of the present application does not limit this. Similarly, the storage address of the second file can be a logical storage address of the second file or a physical storage address of the second file, and the embodiment of the present application does not limit this.

[0075] S401, in response to the read request, the acceleration device in the server determines a first storage node and a second storage node.

[0076] The first file and the second file are stored in a redundant manner in a plurality of storage nodes. After receiving the read request, the server sends the read request to the acceleration device. After receiving the read request, the reading unit in the acceleration device determines the first storage node in the storage system according to the identifier of the file sequence and the storage address of the first file, and determines the second storage node in the storage system according to the identifier of the file sequence and the storage address of the second file. The first storage node stores part of the data of the first file, and the second storage node stores part of the data of the second file.

[0077] S402, the acceleration device in the server sends the first sub-read request to the first storage node in parallel, and sends the second sub-read request to the second storage node.

[0078] The first sub-read request is used to request reading of the data of the first file, and the second sub-read request is used to request reading of the data of the second file.

[0079] The first sub-read request includes the identifier of the first file, and the second sub-read request includes the identifier of the second file.

[0080] After determining the first storage node and the second storage node, the reading unit in the acceleration device can call the interaction unit to read the data, and then the interaction unit communicates with the first storage node and the second storage node in parallel to obtain the data of the first file and the data of the second file (the latter Figure 5 This way is shown), or the interaction unit can be called in parallel to read the data, so that the interaction unit communicates with the first storage node and the second storage node to obtain the data of the first file and the data of the second file (the latter Figure 6 This way is shown).

[0081] S403, the first storage node obtains the data of the first file and sends the data of the first file to the acceleration device.

[0082] After receiving the first sub-read request, the first storage node communicates with other storage nodes storing the data of the first file according to the identifier of the first file to obtain the data of the first file, and after obtaining the data of the first file, sends the data of the first file to the acceleration device.

[0083] Optionally, after obtaining the data of the first file, the first storage node can also perform integrity checking and correctness checking on the obtained data, and after the checking is successful, sends the data of the first file to the acceleration device.

[0084] S404, the second storage node obtains the data of the second file and sends the data of the second file to the acceleration device.

[0085] The second storage node, after receiving the second sub-read request, communicates with other storage nodes storing data of the second file according to the identifier of the second file to obtain the data of the second file, and sends the data of the second file to the acceleration device after obtaining the data of the second file.

[0086] Optionally, the second storage node, after obtaining the data of the second file, can further perform integrity check and correctness check on the obtained data, and send the data of the second file to the acceleration device after the check is successful.

[0087] In actual application, the execution speed of S403 depends on the performance of the first storage node, and the execution speed of S404 depends on the performance of the second storage node, thus, the sequence of S403 and S404 is not limited in the embodiment of the present application.

[0088] S405, the acceleration device caches the data of the first file and the data of the second file.

[0089] Specifically, the interaction unit in the acceleration device communicates with the caching unit after receiving the data of the first file and the data of the second file, and the caching unit caches the data of the first file and the data of the second file.

[0090] S406, the acceleration device arranges the data of the first file and the data of the second file according to the sequence information to obtain the data of the file sequence, and sends the data of the file sequence to the client.

[0091] The first file and the second file in the file sequence are arranged according to the preset sequence, and correspondingly, the reading unit of the acceleration device also arranges the data of the first file and the data of the second file according to the sequence after obtaining the data of the first file and the data of the second file to ensure the correctness of the data of the file sequence. Then, the reading unit in the acceleration device sends the data of the file sequence to the client.

[0092] In combination with the above Figure 3 In the process of reading the data of the file sequence, Figure 5 a flow of mutual communication between units in the acceleration device is shown, Figure 6 another flow of mutual communication between units in the acceleration device is shown. The difference is that in Figure 5 , the reading unit calls the interaction unit to read data, and then the interaction unit communicates with the first storage node and the second storage node in parallel to obtain the data of the first file and the data of the second file; in Figure 6 , the reading unit calls the interaction unit in parallel, so that the interaction unit communicates with the first storage node and the second storage node.

[0093] It can be seen that the acceleration device communicates with the first storage node and the second storage node in the storage system in parallel, and the data of the first file and the data of the second file can be obtained in a short time, thereby effectively improving the efficiency of reading the data of the file sequence.

[0094] Further, after sending the data of the file sequence to the client, the acceleration device can further recycle the data of the first file and the data of the second file in the cache, so as to improve the effective utilization rate of the cache.

[0095] In combination with the above Figure 4 As Figure 7 indicated, the file reading method provided by the embodiment of the application further includes the following steps.

[0096] S701, the acceleration device recycles the data of the first file and the data of the second file in the cache.

[0097] Optionally, the acceleration device can recycle the data of the first file and the data of the second file in the cache by using any of the following algorithms: first in first out (FIFO) algorithm, least recently used (LRU) algorithm, and least frequently used (LFU) algorithm.

[0098] Of course, the acceleration device can also recycle the data of the first file and the data of the second file in the cache by using other algorithms, which will not be listed one by one here.

[0099] In summary, the acceleration device in the server communicates with the storage node in parallel to obtain the data of the file sequence, thereby effectively reducing the interaction time of the multiple files in the file sequence between the client and the server and between the server and the storage system, and improving the reading efficiency.

[0100] Next, the process of storing the data of the file sequence is described.

[0101] Figure 8 A flowchart of a file writing method provided by an embodiment of the application for writing the data of the file sequence is shown in FIG. 8. Figure 8 As shown in FIG. 8, the file writing method provided by the embodiment of the application includes the following steps.

[0102] S800, in response to a user's writing operation, the client sends a first write request to the server to request writing the data of the file sequence.

[0103] After receiving the user input operation for writing the file sequence, the client starts the process of writing the data of the file sequence, and sends a first write request to the server to request writing the data of the file sequence.

[0104] The file sequence includes a first file and a second file, and the first file and the second file are arranged in a preset order. The first write request includes an identifier of the file sequence, data of the first file, and data of the second file.

[0105] S801, the acceleration device in the server caches the data of the first file and the data of the second file.

[0106] Specifically, after receiving the data of the first file and the data of the second file, the write unit in the acceleration device communicates with the caching unit, and the caching unit caches the data of the first file and the data of the second file.

[0107] S802, in response to the first write request, the acceleration device in the server determines a first storage node and a second storage node.

[0108] After receiving the first write request, the server sends the first write request to the acceleration device. After receiving the first write request, the write unit in the acceleration device determines, based on a load balancing strategy in the storage system (for ensuring that the loads of each storage node in the storage system are basically consistent), a first storage node for storing part of the data of the first file and a second storage node for storing part of the data of the second file according to the identifier of the file sequence, the data of the first file, and the data of the second file.

[0109] In the embodiment of the application, the data of the first file and the data of the second file are stored in a redundant manner in a plurality of storage nodes. Here, the first storage node is any one of the plurality of storage nodes storing part of the data of the first file, and similarly, the second storage node is any one of the plurality of storage nodes storing part of the data of the second file.

[0110] S803, the acceleration device sends a first sub-write request to the first storage node in parallel, and sends a second sub-write request to the second storage node in parallel.

[0111] The first sub-write request is used to request writing of the data of the first file, and the second sub-write request is used to request writing of the data of the second file.

[0112] The first sub-write request includes the data of the first file, and the second sub-write request includes the data of the second file.

[0113] After determining the first storage node and the second storage node, the write unit in the acceleration device can call the interaction unit to write data, and then the interaction unit communicates with the first storage node and the second storage node in parallel to write the data of the first file and the data of the second file (the subsequent Figure 9The interaction unit can be invoked to read data in parallel, so that the interaction unit communicates with the first storage node and the second storage node to write the data of the first file and the data of the second file (subsequently Figure 10 The interaction unit can be invoked to read data in parallel, so that the interaction unit communicates with the first storage node and the second storage node to write the data of the first file and the data of the second file (subsequently

[0114] S804, the first storage node communicates with other storage nodes to store the data of the first file, and sends a first response to the acceleration device, indicating that the data of the first file has been successfully written.

[0115] The first storage node determines other storage nodes for storing part of the data of the first file based on a load balancing strategy in the storage system after receiving the first sub-write request, and communicates with the determined storage nodes to store the data of the first file.

[0116] The first storage node divides the data of the first file into N data blocks after receiving the first sub-write request, and calculates the data in M check blocks according to the data in the N data blocks, and then the first storage node communicates with other storage nodes for storing part of the data of the first file to store the data of the first file.

[0117] After the data of the first file is successfully written, the first storage node sends a first response to the interaction unit in the acceleration device, indicating that the data of the first file has been successfully written.

[0118] S805, the second storage node communicates with other storage nodes to store the data of the second file, and sends a second response to the acceleration device, indicating that the data of the second file has been successfully written.

[0119] The second storage node determines other storage nodes for storing part of the data of the second file based on a load balancing strategy in the storage system after receiving the second sub-write request, and communicates with the determined storage nodes to store the data of the second file.

[0120] The second storage node divides the data of the second file into N' data blocks after receiving the second sub-write request, and calculates the data in M' check blocks according to the data in the N' data blocks, and then the second storage node communicates with other storage nodes for storing part of the data of the second file to store the data of the second file.

[0121] After the data of the second file is successfully written, the second storage node sends a second response to the interaction unit in the acceleration device, indicating that the data of the second file has been successfully written.

[0122] S806, after receiving the first response and the second response, the acceleration device sends a write success response to the client.

[0123] Of course, if the data of the first file and / or the data of the second file is not written successfully, the acceleration device sends a write failure response to the client.

[0124] In combination with the above Figure 3 During the process of writing the data of the file sequence, Figure 9 A flow of mutual communication between each unit in the acceleration device is shown, Figure 10 Another flow of mutual communication between each unit in the acceleration device is shown. The difference is that in Figure 9 , the writing unit, after determining the first storage node and the second storage node, calls the interaction unit to write data, and then the interaction unit communicates with the first storage node and the second storage node in parallel to realize the writing of the data of the first file and the data of the second file; in Figure 10 , the writing unit, after determining the first storage node and the second storage node, calls the interaction unit in parallel, so that the interaction unit communicates with the first storage node and the second storage node to realize the writing of the data of the first file and the data of the second file.

[0125] It can be seen that the acceleration device communicates with the first storage node and the second storage node in the storage system in parallel, and the data of the first file and the data of the second file can be written in a short time, effectively improving the efficiency of writing the data of the file sequence.

[0126] Further optionally, the acceleration device can also recycle the data of the first file and the data of the second file in the cache after determining that the data of the first file and the data of the second file are written successfully, so as to improve the effective utilization rate of the cache.

[0127] In combination with the above Figure 8 As shown in Figure 11 , the file writing method provided by the embodiment of the application further comprises:

[0128] S1101, the acceleration device recycles the data of the first file and the data of the second file in the cache.

[0129] Optionally, the acceleration device can recycle the data of the first file and the data of the second file in the cache by using any of the following algorithms: first in first out (FIFO) algorithm, least recently used (LRU) algorithm, and least frequently used (LFU) algorithm.

[0130] Of course, the acceleration device can also recycle the data of the first file and the data of the second file in the cache by using other algorithms, which will not be listed one by one here.

[0131] In summary, the acceleration device in the server communicates with the storage nodes in parallel to write the data of the file sequence, effectively reducing the interaction time of the multiple files in the file sequence between the client and the server, between the server and the storage system, and improving the writing efficiency.

[0132] For the file sequence including the first file, the second file and the third file arranged in sequence, the embodiment of the application can adopt Figure 8 or Figure 11 the flow shown in the figure to write the data of the first file, the data of the second file and the data of the third file in parallel, or to write the data of the first file and the data of the second file in parallel first, and then write the data of the third file.

[0133] The following Figure 12 or Figure 13 the flow shown in the figure shows the process of writing the data of the first file and the data of the second file in parallel first, and then writing the data of the third file.

[0134] Specifically, as Figure 12 shown, the file writing method provided by the embodiment of the application includes the following steps.

[0135] S1200, in response to the writing operation of the user, the client sends a first writing request to the server, to request to write the data of the file sequence.

[0136] The file sequence includes the first file, the second file and the third file, the first file, the second file and the third file are arranged in a preset order, and the third file is the last file in the file sequence.

[0137] The first writing request includes the identification of the file sequence, the sequence information, the data of the first file, the data of the second file and the data of the third file. The sequence information is used to indicate the arrangement order of the first file, the second file and the third file.

[0138] S1201, the acceleration device in the server caches the data of the first file, the data of the second file and the data of the third file.

[0139] Specifically, the writing unit in the acceleration device communicates with the caching unit after receiving the data of the first file, the data of the second file and the data of the third file, and the caching unit caches the data of the first file, the data of the second file and the data of the third file.

[0140] S1202, in response to the first writing request, the acceleration device in the server determines the first storage node and the second storage node.

[0141] S1202 can refer to the description of S802 above, which will not be described here.

[0142] S1203: The acceleration device sends a first sub-write request to the first storage node and a second sub-write request to the second storage node in parallel.

[0143] For S1203 , reference may be made to the description of S803 above, which will not be repeated here.

[0144] S1204: The first storage node communicates with other storage nodes to store the data of the first file, and sends a first response to the acceleration device to indicate that the data of the first file has been successfully written.

[0145] For S1204, reference may be made to the description of S804 above, which will not be repeated here.

[0146] S1205: The second storage node communicates with other storage nodes to store the data of the second file, and sends a second response to the acceleration device to indicate that the data of the second file has been successfully written.

[0147] For S1205, reference may be made to the description of S805 above, which will not be repeated here.

[0148] S1206. After receiving the first response and the second response, the acceleration device determines a third storage node in response to the first write request.

[0149] The acceleration device receives the first response and the second response, indicating that the data of the first file and the data of the second file are both written successfully. Further, the acceleration device executes the process of writing the data of the third file in response to the first write request.

[0150] The write unit in the acceleration device determines the third storage node in the storage system for storing part of the data of the third file based on the load balancing strategy in the storage system (used to ensure that the loads of each storage node in the storage system are basically consistent) according to the identifier of the file sequence and the data of the third file.

[0151] In the embodiment of the present invention, the data of the third file is also redundantly stored in multiple storage nodes. The third storage node here is any one of the multiple storage nodes that store part of the data of the third file.

[0152] S1207: The acceleration device sends a third sub-write request to the third storage node, requesting to write data of the third file.

[0153] The third sub-write request includes data of a third file.

[0154] After determining the third storage node, the writing unit in the acceleration device calls the interaction unit to write data. Thereafter, the interaction unit communicates with the third storage node to write the data of the third file.

[0155] S1208, the third storage node communicates with other storage nodes, stores data of the third file, and sends a third response to the acceleration device, indicating that the data of the third file has been successfully written.

[0156] After receiving the third sub-write request, the third storage node determines other storage nodes for storing part of the data of the third file based on a load balancing strategy in the storage system, and communicates with the determined storage nodes to realize storage of the data of the third file.

[0157] After receiving the third sub-write request, the third storage node divides the data of the third file into N” data blocks, and calculates data in M” check blocks according to the data in the N” data blocks, and then the third storage node communicates with other storage nodes for storing part of the data of the third file to realize storage of the data of the third file.

[0158] After the data of the third file is successfully written, the third storage node sends a third response to the interaction unit in the acceleration device, indicating that the data of the third file has been successfully written.

[0159] S1209, after receiving the third response, the acceleration device sends a write success response to the client.

[0160] The acceleration device receives the third response, which indicates that the data of all files in the file sequence has been successfully written, so the acceleration device sends a write success response to the client, completing the process of writing the data of the file sequence.

[0161] Further optionally, after determining that the data of the first file, the data of the second file and the data of the third file are successfully written, the acceleration device can also recycle the data of the first file, the data of the second file and the data of the third file in the cache to improve the effective utilization rate of the cache.

[0162] As shown in FIG. 1, the file writing method provided by the embodiment of the application can further include: Figure 12

[0163] S1210, the acceleration device recycles the data of the first file, the data of the second file and the data of the third file in the cache.

[0164] Figure 13 Another flowchart of “first writing the data of the first file and the data of the second file in parallel, and then writing the data of the third file” is shown. Specifically, as shown in FIG. 1, the file writing method provided by the embodiment of the application includes the following steps. Figure 13

[0165] ​​S1300, in response to the write operation of the user, the client sends a first write request to the server, for requesting writing data of the first file and data of the second file in the file sequence.

[0166] The file sequence includes the first file, the second file and the third file, the first file, the second file and the third file are arranged in a preset order, and the third file is the last file in the file sequence.

[0167] In response to the write operation of the user, the client first sends a first write request to the server, for requesting writing data of the first file and data of the second file. The first write request includes an identifier of the file sequence, data of the first file and data of the second file.

[0168] S1301, the acceleration device in the server caches the data of the first file and the data of the second file.

[0169] Specifically, after receiving the data of the first file and the data of the second file, the write unit in the acceleration device communicates with the cache unit, and the cache unit caches the data of the first file and the data of the second file.

[0170] S1302, in response to the first write request, the acceleration device in the server determines the first storage node and the second storage node.

[0171] S1302 can refer to the description of S802 described above, and will not be repeated here.

[0172] S1303, the acceleration device sends a first sub-write request to the first storage node in parallel, and sends a second sub-write request to the second storage node.

[0173] S1303 can refer to the description of S803 described above, and will not be repeated here.

[0174] S1304, the first storage node communicates with other storage nodes, stores the data of the first file, and sends a first response to the acceleration device, for indicating that the data of the first file has been successfully written.

[0175] S1304 can refer to the description of S804 described above, and will not be repeated here.

[0176] S1305, the second storage node communicates with other storage nodes, stores the data of the second file, and sends a second response to the acceleration device, for indicating that the data of the second file has been successfully written.

[0177] S1305 can refer to the description of S805 described above, and will not be repeated here.

[0178] S1306 . During the execution of S1301 to S1303 , the client sends a second write request to the server, requesting to write data of the third file in the file sequence.

[0179] The second write request includes an identifier of the file sequence and data of the third file.

[0180] S1307: The acceleration device in the server caches data of the third file.

[0181] S1308. In response to the second write request, the acceleration device determines a third storage node.

[0182] The write unit in the acceleration device determines the third storage node in the storage system for storing part of the data of the third file based on the load balancing strategy in the storage system (used to ensure that the loads of each storage node in the storage system are basically consistent) according to the identifier of the file sequence and the data of the third file.

[0183] In the embodiment of the present invention, the data of the third file is also redundantly stored in multiple storage nodes. The third storage node here is any one of the multiple storage nodes that store part of the data of the third file.

[0184] S1309: The acceleration device sends a third sub-write request to the third storage node, requesting to write data of the third file.

[0185] The third sub-write request includes data of a third file.

[0186] After determining the third storage node, the writing unit in the acceleration device calls the interaction unit to write data. Thereafter, the interaction unit communicates with the third storage node to write the data of the third file.

[0187] S1310: The third storage node communicates with other storage nodes to store data of the third file, and sends a third response to the acceleration device to indicate that the data of the third file has been successfully written.

[0188] After receiving the third sub-write request, the third storage node determines other storage nodes for storing part of the data of the third file based on the load balancing strategy in the storage system, and communicates with the determined storage nodes to realize the storage of the data of the third file.

[0189] After receiving the third sub-write request, the third storage node divides the data of the third file into N” data blocks, and calculates the data in M” check blocks based on the data in the N” data blocks. Afterwards, the third storage node communicates with other storage nodes used to store part of the data of the third file to realize the storage of the data of the third file.

[0190] After the data of the third file is written successfully, the third storage node sends a third response to the interaction unit in the acceleration device, indicating that the data of the third file has been written successfully.

[0191] After receiving the first response, the second response and the third response, the acceleration device sends a write success response to the client.

[0192] After receiving the first response, the second response and the third response, the acceleration device sends a write success response to the client.

[0193] Further, after determining that the data of the first file, the data of the second file and the data of the third file are written successfully, the acceleration device can further recycle the data of the first file, the data of the second file and the data of the third file in the cache, so as to improve the effective utilization rate of the cache.

[0194] As shown in Figure 13 The file writing method provided by the embodiment of the application can further include:

[0195] S1312, the acceleration device recycles the data of the first file, the data of the second file and the data of the third file in the cache.

[0196] In summary, the acceleration device in the server communicates with the storage node in parallel, reads or writes the data of the file sequence, effectively reduces the interaction time of the multiple files in the file sequence between the client and the server, between the server and the storage system, and improves the reading and writing efficiency.

[0197] The above mainly introduces the scheme provided by the embodiment of the application from the method aspect. In order to realize the above functions, it contains the hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed in the present text, the application can be realized in the form of hardware or the combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraint conditions of the technical scheme. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.

[0198] The embodiment of the application further provides a device, which can be a server or a part of the device in the server, for example, a chip system in the server, and can be a storage node or a part of the device in the storage node, for example, a chip system in the storage node.

[0199] AsFigure 14 As shown in the figure, the device includes a processor 141, a memory 142, a communication interface 143, and a bus 144. The processor 141, the memory 142, and the communication interface 143 can be connected through the bus 144.

[0200] The processor 141 is a control center of the device, and can be a general central processing unit (CPU), or other general processor, etc. The general processor can be a microprocessor or any conventional processor, etc.

[0201] As an example, the processor 141 can include one or more CPUs, such as the CPU 0 and the CPU 1 shown in FIG. 1. Figure 14

[0202] The memory 142 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.

[0203] In one possible implementation, the memory 142 can exist independently of the processor 141, that is, the memory 142 can be a memory external to the processor 141. At this time, the memory 142 can be connected to the processor 141 through the bus 144, and used to store instructions or program codes. When the processor 141 invokes and executes the instructions or program codes stored in the memory 142, the file reading and writing method provided by the embodiments of the present application can be implemented.

[0204] In another possible implementation, the memory 142 can also be integrated with the processor 141, that is, the memory 142 can be an internal memory of the processor 141.

[0205] ​The communication interface 143 is configured to connect the device to other devices (e.g., clients) via a communication network, which can be an Ethernet network, a radio access network (RAN), a wireless local area network (WLAN), or the like. The communication interface 143 can include a receiving unit configured to receive data, and a transmitting unit configured to transmit data.

[0206] The bus 144 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 14 It should be noted that only one thick line is used in the figure to represent the bus, but it does not mean that there is only one bus or only one type of bus.

[0207] As an example, when the above-mentioned acceleration device is implemented by the device, the functions performed by the interaction unit can be implemented by the communication interface 143, the functions performed by the reading unit, the writing unit, and the cache recovery unit can be implemented by the processor 141 invoking the computer program stored in the memory 142, and the functions performed by the cache unit can be implemented by the memory 142.

[0208] It should be noted that the structure shown in the figure does not constitute a limitation on the device, except Figure 14 The device can include more or fewer components than shown in the figure, or combine certain components, or different component arrangements. Figure 14

[0209] Another embodiment of the present application also provides a computer readable storage medium, which stores instructions, and when the instructions are run on a computer, the computer performs the file reading method or the file writing method shown in the above-mentioned method embodiment.

[0210] In another embodiment of the present application, a computer program product is also provided, which includes computer instructions, and when the computer instructions are run on a computer, the computer performs the file reading method or the file writing method shown in the above-mentioned method embodiment.

[0211] ​In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments can be in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices.

[0212] The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data terminal such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, hard disk, magnetic tape), optical media (such as DVD) or semiconductor media (such as solid state disk (SSD)) and the like.

[0213] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0214] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented by other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can be another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual ones can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0215] The units described as separate components may or may not be physically separate, and the components displayed as units may be one physical unit or multiple physical units, that is, may be located in one place, or also may be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0216] In addition, each functional unit in various embodiments of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0217] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a readable storage medium. Based on such understanding, the technical scheme of the embodiments of the present application essentially or the part that contributes to the prior art or the whole or part of the technical scheme can be embodied in the form of a software product, which is stored in a storage medium and includes a plurality of instructions for making a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various program code storage media.

[0218] The above is only a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, any change or replacement within the technical scope disclosed in the embodiments of the present application should be covered in the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims

1. A file reading method characterized by, The file reading method is executed by an acceleration device, comprising: receiving a read request from a client, the read request being used to request reading data of a file sequence, the file sequence comprising a first file and a second file, the read request comprising sequence information, the sequence information being used to indicate an arrangement order of the first file and the second file; sending a first sub-read request to a first storage node and a second sub-read request to a second storage node, the first sub-read request and the second sub-read request being sent in parallel, the first sub-read request being used to request reading data of the first file, the second sub-read request being used to request reading data of the second file; the first storage node storing part of data of the first file, the second storage node storing part of data of the second file; receiving data of the first file sent by the first storage node and data of the second file sent by the second storage node; arranging the data of the first file and the data of the second file according to the sequence information to obtain data of the file sequence; sending the data of the file sequence to the client.

2. The file reading method according to claim 1, characterized by, The file reading method further comprises: caching the data of the first file and the data of the second file; correspondingly, after the sending of the data of the file sequence to the client, the file reading method further comprises: reclaiming the data of the first file and the data of the second file in the cache.

3. A file writing method characterized by, The file writing method is executed by an acceleration device, comprising: receiving a first write request from a client, the first write request being used to request writing data of a file in a file sequence, the file sequence comprising a first file and a second file; sending a first sub-write request to a first storage node and a second sub-write request to a second storage node, the first sub-write request and the second sub-write request being sent in parallel, the first sub-write request being used to request writing data of the first file, the second sub-write request being used to request writing data of the second file; the first storage node storing part of data of the first file, the second storage node storing part of data of the second file, the first write request comprising sequence information, the sequence information being used to indicate an arrangement order of the first file and the second file, the first file and the second file being arranged in a preset order.

4. The file writing method according to claim 3, characterized by, The file writing method further comprises: after determining that the data of the first file and the data of the second file have been written successfully, sending a write success response to the client.

5. The file writing method according to claim 3, characterized by, The file sequence further comprises a third file, the sequence information being further used to indicate an arrangement order of the first file, the second file and the third file, the third file being the last file in the file sequence; the file writing method further comprises: sending a third sub-write request to a third storage node, the third sub-write request being used to request writing data of the third file; after determining that the data of the first file, the data of the second file and the data of the third file have been written successfully, sending a write success response to the client.

6. The file writing method according to claim 3, characterized by, The file sequence further includes a third file, the first file, the second file and the third file are arranged in a preset order, and the third file is the last file in the file sequence; The file writing method further includes: receiving a second write request from the client, the second write request being used to request writing data of the third file; sending a third sub-write request to a third storage node, the third sub-write request being used to request writing data of the third file; after determining that the data of the first file, the data of the second file and the data of the third file have all been written successfully, sending a write success response to the client.

7. An acceleration device, characterized by comprising: a reading unit, configured to receive a read request from a client, the read request being used to request reading data of a file sequence, the file sequence including a first file and a second file, the read request including sequence information, the sequence information being used to indicate an arrangement order of the first file and the second file; an interaction unit, configured to send a first sub-read request to a first storage node and send a second sub-read request to a second storage node, the first sub-read request and the second sub-read request being sent in parallel, the first sub-read request being used to request reading data of the first file, and the second sub-read request being used to request reading data of the second file; the first storage node stores part of the data of the first file, and the second storage node stores part of the data of the second file; the interaction unit is further configured to receive the data of the first file sent by the first storage node and the data of the second file sent by the second storage node; the reading unit is specifically configured to arrange the data of the first file and the data of the second file according to the sequence information to obtain data of the file sequence, and send the data of the file sequence to the client.

8. The acceleration device of claim 7, wherein, The acceleration device further includes a cache unit and a cache recovery unit; the cache unit is configured to cache the data of the first file and the data of the second file received by the interaction unit; the cache recovery unit is configured to recover the data of the first file and the data of the second file in the cache after the reading unit sends the data of the file sequence to the client.

9. An acceleration device, characterized by comprising: a writing unit, configured to receive a first write request from a client, the first write request being used to request writing data of a file in a file sequence, the file sequence including a first file and a second file; an interaction unit, configured to send a first sub-write request to a first storage node and send a second sub-write request to a second storage node, the first sub-write request and the second sub-write request being sent in parallel, the first sub-write request being used to request writing data of the first file, and the second sub-write request being used to request writing data of the second file; The first storage node stores part of data of the first file, and the second storage node stores part of data of the second file. The first write request comprises sequence information, and the sequence information is used to indicate an arrangement sequence of the first file and the second file. The first file and the second file are arranged in a preset sequence.

10. The acceleration device of claim 9, wherein The interaction unit is further configured to determine that the data of the first file and the data of the second file have been successfully written. The write unit is further configured to send a write success response to the client after the interaction unit determines that the data of the first file and the data of the second file have been successfully written.

11. The acceleration device of claim 9, wherein, The file sequence further comprises a third file, and the sequence information is used to indicate an arrangement sequence of the first file, the second file and the third file. The third file is the last file in the file sequence. The write unit is further configured to send a third sub-write request to a third storage node. The third sub-write request is used to request to write data of the third file. The interaction unit is further configured to determine that the data of the first file, the data of the second file and the data of the third file have been successfully written. The write unit is further configured to send a write success response to the client after the interaction unit determines that the data of the first file, the data of the second file and the data of the third file have been successfully written.

12. The acceleration device of claim 9, wherein, The file sequence further comprises a third file. The first file, the second file and the third file are arranged in a preset sequence. The third file is the last file in the file sequence. The write unit is further configured to receive a second write request from a client. The second write request is used to request to write data of the third file. The interaction unit is further configured to send a third sub-write request to a third storage node. The third sub-write request is used to request to write data of the third file. The interaction unit is further configured to determine that the data of the first file, the data of the second file and the data of the third file have been successfully written. The write unit is further configured to send a write success response to the client after the interaction unit determines that the data of the first file, the data of the second file and the data of the third file have been successfully written.

13. An apparatus, comprising: comprising: one or more processors, and one or more memories; the one or more memories are coupled to the one or more processors, and the one or more memories store computer instructions; when the one or more processors execute the computer instructions, the device implements the file reading method of claim 1 or 2, or the file writing method of any one of claims 3-6.

14. A computer-readable storage medium, characterized in that, instructions, when the instructions are run on a computer, the computer implements the file reading method of claim 1 or 2, or the file writing method of any one of claims 3-6.

Citation Information

Patent Citations

  • Encryption copy organization method under distributed storage environment

    CN101808095A

  • Data redundancy processing method based on distributed storage system

    CN102857554A

  • Data reading and writing method and device, storage system and computer readable storage medium

    CN107577543A