The content of the invention
In view of this, it is more rational to realize this application provides a kind of collocation method and device and solid state disk
Configure the size of headspace in SSD.
To achieve the above object, the application provides following technical solution:A kind of collocation method, including:
Solid state disk receives operation information, and the solid state disk includes the first memory space and the second memory space;
When operation information meets preset condition, second memory space is configured based on the operation information;
Second memory space is used to optimize operation to the solid state disk.
Preferably, the operation information includes:The operational order that host issues;
The operation information meets preset condition, including:
The operational order instructs for default modification, and the modification instruction is used to indicate the solid state disk to described the
Two memory spaces are configured.
Preferably, the modification instruction includes the object space capacity of second memory space;
It is then described that second memory space is configured based on the operation information, including:
The spatial content of second memory space is configured to the object space capacity.
Preferably, the solid state disk receives operation information, including:
Solid state disk obtains the operation behavior information of user, wherein, the operation behavior information is to solid-state based on user
The operation note generation of hard disk;
Then, it is described when operation information meets preset condition, based on the operation information to second memory space into
Row configuration, including:
When the operation behavior information belongs to default behavior classification, based on the behavior belonging to the operation behavior information
Classification determines the allocation plan of second memory space;
Based on the allocation plan, the memory capacity of configuration second memory space.
Preferably, it is described second memory space is configured based on the operation information after, further include:
Obtain operation note of the user to the solid state disk;
Operation behavior information is generated based on the operation note;
If the operation behavior information belongs to default behavior classification, by the memory capacity of second memory space
It adjusts to the target memory capacity to match with the behavior classification.
Preferably, further include:
The configuration result of second memory space will be notified to host.
On the other hand, present invention also provides a kind of configuration device, applied to solid state disk, described device includes:
Information receiving unit, for receiving operation information, the solid state disk includes the first memory space and the second storage
Space, second memory space are used to optimize operation to the solid state disk;
Space configuration unit, for when operation information meets preset condition, based on the operation information to described second
Memory space is configured.
Preferably, described information receiving unit, including:
Information receiving subelement, for receiving operation information, the operation information includes:The operational order that host issues;
The space configuration unit, including:
First configuration subelement, for when the operational order for it is default modification instruction when, based on the operation information
Second memory space is configured, the modification instruction is used to indicate the solid state disk to second memory space
It is configured.
Preferably, the modification instruction includes the object space capacity of second memory space;
Then the first configuration subelement, including:
Capacity configuration subelement, for when the operational order instructs for default modification, described second being stored empty
Between spatial content be configured to the object space capacity.
Preferably, described information receiving unit, including:
Acquisition of information subelement, for obtaining the operation behavior information of user, wherein, the operation behavior information is to be based on
User generates the operation note of solid state disk;
Then, the space configuration unit, including:
Scheme subelement, for when the operation behavior information belongs to default behavior classification, being gone based on the operation
For the behavior classification belonging to information, the allocation plan of second memory space is determined;
Second configuration subelement, for being based on the allocation plan, configures the memory capacity of second memory space.
Preferably, further include:
Acquiring unit is recorded, it is empty to the described second storage for being based on the operation information in the described first configuration subelement
Between configured after, obtain operation note of the user to the solid state disk;
Behavior generation unit, for being based on the operation note generation operation behavior information;
Capacity adjustment unit, if belonging to default behavior classification for the operation behavior information, by described second
The memory capacity of memory space is adjusted to the target memory capacity to match with the behavior classification.
Preferably, further include:
As a result notification unit, for will notify the configuration result of second memory space to host.
On the other hand, present invention also provides a kind of solid state disk, including:
Controller, the first memory space and the second memory space, second memory space is for hard to the solid-state
Disk optimizes operation;
Wherein, the controller, for receiving operation information;When operation information meets preset condition, based on the behaviour
Make information to configure second memory space.
Preferably, the operation information that the controller receives includes:The operational order that host issues;
The operation information meets preset condition, including:
The operational order instructs for default modification, and the modification instruction is used to indicate the solid state disk to described the
Two memory spaces are configured.
Preferably, the controller reception operation information is specially:The controller obtains the operation behavior information of user,
Wherein, the operation behavior information is that the operation note of solid state disk is generated based on user;
Then, when operation information meets preset condition, the controller is based on the operation information and is stored to described second
Space is configured, and is specially:
When the operation behavior information belongs to default behavior classification, the controller is based on the operation behavior information
Affiliated behavior classification determines the allocation plan of second memory space;Based on the allocation plan, configuration described second is deposited
Store up the memory capacity in space.
Preferably, the controller is additionally operable to, and second memory space is being configured based on the operation information
Afterwards, operation note of the user to the solid state disk is obtained;Operation behavior information is generated based on the operation note;If institute
State operation behavior information and belong to default behavior classification, then by the memory capacity of second memory space adjust to the row
The target memory capacity to match for classification.
It can be seen via above technical scheme that if the operation information that solid state disk receives meets preset condition, base
Second memory space is configured in the operation information, it is achieved thereby that dynamic configuration second memory space, is conducive to
Rationally realize the size of the second memory space of rational configuration.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, the technical solution in the embodiment of the present application is carried out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of embodiments of the present application, instead of all the embodiments.It is based on
Embodiment in the application, those of ordinary skill in the art are obtained every other without making creative work
Embodiment shall fall in the protection scope of this application.
Referring to Fig. 1, it illustrates a kind of flow diagram of collocation method one embodiment of the application, the sides of the present embodiment
Method can be applied to solid-state hard disk SSD, and this method includes:
101, solid state disk receives operation information.
The solid state disk includes the first memory space and the second memory space.
Wherein, which is the operable memory space of user.
Second memory space is the memory space that can not be user-operably, which is used for described solid
State hard disk optimizes operation.Such as, the second memory space can be used for carrying out garbage reclamation, wear leveling and managing damage block
Wait optimizations operation.
102, when operation information meets preset condition, second memory space is configured based on the operation information.
Inventor has found that the size of second memory space is fixed in existing SSD, and can not be by
Adjustment in this way, if the second memory space sets too small, may influence whether optimization operation, and then corresponding depositing to SSD
Store up performance.However it is fixed in the total memory spaces of SSD, if the setting of the second memory space is excessive, user can make
Memory space will become smaller, so as to which corresponding user normally stores operation.That is, it configures anyway in SSD
The size of second memory space all can not reach balance between the performance of SSD and usable space.
On the basis of above research is found, inventor through further research, it has been found that, if according to actually required performance
Or the demand of the required memory space used, the size of the second memory space of dynamic configuration, then it can cause the second storage of configuration
Space meets current performance and storage demand, so as to solve the problems, such as it is existing can not equalization performance and free space.Cause
This, in the embodiment of the present application, when the operation information received meets preset condition, can match somebody with somebody the second memory space
It puts, to be conducive to the size of the second memory space of reasonable disposition.
In the embodiment of the present application, if the operation information that solid state disk receives meets preset condition, based on the operation
Information configures second memory space, it is achieved thereby that dynamic configuration second memory space, is conducive to rationally realize
The size of the second memory space of rational configuration.
Can such as may be used it should be noted that being configured based on operation information to second memory space there are many situation
To be the size for redefining the second memory space, and configure the capacity of second memory space;For another example or determine to adjust
Whole amount, the adjustment amount include the size for the memory space that the second memory space needs remove, for example, adjustment amount can be 2G, then
Need to reduce the second memory space on the basis of original memory space the memory capacity of 2G, so that the first memory space
Capacity increase the memory capacity of 2G on the basis of original memory space;Adjustment amount, which can also include the second memory space, to be needed
The size of increased memory space.
It should be noted that in the embodiment of the present application, the operation information that SSD is received can there are many, e.g., Ke Yishi
The information that the processor of host is handed down to the information of the SSD or SSD itself is monitored or generated.
The different situations of the SSD operation informations received are introduced below.
Referring to Fig. 2, it illustrates a kind of flow diagram of another embodiment of collocation method of the application, the present embodiment
Method applies equally to SSD, and this method can include:
201, the operational order that solid-state hard disk SSD receiving host issues.
202, when the operational order for it is default modification instruction when, then based on the operational order to second memory space into
Row configuration.
Wherein, modification instruction is used to indicate the solid state disk and second memory space is configured.
In the embodiment of the present application, host can issue the modification for being configured to second memory space to SSD
Instruction if SSD receives modification instruction, can trigger and its second memory space is configured.
Wherein, host issue opportunity of modification instruction equally can there are many may situation.
It is a kind of may in the case of, host on startup, can send modification instruction, so as to deposit for second to the SSD
Store up the corresponding space size of space configuration.
In the case of alternatively possible, host finds that the second memory space in the SSD is current during operation
Configuration capacity is not suitable for the data storage of host, then host can also send modification instruction.Such as, user sends instruction pair to host
The target instruction target word that the second memory space is modified in SSD, then host generation modification instruction, and the instruction is sent to SSD's
Controller so that SSD controller responds modification instruction, reconfigures the space size corresponding to second memory space.Again
Such as, in Host Detection SSD the second memory space be currently configured space size be not suitable for the current running environment of host, then to
SSD controller sends control instruction.
In the present embodiment, modification instruction is issued from host to SSD, SSD to be controlled to configure the second memory space,
To realize the second memory space of dynamic configuration, advantageously allow the second memory space and disclosure satisfy that user demand or meet host
Operation demand, so that the configuration of the second memory space is more reasonable.
Meanwhile user can also issue corresponding modification to SSD by host and refer to according to use habit in the present embodiment
Order so that the second memory space of configuration meets the use habit of user.
It is understood that the embodiment for changing instruction to control SSD the second memory spaces of configuration is issued to SSD in host
In, which instructs the amount to be adjusted of the second memory space of can including, the increased capability value of such as the second memory space needs or
The second memory space of person needs reduced capability value.
Optionally, the object space capacity of second memory space, the object space can be included in modification instruction
Capacity is the capacity that second memory space finally needs to configure.Then the second memory space is matched somebody with somebody to being based on modification instruction
Putting can include:The spatial content of second memory space is configured to object space capacity.For example, object space capacity is
10G, the then spatial content for needing to configure the second memory space are 10G.
Referring to Fig. 3, it illustrates a kind of flow diagram of another embodiment of collocation method of the application, the present embodiment
Method applies equally to SSD controller, and this method can include:
301, obtain the operation behavior information of user.
The operation behavior information is that the operation note of solid state disk is generated based on user.
Wherein, the operation behavior record of the user can be recorded and counted by the controller of SSD;It can also
It is according to previous data access situation by host, the operation behavior of generation records, and is handed down to the SSD's.
302, when the operation behavior information belongs to default behavior classification, based on the behavior belonging to the operation behavior information
Classification determines the allocation plan of second memory space.
It is understood that the operation behavior information of user can symbolize conditions of demand of the user to SSD, e.g., user
Operation behavior record can include the data that generate during the user operates each application of host, then use
The application of family operation is different, and user would also vary from the demand of the storage performance of SSD.For example, user opens game application
And during being operated, user is to the more demanding of performance;And if the application that user opens is document, user may
Requirement to performance is relatively low, but the optimization of SSD may be operated more demanding.
Wherein, the default behavior type can there are many, allocation plan corresponding to different behavior classifications is different.Example
Such as, behavior classification can be office behavior, game behavior, amusement behavior etc..Configuration side corresponding to different behavior types
Case can also be set as needed.For example, in the allocation plan of game behavior, the spatial content of the second memory space can be opposite
Dot, to ensure that the capacity of available first memory space of user is relatively large.
Critical data in operation behavior information can determine which class behavior classification is operation behavior information belong to, just
It can determine corresponding allocation plan.
303, based on the allocation plan, configure the memory capacity of second memory space.
In the present embodiment according to the operation behavior information of the user got, pass through the operation behavior information to user
Study, the demand of the performance of analysis user SSD, and dynamic adjusts the capacity of the second memory space in SSD, is conducive to reasonable disposition
Second memory space meets the operational requirements of user.
It is understood that in practical applications, host can be issued operational order to control SSD to second to SSD
The configuration of memory space combines with the operation behavior information based on user dynamically to adjust the configuration of the second memory space,
Both are integrated because of the second memory space of usually dynamic adjustment.
Fig. 4 is may refer to, it illustrates a kind of flow diagram of another embodiment of collocation method of the application, this implementations
The method of example can include:
401, solid-state hard disk SSD receives operation information.
Wherein, which includes:The operational order that the host issues.
402, when the operational order for it is default modification instruction when, then based on the operation information to second memory space into
Row configuration.
Wherein, modification instruction is used to indicate the solid state disk and second memory space is configured.
403, obtain operation note of the user to the solid state disk.
404, operation behavior information is generated based on the operation note.
In the present embodiment, after host is configured with the second memory space of SSD, SSD can obtain use in real time
The operation note at family to analyze the operation behavior information of user, so as to the use habit of subsequent analysis user, determines user couple
The demand of SSD performances.
405, if the operation behavior information belongs to default behavior classification, by the memory capacity of second memory space
Adjust the target memory capacity to match to behavior classification.
The step is similar to the associated description of front 302, and behavior classification and behavior class can specifically be set as needed
Not corresponding target memory capacity.
It is understood that in the embodiment of one collocation method of any of the above, match somebody with somebody to the second memory space
After putting, the configuration result of second memory space will can also be notified to host, so that host can be known in SSD
The configuring condition of one memory space and the second memory space.
Further, in any of the above one embodiment, after being configured to the second memory space, host is weighed
Qi Hou indicates capability values of the SSD based on the second memory space after reconfiguring, to optimize operation.
A kind of collocation method of corresponding the application, present invention also provides a kind of configuration devices.
Referring to Fig. 5, it illustrates a kind of structure diagram of configuration device one embodiment of the application, the dresses of the present embodiment
It puts and can be applied to solid state disk, described device includes:
Information receiving unit 501, for receiving operation information, the solid state disk is deposited including the first memory space and second
Space is stored up, second memory space is used to optimize operation to the solid state disk.;
Space configuration unit 502, for space when operation information meets preset condition, based on the operation information to institute
The second memory space is stated to be configured.
In the embodiment of the present application, if the operation information that solid state disk receives meets preset condition, based on the operation
Information configures second memory space, it is achieved thereby that dynamic configuration second memory space, is conducive to rationally realize
The size of the second memory space of rational configuration.
Referring to Fig. 6, it illustrates a kind of structure diagram of another embodiment of collocation method of the application, the present embodiment
Device and preceding embodiment the difference is that:
In the present embodiment, the information receiving unit 501, can include:
Information receiving subelement 5011, for receiving operation information, the operation information includes:The operation that host issues refers to
Order;
The space configuration unit 502, including:
First configuration subelement 5021, for when the operational order for it is default modification instruction when, based on the operation
Information configures second memory space, and the modification instruction is used to indicate the solid state disk and is stored to described second
Space is configured.
Further, in the present embodiment, the modification instruction includes the object space capacity of second memory space;
Then the first configuration subelement, can include:
Capacity configuration subelement, for when the operational order instructs for default modification, described second being stored empty
Between spatial content be configured to the object space capacity.
Optionally, in the present embodiment, which can also include:
Acquiring unit is recorded, it is empty to the described second storage for being based on the operation information in the described first configuration subelement
Between configured after, obtain operation note of the user to the solid state disk;
Behavior generation unit, for being based on the operation note generation operation behavior information;
Capacity adjustment unit, if belonging to default behavior classification for the operation behavior information, by described second
The memory capacity of memory space is adjusted to the target memory capacity to match with the behavior classification.
Referring to Fig. 7, it illustrates a kind of structure diagram of another embodiment of collocation method of the application, the present embodiment with
Preceding embodiment the difference is that:
The information receiving unit 501, can include:
Acquisition of information subelement 5012, for obtaining the operation behavior information of user, wherein, the operation behavior information is
The operation note of solid state disk is generated based on user;
Then, the space configuration unit 502, including:
Scheme subelement 5022, for when the operation behavior information belongs to default behavior classification, based on the behaviour
Make the behavior classification belonging to behavioural information, determine the allocation plan of second memory space;
Second configuration subelement 5023, for being based on the allocation plan, the storage for configuring second memory space is held
Amount.
Optionally, in the embodiment of one device of the application any of the above, which can also include:
As a result notification unit, for will notify the configuration result of second memory space to host.
On the other hand, present invention also provides a kind of solid state disks.
Referring to Fig. 8, it illustrates a kind of structure diagram of solid state disk one embodiment of the application, the present embodiment is consolidated
State hard disk 8 can include:
Controller 801, the first memory space 802 and the second memory space 803.
Wherein, second memory space 803 is used to optimize operation to the solid state disk;
Wherein, the controller 801 is used to receive operation information;When operation information meets preset condition, based on described
Operation information configures second memory space.
It should be noted that the first memory space and the second memory space are two independent memory spaces in fig. 8, but
It is the memory space that first memory space and the second memory space can be respectively same storage medium in practical applications
Two parts storage region.
In the present embodiment, if the operation information that the controller of solid state disk is determined to receive meets preset condition,
Then second memory space is configured based on the operation information, it is achieved thereby that dynamic configuration second memory space, has
Beneficial to the reasonable size for realizing the second memory space of rational configuration.
Optionally, the operation information that the controller receives is specially:The operational order that host issues;
The operation information meets preset condition, including:
The operational order instructs for default modification, and the modification instruction is used to indicate the solid state disk to described the
Two memory spaces are configured.
Optionally, the controller receives operation information, including:The controller obtains the operation behavior information of user,
Wherein, the operation behavior information is that the operation note of solid state disk is generated based on user;
Then, when operation information meets preset condition, the controller is based on the operation information and is stored to described second
Space is configured, and is specially:
When the operation behavior information belongs to default behavior classification, the controller is based on the operation behavior information
Affiliated behavior classification determines the allocation plan of second memory space;Based on the allocation plan, configuration described second is deposited
Store up the memory capacity in space.
Optionally, the controller is additionally operable to, and second memory space is being configured based on the operation information
Afterwards, operation note of the user to the solid state disk is obtained;Operation behavior information is generated based on the operation note;If institute
State operation behavior information and belong to default behavior classification, then by the memory capacity of second memory space adjust to the row
The target memory capacity to match for classification.
Optionally, the modification instruction includes the object space capacity of second memory space;
Then the controller configures specially second memory space based on the operation information:
The spatial content of second memory space is configured to the object space capacity.
Optionally, the solid state disk is additionally operable to:The configuration result of second memory space will be notified to host.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with other
The difference of embodiment, just to refer each other for identical similar portion between each embodiment.For device disclosed in embodiment
For, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related part is said referring to method part
It is bright.
The foregoing description of the disclosed embodiments enables professional and technical personnel in the field to realize or using the application.
A variety of modifications of these embodiments will be apparent for those skilled in the art, it is as defined herein
General Principle can in other embodiments be realized in the case where not departing from spirit herein or scope.Therefore, the application
The embodiments shown herein is not intended to be limited to, and is to fit to and the principles and novel features disclosed herein phase one
The most wide scope caused.