Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Embodiment one
Fig. 1 is a kind of method synoptic diagram of visiting solid state hard disc that the embodiment of the invention one provides, and as shown in Figure 1, this method comprises:
Step S101: identification needs the user ID of visit solid state hard disc, determines user's identity according to the user ID that identifies;
Step S102: according to the use region parameter that presets for described user, selected logic region resource for described user's use;
Step S103:, be identified for the physical region resource of user capture by using the corresponding relation between the physical region resource in logic region resource and the solid state hard disc.
Method according to present embodiment provides by the identification user identity, thereby can finally be identified for the interior physical region resource of solid state hard disc of this user capture according to the access region parameter that is provided with for the user.Thereby can specify concrete visit physical region in the solid state hard disc for the user, further, can guarantee, guarantee independence and security between the user capture to different user is provided with different access region.
Embodiment two
Fig. 2 is the method synoptic diagram of the solid state hard disc of visit shown in the embodiment of the invention two, and in the embodiment of the invention two, the method that will visit solid state hard disc with particular user is that example is described in detail.
As shown in Figure 2, the method for the visit solid state hard disc that provides of the embodiment of the invention comprises:
Step S201: identification user's user ID, according to the user ID that identifies, confirm user's identity;
Wherein, in the method that the embodiment of the invention provides, above-mentioned user ID is used to identify each user.When the user need visit solid state hard disc, at first need to confirm the identity of calling party, specifically can finish by identification user user ID separately.
Step S202: according to user's identity, find the use region parameter that presets for the user in advance, described use region parameter is included as the use resource information of the software view of user's setting;
In the present embodiment, be that different users presets use region parameter separately in advance, and each user can pass through the corresponding relation between its user identity foundation and the use region parameter, thereby just can find the use region parameter of this user's correspondence by user's identity.
The use region resource information of above-mentioned software view can be the use region resource information of user level, the use region resource information of this software view only to the user as seen, such as total total 30GB space, for the user has distributed the 1GB space of the 0x8000_0000 in the software area to 0xa000_000, this address realm is to see the region resource of having used from software view so, and the region resource of software view is applicable to the occasion of software or user management.Can obtain the use region resource of the software view of user's correspondence by the use region resource information of above-mentioned software view.
Need to prove, when presetting the use resource information of using the software view in the region parameter for the user, can set according to each user's application demand or user capture rank, can certainly set according to user's application demand and user capture rank simultaneously.
Step S203:, determine the use region resource of user's software view according to the use resource information of the software view in the user's who obtains among the step S202 the use region parameter;
Step S204:, the use region resource of the user's that determines among the step S203 software view is carried out conversion, selected user's use logic region resource by software view region resource and logic region resource mapping relation.
In the present embodiment, the physical region in the solid state hard disc of reality is handled by logical mappings, the visible logic region resource of corresponding one-tenth chip, in practice, the logic region resource is represented with the address in the logic usually.For example, customer requirements uses the resource of 1GB, among the address 0x8000a000-0xa0001000 and 0x70002000-0x7000b000 of resources allocation in logic of logic with the user.
The use region resource of software view changed to obtain above-mentioned logical resource address.The logic region resource is a notion that is between software view resource and two aspects of actual physical resources.
Step S205: by the corresponding relation between the physical region resource in logic region resource and the solid state hard disc, user's definite among the step S204 use logic region resource is carried out conversion, obtain being used for the physical region resource of user capture.
Above-mentioned physical region resource is meant the actual physical resources in the solid state hard disc, and for example block among certain layer in the some Flash storages in the solid state hard disc is the practical operation region resource that solid state hard disc inside is read and write.
Wherein, select user's use logic region resource among the step S204, in order finally to make the user specify actual solid state hard disc physical access position, also need to carry out the conversion between the physical region of selected logic region resource and actual solid state hard disc, by the mapping relations between the two, can realize above-mentioned conversion, be identified for the interior physical region resource of solid state hard disc of user capture.
The use region resource of above-mentioned software view and the mapping relations between the logic region resource can leave in the mode of mapping table in the solid state hard disc, also the management of above-mentioned address mapping relation can be placed on to be used for real-time processing in the logic chip.Be understandable that, those skilled in the art can know, the management of described address mapping relation is meant by handling rule (can state a formula in other words as) that address mapping relation defers to and realizes in the mode of algorithm, and directly be encapsulated in this algorithm in the chip, when needs carry out map addresses, then can handle in real time by this chip.In like manner, the mode that logic region resource and physical region resource mapping relation also can mapping table leaves in the solid state hard disc, or the management of above-mentioned address mapping relation is placed on is used for real-time processing in the logic chip.When among the step S204 in the present embodiment the use region resource of the software view of software view being carried out conversion and obtaining the logic region resource, can be by the above-mentioned mapping table that comprises the use region resource and the mapping relations between the logic region resource of software view; Similarly, when in step S205, the logic region resource being carried out conversion and obtaining the physical region resource, also can be by the mapping table that comprises logic region resource and physical region resource mapping relation.
Embodiment three
Present embodiment is corresponding to provide a kind of control device, this device to be used for control visit solid state hard disc, and as shown in Figure 3, this control device 300 comprises: user identity identification unit 301, the selected unit 302 of logic region resource and the first address mapping unit 303, wherein,
User identity identification unit 301 is used to discern the user ID that needs are visited the user of solid state hard disc, to confirm identity;
The logic region resource is selected unit 302, is used for the use region parameter that presets according to the user who confirms for described user identity identification unit 301, selected described user's use logic region resource;
The first address mapping unit 303 is used for according to the mapping relations between the physical region resource in described use logic region resource and the solid state hard disc, obtains being used for the interior physical region resource of solid state hard disc of user capture.
Above-mentioned use region parameter can be determined according to user's application demand and/or user capture rank.
Wherein, described use region parameter can be included as the use logic region resource information that the user presets.
In addition, the described region parameter of using can comprise: the use resource information of the software view that presets as the user.As shown in Figure 4, when described use region parameter was included as the use resource information of the software view that the user sets, the selected unit 302 of described logic region resource can comprise:
Software view region resource determining unit 3021, be used for after identity is confirmed in described user identity identification unit 301, according to the use resource information of the software view in the use region parameter that presets for described user, determine the use region resource of the software view corresponding with the user;
The second address mapping unit 3022, the software view region resource that is used for described user's correspondence of determining according to software view region resource determining unit 3021 concerns with the logic region resource mapping, obtains described user's use logic region resource.
Particularly, in the present embodiment, user identity identification unit 301 identification users' user ID according to the user ID that identifies, is confirmed user's identity; Then, software view region resource determining unit 3021 in the selected unit 302 of logic region resource is according to user identity, find the use region parameter of setting for the user in advance, be included as the use resource information of the software view of user's setting in this use region parameter, software view region resource determining unit 3021 is determined the use region resource of user's software view according to the use resource information of the software view of setting for the user then.
In the embodiment of the invention, be provided with corresponding use region parameter for different users in advance, each user can pass through the corresponding relation between its user identity foundation and the use region parameter, thereby just can find the use region parameter of this user's correspondence by user's identity.
The use region resource information of above-mentioned software view can be the use region resource information of user level, the use region resource information of visible this software view of user, such as total total 30GB space, for the user has distributed the 1GB space of the 0x8000_0000 in the software area to 0xa000_000, this address realm is to see the region resource of having used from software view so, and the region resource of software view is applicable to the occasion of software or user management.Can obtain the use region resource of the software view of user's correspondence by the use region resource information of above-mentioned software view.
Need to prove, when the use resource information of using the software view in the region parameter is set for the user, can set according to each user's application demand or user capture rank, can certainly set according to user's application demand and user capture rank simultaneously.
The second address mapping unit 3022 is according to software view region resource and logic region resource mapping relation, the use region resource of the user's that software view region resource determining unit 3021 is determined software view is carried out conversion, obtains user's logic region resource.
In the present embodiment, the physical region in the solid state hard disc of reality is handled by logical mappings, the visible logic region resource of corresponding one-tenth chip, in practice, the logic region resource is represented with the address in the logic usually.For example, customer requirements uses the resource of 1GB, among the address 0x8000a000-0xa0001000 and 0x70002000-0x7000b000 of resources allocation in logic of logic with the user.
The first address mapping unit 303 is according to mapping relations between the physical region resource in logic region resource and the solid state hard disc, the user's that the second address mapping unit 3022 is obtained logic region resource is carried out conversion, obtains being used for the physical region resource of user capture.
In the embodiment of the invention, the use region resource of above-mentioned software view and the mapping relations between the logic region resource can leave in the mode of mapping table in the second address change unit 3022, also the management of above-mentioned address mapping relation can be placed in the second address change unit 3022 to be used for real-time processing.Be understandable that, those skilled in the art can know, the management of described address mapping relation is meant by handling rule (can state a formula in other words as) that address mapping relation defers to and realizes in the mode of algorithm, and directly be encapsulated in this algorithm in the chip, when needs carry out map addresses, then can handle in real time by this chip.In like manner, the mode that logic region resource and physical region resource mapping relation also can mapping table leaves in the first address mapping unit 303, or the management of above-mentioned address mapping relation is placed in the first address mapping unit 303 is used for real-time processing.
Control device according to present embodiment provides by the identification user identity, thereby can finally be identified for the interior physical region resource of solid state hard disc of this user capture according to the access region parameter that presets.Can further, can guarantee for the user specifies concrete visit physical region in the solid state hard disc, guarantee independence and security between the user capture to different user is provided with different access region.
Embodiment four
The embodiment of the invention four provides a kind of solid state hard disc, as shown in Figure 5, this solid state hard disc 500 comprises control device 501, and this control device 501 can comprise: user identity identification unit 5011, the selected unit 5012 of logic region resource and the first address mapping unit 5013, wherein
User identity identification unit 5011 is used to discern the user ID that needs are visited the user of solid state hard disc, to confirm identity;
The logic region resource is selected unit 5012, is used for the use region parameter that presets according to the user who confirms for described user identity identification unit 5011, selected described user's use logic region resource;
The first address mapping unit 5013 is used for according to the mapping relations between the physical region resource in described use logic region resource and the solid state hard disc, obtains being used for the interior physical region resource of solid state hard disc of user capture.
Wherein, the selected unit 5012 of logic region resource can comprise:
Software view region resource determining unit 50121, be used for after identity is confirmed in described user identity identification unit 5011, according to the use resource information of the software view in the use region parameter that presets for described user, determine the use region resource of the software view corresponding with the user;
The second address mapping unit 50122, the software view region resource that is used for described user's correspondence of determining according to software view region resource determining unit 50121 concerns with the logic region resource mapping, obtains described user's use logic region resource.
The working method of each unit can be with reference to the corresponding description among the inventive method embodiment three in the present embodiment.
In the present embodiment, by the identification user identity, thereby can finally be identified for the interior physical region resource of solid state hard disc of this user capture according to the access region parameter that presets.Can further, can guarantee for the user specifies concrete visit physical region in the solid state hard disc, guarantee independence and security between the user capture to different user is provided with different access region.
Those of ordinary skills can recognize, the unit and the algorithm steps of each example of describing in conjunction with embodiment disclosed herein, can realize with electronic hardware, computer software or the combination of the two, for the interchangeability of hardware and software clearly is described, the composition and the step of each example described prevailingly according to function in the above description.These functions still are that software mode is carried out with hardware actually, depend on the application-specific and the design constraint of technical scheme.The professional and technical personnel can use distinct methods to realize described function to each specific should being used for, but this realization should not thought and exceeds scope of the present invention.
The method of describing in conjunction with embodiment disclosed herein or the step of algorithm can use the software module of hardware, processor execution, and perhaps the combination of the two is implemented.Software module can place the storage medium of any other form known in random access memory (RAM), internal memory, ROM (read-only memory) (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or the technical field.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.