The content of the invention
To overcome problem present in correlation technique, the present invention provides a kind of data processing method and device.
First aspect according to embodiments of the present invention includes there is provided a kind of data processing method, methods described:
When needing to store data to be stored in shared storage device by target operating environment, obtain and the object run
The mark for the data type that environment is mutually bound;The mark of the data type of different running environment bindings is different;
The mark of the data to be stored and the data type is mutually bound;
By the data storage to be stored in the shared storage device.
Wherein, the mark by the data to be stored and the data type is mutually bound, including:
The mapping relations set up between the data to be stored and the mark of the data type, to realize the number to be stored
Mutually bound according to the mark with the data type.
Wherein, the mark by the data to be stored and the data type is mutually bound, including:
The mark of the data type is added in the data type field in the data to be stored.
Further, methods described also includes:
Before needing to obtain by the target operating environment by the target operating environment in the shared storage device
During the corresponding data of Data Identification to be obtained of storage, the mark for the data type mutually bound with the target operating environment is obtained;
The data corresponding with the Data Identification to be obtained are obtained in the shared storage device;
The data mutually bound with the mark of the data type are selected from the data of the acquisition.
Wherein, the mark for obtaining the data type mutually bound with the target operating environment, including:
Obtain the corresponding relation between the mark of running environment being locally stored and the mark of data type;
The mark of the data type corresponding with the target operating environment is searched in the corresponding relation.
Wherein, it is described to select the data mutually bound with the mark of the data type from the data of the acquisition, including:
For each data corresponding with the Data Identification to be obtained of acquisition, obtaining includes the mapping pass of the data
System;
The mark of data type is extracted in the mapping relations of the acquisition;
Judge the mark for identifying whether the data type mutually to be bound with the target operating environment of the data type extracted
Know;
When the mark for being designated the data type mutually bound with the target operating environment of the data type extracted,
The data that the data are defined as mutually binding with the mark of the data type.
Wherein, it is described to select the data mutually bound with the mark of the data type from the data of the acquisition, including:
For each data corresponding with the Data Identification to be obtained of acquisition, the data type field from the data
In extract the mark of data type;
Judge the mark for identifying whether the data type mutually to be bound with the target operating environment of the data type extracted
Know;
When the mark for being designated the data type mutually bound with the target operating environment of the data type extracted,
The data that the data are defined as mutually binding with the mark of the data type.
Second aspect according to embodiments of the present invention includes there is provided a kind of data processing equipment, described device:
First acquisition module, for when needing to store data to be stored in shared storage device by target operating environment,
Obtain the mark for the data type mutually bound with the target operating environment;The mark of the data type of different running environment bindings
Know different;
Binding module, for the mark of the data to be stored and the data type mutually to be bound;
Memory module, for by the data storage to be stored in the shared storage device.
Wherein, the binding module is specifically for setting up the mapping between the data to be stored and the mark of the data type
Relation, is mutually bound the mark of the data to be stored and the data type with realizing.
Wherein, the binding module by the data type specifically for identifying the data being added in the data to be stored
In type field.
Further, described device also includes:
First acquisition module is additionally operable to before needing to obtain by the target operating environment by the object run ring
During the corresponding data of Data Identification to be obtained that border is stored in the shared storage device, obtain and the target operating environment
The mark for the data type mutually bound;
Second acquisition module, for obtaining the data corresponding with the Data Identification to be obtained in the shared storage device;
Selecting module, for selecting the data mutually bound with the mark of the data type from the data of the acquisition.
Wherein, first acquisition module includes:
First acquisition unit, for obtaining the corresponding pass between the mark of running environment being locally stored and the mark of data type
System;
Searching unit, the mark for searching the data type corresponding with the target operating environment in the corresponding relation.
Wherein, the selecting module includes:
Second acquisition unit, the data corresponding with the Data Identification to be obtained for each for acquisition obtain bag
Include the mapping relations of the data;
First extraction unit, the mark for extracting data type in the mapping relations of the acquisition;
First judging unit, for judge the data type extracted identify whether as with the target operating environment phase
The mark of the data type of binding;
First determining unit, for being designated what is mutually bound with the target operating environment when the data type extracted
During the mark of data type, the data that the data are defined as mutually binding with the mark of the data type.
Wherein, the selecting module includes:
Second extraction unit, for each data corresponding with the Data Identification to be obtained for acquisition, from the number
The mark of data type is extracted in data type field in;
Second judging unit, for judge the data type extracted identify whether as with the target operating environment phase
The mark of the data type of binding;
Second determining unit, for being designated what is mutually bound with the target operating environment when the data type extracted
During the mark of data type, the data that the data are defined as mutually binding with the mark of the data type.
The technical scheme that embodiments of the invention are provided can include the following benefits:
In embodiments of the present invention, although multiple data marks may be stored in shared storage device by different running environment
The sensible same but different data of data content, but by the storage method of the embodiment of the present invention, due to different running environment
The data type of support is different, and the mark of different data types is also different, so, will be logical for any running environment
The mark for crossing data and the data type of running environment support that the running environment is stored in shared storage device is bound, right
It is same in other each running environment.
So, when after need to obtain by a certain running environment before stored by the running environment in shared storage device
Data when, it is necessary to be searched using the Data Identification of the data in shared storage device, due in shared storage device
Each data of storage have bound data type, therefore, in the corresponding data of all Data Identifications are found, meeting
The data of the mark for the data type for having bound running environment support are selected, and the data selected are the numbers for needing to obtain
According to.
That is, by the storage method of the embodiment of the present invention, when after need to obtain by a certain running environment before by this
Be not in the data that the data got are not required to obtain during the data that running environment is stored in shared storage device
Situation, namely be not in the situation that the data got are the data of mistake, the business after would not also influenceing normally is transported
OK.
Therefore, compared to prior art, the embodiment of the present invention need not be equipped with storage device for each running environment, so that
Hardware cost can be reduced by allowing.
It should be appreciated that the general description of the above and detailed description hereinafter are only exemplary and explanatory, it can not limit
The system present invention.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to accompanying drawing
When, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.In following exemplary embodiment
Described embodiment does not represent all embodiments consistent with the present invention.On the contrary, they are weighed with such as appended
The example of the consistent apparatus and method of some aspects be described in detail in sharp claim, the present invention.
Fig. 1 is a kind of flow chart of data processing method according to an exemplary embodiment, as shown in figure 1, this method
Comprise the following steps.
In step S101, when needing to store data to be stored in shared storage device by target operating environment, obtain
The mark for the data type mutually bound with target operating environment;
The mark of the data type of different running environment bindings is different.
There are at least two different running environment in the embodiment of the present invention simultaneously, for example exist simultaneously pre- issue test environment and
Environment etc. in true line.At least two different running environment is shared in a storage device, as step S101 simultaneously
Shared storage device, can be set by any one running environment at least two different running environment in shared storage
Standby middle data storage obtains data.
All data that some running environment is stored in shared storage device in by least two different running environment
In, the Data Identification of any two data is different from;Another operation ring in by least two different running environment
In all data that border is stored in shared storage device, the Data Identification of any two data is different from;However, sometimes
Wait there may be the Data Identifications of the data stored by some running environment in shared storage device with it is another by this
The Data Identification for the data that one running environment is stored in shared storage device is identical but data contents of the two data
Different situations.
So, when after need by some running environment obtain before set by a certain running environment in shared storage
During a data for standby middle storage, it is necessary to using the Data Identification of a data in shared storage device searching data,
The data that the data for being possible to find are stored before being by some running environment in shared storage device,
The data for being also possible to find be before by another running environment data storage in shared storage device.
If another running environment data storage in shared storage device, causes the number found during the data found
According to the data for being not required to obtain, namely the data found are the data of mistake, and the business after thus influenceing is normal
Operation.
However, it is found by the inventors that, in embodiments of the present invention, number is stored in shared storage device by a running environment
According to when can only store running environment support data type data, and the data type that different running environment is supported is different.
Therefore,, in advance can be by the mark of the running environment and the fortune for any running environment in order to solve the above problems
The data type of row Environmental Support is mutually bound, the data type for for example supporting the mark of the running environment with the running environment
The corresponding relation that mark composition one is recorded and stored between the mark for the running environment being locally stored and the mark of data type
In, mutually bound with the data type that the mark realized the running environment is supported with the running environment.For other each operations
Environment, equally performs aforesaid operations.
Therefore, this step is specifically as follows:Obtain between the mark of running environment being locally stored and the mark of data type
Corresponding relation;The mark of the data type corresponding with the mark of target operating environment is searched in the corresponding relation.
In step s 102, the mark of data to be stored and the data type is mutually bound;
Wherein, in an embodiment of the invention, the mapping that can be set up between data to be stored and the mark of the data type
Relation, is mutually bound the mark of data to be stored and the data type with realizing;
In another example of the invention, it is generally the case that multiple data fields, the plurality of data word can be included in a data
One of data field in section is data type field, and the mark of the data type of data storage is used in data type field
Know, therefore, in this step, the mark of data type can be added in the data type field in data to be stored.
In step s 103, by data storage to be stored in shared storage device.
In embodiments of the present invention, although multiple data marks may be stored in shared storage device by different running environment
The sensible same but different data of data content, but by the storage method of the embodiment of the present invention, due to different running environment
The data type of support is different, and the mark of different data types is also different, so, will be logical for any running environment
The mark for crossing data and the data type of running environment support that the running environment is stored in shared storage device is bound, right
It is same in other each running environment.
So, when after need to obtain by a certain running environment before stored by the running environment in shared storage device
Data when, it is necessary to be searched using the Data Identification of the data in shared storage device, due in shared storage device
Each data of storage have bound data type, therefore, in the corresponding data of all Data Identifications are found, meeting
The data of the mark for the data type for having bound running environment support are selected, and the data selected are the numbers for needing to obtain
According to.
That is, by the storage method of the embodiment of the present invention, when after need to obtain by a certain running environment before by this
Be not in the data that the data got are not required to obtain during the data that running environment is stored in shared storage device
Situation, namely be not in the situation that the data got are the data of mistake, the business after would not also influenceing normally is transported
OK.
Therefore, compared to prior art, the embodiment of the present invention need not be equipped with storage device for each running environment, so that
Hardware cost can be reduced by allowing.
Further, in an alternative embodiment of the invention, when storing number in shared storage device by target operating environment
After, if needing to obtain the data from shared storage device by target operating environment afterwards, Fig. 2 institutes can be passed through
The embodiment shown realizes that specifically, referring to Fig. 2, this method also includes:
In step s 201, before needing to obtain by target operating environment by target operating environment in shared storage device
During the corresponding data of the Data Identification to be obtained of middle storage, the mark for the data type mutually bound with target operating environment is obtained;
Wherein, in this step, between the mark of running environment and the mark of data type that can be locally stored for acquisition
Corresponding relation;Then the mark of the data type corresponding with target operating environment is searched in the corresponding relation.
In step S202, the data corresponding with Data Identification to be obtained are obtained in shared storage device;
In embodiments of the present invention, if storing data mark in shared storage device only by a running environment before
Know for the data of Data Identification to be obtained.So, in this step, will be got from shared equipment one with it is to be obtained
The corresponding data of Data Identification, and the data of the data got have bound the mark of a running environment.
If Data Identification is stored in shared storage device respectively for number to be obtained by multiple different running environment before
According to the data of mark, so, in this step, it will be got from shared equipment multiple relative with Data Identification to be obtained
The data answered, and each data got have bound the mark of a running environment, and appointing in the data got
The mark of the running environment of two data bindings of meaning is all different.
In step S203, the data mutually bound with the mark of the data type are selected from the data of acquisition.
In an embodiment of the invention, if in step s 102 " by the mark phase of data to be stored and the data type
Binding " specific implementation be:The mapping relations set up between data to be stored and the mark of the data type, to realize
The mark of data to be stored and the data type is mutually bound;Then this step can specifically be realized by following flow, including:
For first data in the data corresponding with Data Identification to be obtained of acquisition, obtaining includes first data
Mapping relations;The mark of data type is extracted in the mapping relations of acquisition;Judging the mark of the data type extracted is
It is no for the mark for the data type mutually bound with target operating environment;When being designated and object run for the data type extracted
During the mark for the data type that environment is mutually bound, the data that first data is defined as mutually binding with the mark of the data type,
Terminate flow.
When the mark of the data type extracted is not for the mark for the data type mutually bound with target operating environment, it is determined that should
Data are not the data mutually bound with the mark of the data type, and for the number corresponding with Data Identification to be obtained of acquisition
Second data in, equally perform aforesaid operations, if it is determined that it is the mark phase with the data type to go out second data
The data of binding, then terminate flow.
If it is determined that second data is not the data mutually bound with the mark of the data type, then obtained for acquisition with waiting
The 3rd data in the corresponding data of Data Identification are taken, aforesaid operations are equally performed, until in acquisition and number to be obtained
The data type mutually bound with target operating environment of being designated that data type is determined in corresponding data according to identifying
Untill the data of mark.
If the data type mark in each data in the data corresponding with Data Identification to be obtained of acquisition is not
For the mark for the data type mutually bound with target operating environment, it is determined that pass through mesh before being not present in shared storage device
The corresponding data of Data Identification to be obtained that mark running environment is stored in shared storage device.
In an alternative embodiment of the invention, if in step s 102 " by the mark phase of data to be stored and the data type
Binding " specific implementation be:The mark of the data type is added in the data type field in data to be stored;
Then this step can specifically be realized by following flow, including:
For first data in the data corresponding with Data Identification to be obtained of acquisition, the data from first data
The mark of data type is extracted in type field;Judge the data type extracted identify whether as with target operating environment
The mark for the data type mutually bound;When the data class mutually bound with target operating environment of being designated of the data type extracted
During the mark of type, the data that first data is defined as mutually binding with the mark of the data type terminate flow.
When the mark of the data type extracted is not for the mark for the data type mutually bound with target operating environment, it is determined that should
Data are not the data mutually bound with the mark of the data type, and for the number corresponding with Data Identification to be obtained of acquisition
Second data in, equally perform aforesaid operations, if it is determined that it is the mark phase with the data type to go out second data
The data of binding, then terminate flow.
If it is determined that second data is not the data mutually bound with the mark of the data type, then obtained for acquisition with waiting
The 3rd data in the corresponding data of Data Identification are taken, aforesaid operations are equally performed, until in acquisition and number to be obtained
The data type mutually bound with target operating environment of being designated that data type is determined in corresponding data according to identifying
Untill the data of mark.
If the data type mark in each data in the data corresponding with Data Identification to be obtained of acquisition is not
For the mark for the data type mutually bound with target operating environment, it is determined that pass through mesh before being not present in shared storage device
The corresponding data of Data Identification to be obtained that mark running environment is stored in shared storage device.
Fig. 3 is a kind of block diagram of data processing equipment according to an exemplary embodiment.Reference picture 3, the device includes:
First acquisition module 11, for when needing to store data to be stored in shared storage device by target operating environment,
Obtain the mark for the data type mutually bound with the target operating environment;The mark of the data type of different running environment bindings
Know different;
Binding module 12, for the mark of the data to be stored and the data type mutually to be bound;
Memory module 13, for by the data storage to be stored in the shared storage device.
Wherein, the binding module 12 is specifically for setting up reflecting between the data to be stored and the mark of the data type
Relation is penetrated, is mutually bound the mark of the data to be stored and the data type with realizing.
Wherein, the binding module 12 by the data type specifically for identifying the number being added in the data to be stored
According in type field.
Further, described device also includes:
First acquisition module 11 is additionally operable to before needing to obtain by the target operating environment by the object run
During the corresponding data of Data Identification to be obtained that environment is stored in the shared storage device, obtain and the object run ring
The mark for the data type that border is mutually bound;
Second acquisition module, for obtaining the data corresponding with the Data Identification to be obtained in the shared storage device;
Selecting module, for selecting the data mutually bound with the mark of the data type from the data of the acquisition.
Wherein, first acquisition module 11 includes:
First acquisition unit, for obtaining the corresponding pass between the mark of running environment being locally stored and the mark of data type
System;
Searching unit, the mark for searching the data type corresponding with the target operating environment in the corresponding relation.
Wherein, the selecting module includes:
Second acquisition unit, the data corresponding with the Data Identification to be obtained for each for acquisition obtain bag
Include the mapping relations of the data;
First extraction unit, the mark for extracting data type in the mapping relations of the acquisition;
First judging unit, for judge the data type extracted identify whether as with the target operating environment phase
The mark of the data type of binding;
First determining unit, for being designated what is mutually bound with the target operating environment when the data type extracted
During the mark of data type, the data that the data are defined as mutually binding with the mark of the data type.
Wherein, the selecting module includes:
Second extraction unit, for each data corresponding with the Data Identification to be obtained for acquisition, from the number
The mark of data type is extracted in data type field in;
Second judging unit, for judge the data type extracted identify whether as with the target operating environment phase
The mark of the data type of binding;
Second determining unit, for being designated what is mutually bound with the target operating environment when the data type extracted
During the mark of data type, the data that the data are defined as mutually binding with the mark of the data type.
The technical scheme that embodiments of the invention are provided can include the following benefits:
In embodiments of the present invention, although multiple data marks may be stored in shared storage device by different running environment
The sensible same but different data of data content, but by the storage method of the embodiment of the present invention, due to different running environment
The data type of support is different, and the mark of different data types is also different, so, will be logical for any running environment
The mark for crossing data and the data type of running environment support that the running environment is stored in shared storage device is bound, right
It is same in other each running environment.
So, when after need to obtain by a certain running environment before stored by the running environment in shared storage device
Data when, it is necessary to be searched using the Data Identification of the data in shared storage device, due in shared storage device
Each data of storage have bound data type, therefore, in the corresponding data of all Data Identifications are found, meeting
The data of the mark for the data type for having bound running environment support are selected, and the data selected are the numbers for needing to obtain
According to.
That is, by the storage method of the embodiment of the present invention, when after need to obtain by a certain running environment before by this
Be not in the data that the data got are not required to obtain during the data that running environment is stored in shared storage device
Situation, namely be not in the situation that the data got are the data of mistake, the business after would not also influenceing normally is transported
OK.
Therefore, compared to prior art, the embodiment of the present invention need not be equipped with storage device for each running environment, so that
Hardware cost can be reduced by allowing.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in the reality about this method
Apply in example and be described in detail, explanation will be not set forth in detail herein.
Those skilled in the art will readily occur to other realities of the present invention after considering specification and putting into practice invention disclosed herein
Apply scheme.The application be intended to the present invention any modification, purposes or adaptations, these modifications, purposes or
Adaptations follow the general principle of the present invention and including the undocumented common knowledge or used in the art of the present invention
Use technological means.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by appended right
It is required that pointing out.
It should be appreciated that the invention is not limited in the precision architecture for being described above and being shown in the drawings, and can
To carry out various modifications and changes without departing from the scope.The scope of the present invention is only limited by appended claim.