A kind of data processing method, processing equipment and storage system
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of data processing method, processing equipment
And storage system.
Background technique
Existing hard disk is generally divided into mechanical hard disk (Hard Disk Drive, HDD) and solid state hard disk (Solid State
Drive, SSD), with the development of trend, more and more electronic equipments use SSD.Wherein, SSD generally uses memory
Flash carrys out storing data, during writing data into Flash, it is often necessary to carry out the merging of data.
Specifically, the data stored in Flash be as unit of Physical Page, carry out data merging when, the place of SSD
Reason device first calls the Flash controller of SSD, and Flash controller takes out the data of related pages in Flash, and is saved in processing
In the memory of device, then processor merges data to be combined with the data obtained from Flash, after the completion of merging, place
Reason device calls Flash controller again, and the data after merging are written in Flash by Flash controller.
It can be seen that processor needs repeatedly to call Flash controller, and is calling in the merging process of data
Cheng Zhong, it is still necessary to the intervention of processor, so that entire data merging process is tediously long.
Summary of the invention
In view of this, the present invention provides a kind of data processing method, processing equipment and storage systems, it is therefore intended that solve
The tediously long problem of existing data merging process.
To achieve the above object, the invention provides the following technical scheme:
A kind of data processing method, this method comprises:
When receiving the first data to be combined, the first chained list is established based on first data;Wherein, first chain
Table includes the first address field and the second address field, and second address field is that storage does not need to be counted by described first in memory
According to the reserved space of the second data of covering, second data are that participant is located at by the third data of first data cover
Data on same Physical Page;
First data are added in first address field;
The control command for being used to indicate first chained list is sent to storage control, so that the storage control base
Second data are taken out from the memory in the control command, and second data are added to second address
Then first chained list added with first data and second data is written to institute in the memory by Duan Zhong
It states in the Physical Page where third data.
It is optionally, described to establish the first chained list based on first data, specifically:
Attribute information relevant to first data is searched in preset map listing;Wherein, the attribute information
For characterizing the attribute of the data on the Physical Page;
The first address field and the second address field are determined based on the attribute information;
First identifier is added for first address field, the first identifier cannot be by for characterizing first address field
Covering;
Second identifier is added for second address field, the second identifier can be coated for characterizing second address field
Lid;
Wherein, first address field has the first data length, and first data length is first data
Size;Second address field has the second data length, and second data length is the size of second data.
It is optionally, described that first address field and the second address field are determined based on the attribute information, specifically:
First data length, second data length and first data are determined based on the attribute information
The positional relationship of length and second data length;
According to the positional relationship, divides the first address field corresponding with first data length and counted with described second
According to corresponding second address field of length.
Optionally, described that the control command for being used to indicate first chained list is sent to storage control, so that described
Storage control is based on the control command and takes out second data from the memory, and second data are added to
In second address field, first chained list added with first data and second data is then written to institute
It states in the Physical Page where third data described in memory, specifically:
The page number of the Physical Page comprising the third data is determined based on the map listing;
Determine the storage of linked list address for storing first chained list;
The control command for carrying the page number and the storage of linked list address is sent to the storage control, so that
Storage control searches Physical Page corresponding with the page number, and based on position indicated by the storage of linked list address, by institute
Second data on Physical Page are stated to be added in second address field with the second identifier.
Optionally, the first address field instruction has the first storage address of first data;
It is described that first data are added in first address field, specifically:
First data are obtained from first storage address;
First data are added in first address field.
A kind of data processing method, comprising:
The control command of the first chained list of instruction is received, first chained list includes the first address field and the second address field, institute
It states added with the first data to be combined in the first address field, second address field is not needed in memory for storage by institute
The reserved space of the second data of the first data cover is stated, second data are participant by the third of first data cover
Data are located at the data on same Physical Page;
Second data are taken out from the memory based on the control command;
Second data are added in second address field;
First chained list added with first data and second data is written to institute in the memory
It states in the Physical Page where third data.
Optionally, carried in the control command Physical Page of the third data the page number and the storage of linked list
Location;
Described second data are added in second address field include:
Search Physical Page corresponding with the page number;
Based on position indicated by the storage of linked list address, second data on the Physical Page are added to tool
Have in second address field of the second identifier.
A kind of processing equipment, comprising:
Receiver, for receiving the first data to be combined;
Processor when for receiving the first data to be combined, being established the first chained list based on first data and being incited somebody to action
First data are added in first address field;Wherein, first chained list includes the first address field and the second address
Section, second address field are that storage does not need to be left a blank by the pre- of the second data of first data cover in memory
Between, second data are that participant is located at the data on same Physical Page by the third data of first data cover;
Transmitter, for sending the control command for being used to indicate first chained list to storage control, so that described
Storage control is based on the control command and takes out second data from the memory, and second data are added to
In second address field, first chained list added with first data and second data is then written to institute
It states in the Physical Page where third data described in memory.
A kind of storage control, comprising:
Receiver, for receiving the control command of the first chained list of instruction, first chained list includes the first address field and the
Double-address section, the first data to be combined are added in first address field, and second address field is to be stored in memory
In do not need by the reserved space of the second data of first data cover, second data are that participant is counted by described first
The data being located on same Physical Page according to the third data of covering;
Processor, for taking out second data from the memory based on the control command, by described second
Data are added in second address field, and first chained list that will be added with first data and second data
It is written in the Physical Page where third data described in the memory.
A kind of storage system, comprising: hard disk handlers, storage control and memory;
Wherein, the hard disk handlers based on first data for being established when receiving the first data to be combined
First chained list, wherein first chained list includes the first address field and the second address field, and second address field is is stored in
It states and is not needed in memory by the reserved space of the second data of first data cover, second data are participant by institute
The third data for stating the first data cover are located at data on same Physical Page;And first data are added to described first
In address field;The control command for being used to indicate first chained list is sent to storage control again;
The storage control is used to receive the control command of the first chained list of instruction, is deposited based on the control command from described
Second data are taken out in reservoir, and second data are added in second address field and will be added with described first
First chained list of data and second data is written in the Physical Page where third data described in the memory.
Optionally, the hard disk handlers are used to establish the first chained list based on first data, specifically:
The hard disk handlers are used for, and attribute letter relevant to first data is searched in preset map listing
Breath;Wherein, the attribute information is used to characterize the attribute of the data on the Physical Page;First is determined based on the attribute information
Address field and the second address field;First identifier is added for first address field, the first identifier is for characterizing described first
Address field cannot be capped;Second identifier is added for second address field, the second identifier is for characterizing second ground
Location section can be capped;
Wherein, first address field has the first data length, and first data length is first data
Size;Second address field has the second data length, and second data length is the size of second data.
Optionally, the hard disk handlers are used to determine the first address field and the second address field based on the attribute information,
Specifically:
The hard disk handlers are used for, and determine first data length, second data based on the attribute information
The positional relationship of length and first data length and second data length;According to the positional relationship, divide with
Corresponding first address field of first data length and the second address field corresponding with second data length.
Optionally, the hard disk handlers are used to send the control life for being used to indicate first chained list to storage control
It enables, specifically:
The hard disk handlers are used for, and the page of the Physical Page comprising the third data is determined based on the map listing
Code;Determine the storage of linked list address for storing first chained list;The control of the page number and the storage of linked list address will be carried
Order is sent to the storage control.
Optionally, the storage control is used to for second data being added in second address field, specifically:
The storage control is used for, and the page number and the institute of the Physical Page of the third data are obtained from the control command
Storage of linked list address is stated, Physical Page corresponding with the page number is searched, it, will based on position indicated by the storage of linked list address
Second data on the Physical Page are added in second address field with the second identifier.
Optionally, the hard disk handlers are used to for first data being added in first address field, specifically:
The hard disk handlers are used for, and obtain first data from first storage address and by first data
It is added in first address field.
Technical solution described herein when processing equipment receives the first data to be combined, is built based on the first data
Vertical first chained list, the first chained list includes the first address field and the second address field, and the first data are added in the first address field,
Second address field is that storage is not needed in memory by the reserved space of the second data of the first data cover, the second data with
It can be located on same Physical Page by the third data of the first data cover.Processing equipment is used to indicate the to storage control transmission
The control command of one chained list, storage control are based on control command and take out the second data from memory, and the second data are added
Into the second address field, the first chained list added with the first data and the second data is then written to third data in memory
In the Physical Page at place.As it can be seen that the first data for needing to be written Physical Page are first added in the first chained list by processing equipment, and
The data retained are needed to reserve address field to be stored in Physical Page in first chained list, storage control is according in the first chained list
Address field to need the data retained to reserve is successively read data, and the data without reservation are then without reading, and therefore, leads to
The mode for filling data into the first chained list is crossed, can be realized the merging of data, in above-mentioned data handling procedure, processing equipment
A storage control need to be only called, also, during storage control carries out reading and writing data, processor is not necessarily to participate in,
In conclusion the process of data merging can be shortened.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is the schematic diagram of the application scenarios of the application;
Fig. 2 is the structural schematic diagram of storage system disclosed in the present application;
Fig. 3 is the flow chart for the process that storage system shown in Fig. 2 carries out data processing;
Fig. 4 is the flow chart that storage system shown in Fig. 2 carries out another data handling procedure;
Fig. 5 is the schematic diagram for the chained list that storage system carries out Data processing foundation;
Fig. 6 is a kind of structural schematic diagram of processing equipment disclosed in the embodiment of the present application;
Fig. 7 is a kind of structural schematic diagram of storage control disclosed in the embodiment of the present application.
Specific embodiment
The embodiment of the present application discloses a kind of data processing method, applies in (such as SSD) write-in number into storage system
According to scene in.For example, needing as shown in Figure 1, be stored with the second data and third data in a Physical Page in SSD
The first data (less than one Physical Page of the size of the first data) to be written into SSD.
As shown in Fig. 2, storage system includes memory, processing equipment and storage control.Reality disclosed herein
The purpose for applying example is, by the interaction between processing equipment and storage control, simplifies in the first data and Physical Page
The combined process of some data.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Fig. 3 show the process that storage system shown in Fig. 2 carries out data processing, comprising the following steps:
S301: processing equipment receives the first data to be combined.
S302: processing equipment is based on the first data and establishes the first chained list.
Wherein, the first chained list includes the first address field and the second address field.First address field is reserved for the first data
Memory space, indicates storage address of first data in the Physical Page that will be stored, the second address field be for the second data it is pre-
The memory space stayed indicates storage address of second data in the Physical Page that will be stored.And third data be then can be with
The data that first data merge, i.e., the data that can be capped in Physical Page, so, it is not necessarily to reserved storage space.
Specifically, which is the data that can be capped in existing data in Physical Page, can be by the first data
And the content of stored data relatively obtains in Physical Page.For example, by comparison, in Physical Page shown in Fig. 1, the
Three data are identical as the partial content of the first data, so, the first data can merge with third data, and the second data and the
The content of one data is different, so, belong to the data that cannot be capped.
S303: the first data are added in the first address field by processing equipment.
S304: processing equipment sends the control command for being used to indicate first chained list to storage control.
S305: storage control is based on control command and takes out the second data from memory.
Specifically, the first chained list of storage control access, address field of the acquisition without filling data, i.e. the second address field,
According to the second address field, the data in Physical Page in appropriate address, i.e. the second data are read.
S306: the second data are added in the second address field by storage control.
Because there is no the address field of third data in the first chained list, third data are not read.Therefore, from S305
With S306 as can be seen that storage control realizes third in the process for reading data from memory based on the first chained list
Data merge with the first data.
S307: the first chained list added with the first data and the second data is written to third in memory by storage control
In Physical Page where data.
It can be seen that processing equipment from process shown in Fig. 3 and to be stored the of storage control informed by the first chained list
The data that cannot be capped in the storage location and Physical Page of one data in Physical Page current storage location (and will
Position to be stored), therefore, storage control takes out the data filling that cannot be capped according to the first chained list from Physical Page
After into the first table, according to the first chained list into Physical Page storing data.As it can be seen that processing equipment only needs to call primary storage
Controller, also, during the read-write of storage control, processing equipment is not necessarily to participate in, so, it was stored with existing data
Journey is compared, and control process is shortened.
Fig. 4 is another data processing method disclosed in the present application, compared with process shown in Fig. 3, it is preferred that emphasis is explanation
The establishment process of first chained list.Method shown in Fig. 4 the following steps are included:
S401: processing equipment receives the first data to be combined.
S402: processing equipment searches attribute information relevant to the first data in preset map listing.
Wherein, attribute information is used to characterize the attribute of the data on the Physical Page, by taking Physical Page shown in FIG. 1 as an example,
Attribute information is used to characterize the attribute of the second data and the attribute of third data.Because the first data will store this Physical Page
In, so, the attribute of the second data and third data is related to the first data.
S403: processing equipment determines the first address field and the second address field based on attribute information.
Specifically, processing equipment can determine the first data length i.e. size of the first data, second based on attribute information
The data length i.e. size of the second data and the positional relationship of the first data length and the second data length, and according to position
Relationship divides and corresponding first address field of the first data length and the second address field corresponding with the second data length.
For example, attribute information can be with content information, by comparing the interior of the first data, the second data and third data
Hold, determines that stored third data can merge with the first data in Physical Page, the second data need to retain, and will need to protect
The memory space for the data stayed is as the second address field.Also, according to the length of the first data and length and the position of the second data
Relationship is set, the first address field and the second address field are divided.
S404: processing equipment is that the first address field adds first identifier (such as mask=1), for the second address field addition the
Two marks (such as mask=0).
Wherein, first identifier cannot be capped for characterizing the first address field, and second identifier is for characterizing the second address field
It can be capped.It should be noted that " covering " here refers to whether can be capped in the first chained list, because of the first address field
Need to fill the first data, so the data cover that cannot be taken out from Physical Page.
S405: the first data are added in the first address field by processing equipment, form the first chained list, wherein the first chained list
In include the first address field, the second address field filled with the first data, each address field, which has, to be indicated whether to be capped
Mark.
Specifically, the first address field instruction has the first storage address of the first data, and processing equipment is from the first storage address
It obtains the first data and the first data is added in the first address field.
S406: established first chained list is issued storage control by control command by processing equipment.
S407: storage control is based on control command and takes out the second data from memory, and the second data are added to
In second address field.
Specifically, in control command carry Physical Page the page number and storage of linked list address, storage control search with it is described
The corresponding Physical Page of the page number, and based on position indicated by storage of linked list address, the second data on Physical Page are added to tool
Have in the second address field of second identifier.
S408: the first data and the second data are written to the Physical Page in memory according to the first chained list by storage control
In.
Specifically, storage control is according to the first data in the first chained list and the corresponding address field of the second data, by first
Data and the second data are respectively written into the appropriate address in the corresponding Physical Page of the page number.
As shown in figure 5, processing equipment first establishes chained list shown in Fig. 5, wherein data_pointer indicates pointer, data
Length indicates that the length of address field, the length of the address field (indicating in Fig. 5 with oblique line) of data to be combined are 0.5KB,
Mask indicates mark, the mask=1 of the address field of data to be combined, the mask=0 of the address field of other data.Then it generates
Nand Flash reading and writing instruction, storage control first reads data (being not drawn into Fig. 5), and inserts in chained list (' mask=1 ')
Address field can be skipped), to complete the merging of data, then the data after merging are write back into Nand Flash.
Data processing method described in the present embodiment only once interacts between processing equipment and storage control, also,
Processing equipment is without participating in data merging process, thus it is possible to shorten process flow.
Fig. 6 show the structure of processing equipment shown in Fig. 2, Fig. 3 or Fig. 4, specifically includes receiver, processor and hair
Send device.
Wherein, receiver is for receiving the first data to be combined.
Processor when for receiving the first data to be combined, being established the first chained list based on first data and being incited somebody to action
First data are added in first address field;Wherein, first chained list includes the first address field and the second address
Section, second address field are that storage does not need to be left a blank by the pre- of the second data of first data cover in memory
Between, second data are that participant is located at the data on same Physical Page by the third data of first data cover.
Transmitter is used to send the control command for being used to indicate first chained list to storage control, so that described deposit
Storage controller is based on the control command and takes out second data from the memory, and second data are added to institute
It states in the second address field, is then written to first chained list added with first data and second data described
In Physical Page where third data described in memory.
Fig. 7 show the structure of storage control shown in Fig. 2, Fig. 3 or Fig. 4, specifically includes receiver and processor.
Wherein, receiver is used to receive the control command of the first chained list of instruction, and first chained list includes the first address field
With the second address field, the first data to be combined are added in first address field, second address field is to be stored in
It is not needed in reservoir by the reserved space of the second data of first data cover, second data are participant by described the
The third data of one data cover are located at the data on same Physical Page.
Processor is used to take out second data from the memory based on the control command, by second number
It is write according to being added in second address field, and by first chained list added with first data and second data
Enter into the Physical Page where third data described in the memory.
Processing equipment, storage control shown in Fig. 7 and memory shown in fig. 6 constitute storage system shown in Fig. 2,
The process of data merging can be simplified, to improve the efficiency of data storage.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with other
The difference of embodiment, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
For, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is said referring to method part
It is bright.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention.
Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention
It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one
The widest scope of cause.