CN104516888B - The permission querying method and device of multidimensional data - Google Patents

The permission querying method and device of multidimensional data Download PDF

Info

Publication number
CN104516888B
CN104516888B CN201310452309.XA CN201310452309A CN104516888B CN 104516888 B CN104516888 B CN 104516888B CN 201310452309 A CN201310452309 A CN 201310452309A CN 104516888 B CN104516888 B CN 104516888B
Authority
CN
China
Prior art keywords
data
information
permission
updated
bit map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310452309.XA
Other languages
Chinese (zh)
Other versions
CN104516888A (en
Inventor
周小会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201310452309.XA priority Critical patent/CN104516888B/en
Publication of CN104516888A publication Critical patent/CN104516888A/en
Application granted granted Critical
Publication of CN104516888B publication Critical patent/CN104516888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2264Multidimensional index structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • G06F16/24565Triggers; Constraints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The invention discloses the permission querying methods and device of a kind of multidimensional data, belong to field of computer technology.Method includes: the multidimensional data for obtaining permission to be checked;The type bit map of multidimensional data is obtained according to the data type information of every dimension data;The type bit map in permission index data obtained according to the type bit map of multidimensional data and in advance determines the sub-portfolio type bit map of multidimensional data, and the corresponding permission index information of sub-portfolio type bit map is inquired in permission index data;Corresponding authority information is inquired from the permissions data obtained in advance according to the corresponding permission index information of sub-portfolio type bit map, and the permission of multidimensional data is determined according to the authority information inquired.The present invention realizes the permission inquiry of multidimensional data by introducing type bit map and permission index information mechanism, and entire query process is made to improve permission search efficiency compared to by the way of Hash table search access right without complicated functional operation.

Description

The permission querying method and device of multidimensional data
Technical field
The present invention relates to field of computer technology, in particular to the permission querying method and device of a kind of multidimensional data.
Background technique
With the arriving of information age, social networks product is more and more welcomed by the people, passes through these social networks Network product release information, can allow things concerned by people more and more extensive.However, passing through the social activity where social networks product In the information of platform publication, some such as pornography, waste advertisements, rumour, fishing website link negative informations are inevitably understood.For The environment of maintenance social networks, it is necessary to permission control is carried out to data such as IP address, the instant messaging numbers of release information, To reduce the publication of negative information.Wherein, IP address or instant messaging number are single-dimensional data, in addition to carrying out to single-dimensional data Permission control is outer, and the multidimensional data formed to multiple single-dimensional datas such as IP address, instant messaging number is usually also needed to weigh Limit control.Before carrying out permission control to multidimensional data, need first to inquire the corresponding permission of the multidimensional data.
Currently, providing a kind of permission querying method of multidimensional data in the prior art, this method is before inquiry, in advance Different dimensions data and corresponding authority information are stored using Hash table.In storage, corresponded to for the setting of different dimensions data Key(key) value, and the corresponding Key value of each dimension data is converted into an integer by a fixed hash function Then word obtains the subscript of an array according to the integer number, different dimensions data and corresponding authority information is stored in With in the lower target array space.After storing different dimensions data and corresponding authority information using Hash table, equally need The multidimensional data that search access right is treated by Hash table carries out permission inquiry.When specific inquiry, reusing hash function will The corresponding Key value of the multidimensional data of permission to be checked is converted to corresponding array index, and is navigated to pair by the array index The array space answered, to obtain corresponding authority information.
In the implementation of the present invention, the inventor finds that the existing technology has at least the following problems:
Due to by Hash table inquire multidimensional data permission when need to carry out a large amount of Hash operation, cause permission to be inquired Process it is comparatively laborious, especially when the dimensional comparison of the multidimensional data of permission to be checked is more, not only query process is more numerous Trivial, the time that query process expends is also longer.Therefore, the permission inquiry mode for the multidimensional data that the prior art provides, inquiry effect Rate is lower.
Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of permission querying method of multidimensional data and Device.The technical solution is as follows:
On the one hand, a kind of permission querying method of multidimensional data is provided, which comprises
The multidimensional data of permission to be checked is obtained, every dimension data includes at least corresponding data type information, data length Information and data content information;
The type bit map of the multidimensional data is obtained according to the data type information of every dimension data;
The type bit in permission index data obtained according to the type bit map of the multidimensional data and in advance Figure determines the sub-portfolio type bit map of the multidimensional data, and the sub-portfolio class is inquired in the permission index data The corresponding permission index information of type bit map;
It is looked into from the permissions data obtained in advance according to the corresponding permission index information of the sub-portfolio type bit map Corresponding authority information is ask, and determines the permission of the multidimensional data according to the authority information inquired.
On the other hand, a kind of permission inquiry unit of multidimensional data is provided, described device includes:
First obtains module, and for obtaining the multidimensional data of permission to be checked, every dimension data includes at least corresponding data Type information, data length information and data content information;
Second obtains module, for obtaining the type bit of the multidimensional data according to the data type information of every dimension data Bitmap;
First determining module, the permission index number for obtaining according to the type bit map of the multidimensional data and in advance Type bit map in determines the sub-portfolio type bit map of the multidimensional data;
First enquiry module, it is corresponding for inquiring the sub-portfolio type bit map in the permission index data Permission index information;
Second enquiry module, for being obtained according to the corresponding permission index information of the sub-portfolio type bit map from advance Corresponding authority information is inquired in the permissions data taken;
Second determining module, for determining the permission of the multidimensional data according to the authority information inquired.
Technical solution provided in an embodiment of the present invention has the benefit that
The permission inquiry of multidimensional data is realized by introducing type bit map and permission index information mechanism, makes entirely to look into Inquiry process is compared by the way of Hash table search access right without complicated functional operation, provided in an embodiment of the present invention Technical solution improves the permission search efficiency of multidimensional data.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the permission querying method flow chart for the multidimensional data that the embodiment of the present invention one provides;
Fig. 2 is the permission querying method flow chart of multidimensional data provided by Embodiment 2 of the present invention;
Fig. 3 is the structural schematic diagram of the permission inquiry unit for the multidimensional data that the embodiment of the present invention three provides;
Fig. 4 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Embodiment one
The embodiment of the invention provides a kind of permission querying methods of multidimensional data, referring to Fig. 1, side provided in this embodiment Method process includes:
101: obtaining the multidimensional data of permission to be checked, every dimension data includes at least corresponding data type information, data Length information and data content information;
102: the type bit map of multidimensional data is obtained according to the data type information of every dimension data;
103: the type bit in permission index data obtained according to the type bit map of multidimensional data and in advance Scheme the sub-portfolio type bit map of determining multidimensional data, and inquires sub-portfolio type bit map pair in permission index data The permission index information answered;
104: being looked into from the permissions data obtained in advance according to the corresponding permission index information of sub-portfolio type bit map Corresponding authority information is ask, and determines the permission of multidimensional data according to the authority information inquired.
Method provided in this embodiment realizes multidimensional data by introducing type bit map and permission index information mechanism Permission inquiry, make entire query process without complicated functional operation, thus compared to by the way of Hash table search access right, Improve the permission search efficiency of multidimensional data.
Embodiment two
In order to improve the permission search efficiency of multidimensional data, in conjunction with the content of above-described embodiment one, the embodiment of the present invention is mentioned A kind of permission querying method of multidimensional data is supplied, referring to fig. 2, method flow provided in this embodiment includes:
201: collecting each dimension data and corresponding authority information of limited authority, and sequentially store each dimension of limited authority Degree evidence and corresponding authority information, obtain permissions data;
For the step, the purpose of each dimension data and corresponding authority information of collecting limited authority is to inquire Before the permission of multidimensional data, permissions data is obtained, to inquire the corresponding permission of multidimensional data by the permissions data.Its In, each dimension data of limited authority can be any dimension such as one-dimensional data, 2-D data, three-dimensional data of limited authority Data, and each dimension data of the limited authority can be any data of limited authority, the including but not limited to IP of limited authority The data such as address, Instant Messenger signal, zone position information.Each dimension data of limited authority can also correspond to any permission letter Breath, including but not limited to receive and dispatch limited authority information, answer limited authority information etc., the present embodiment is not to limited authority Specific dimension, particular content and the corresponding authority information of each dimension data be defined.
When collecting each dimension data of limited authority, including but not limited to according to the historical record of the data of any dimension To collect the data of any dimension with corresponding restricted rights.In addition to this it is possible to which the data for providing limited authority are set Option is set, the data for the limited authority that user is arranged by the option are collected.It is, of course, also possible to have other collection modes, this reality Example is applied not to be defined specific collection mode.
In order to make it easy to understand, now in conjunction with specific example to each dimension data and corresponding authority information for collecting limited authority Process illustrated in detail.
For example, carrying out analysis using upper user data according to some instant messaging show that instant messaging number is The user of 36089***** has issued the message of a plurality of spread rumors in the instant messaging application platform, in order to safeguard network rings Instant messaging number 36089***** can be determined as the data of limited authority, and the instant messaging number is arranged by border The corresponding authority information of 36089***** is to forbid sending message, later by the corresponding power of instant messaging number 36089***** Limit information is recorded in the corresponding historical record of instant messaging number.When collecting each dimension data of limited authority, can obtain The corresponding historical record of each instant messaging number is taken, determines whether each instant messaging number is limited according to historical record, then immediately Data of the communication number 36089***** as the limited authority arrived by history collection.
No matter the data of limited authority are collected into using which kind of mode, it is provided in this embodiment for the ease of subsequent lookup Method stores each dimension data and corresponding authority information of limited authority by the way of sequentially storing, to obtain permission number According to.Wherein, what is sequentially obtained after storage is ordered into array, and each array element inside subordinate ordered array is arranged in sequence Column, can both arrange according to ascending sequence, can also be according to being ordered from large to small, and the present embodiment is not to specific Put in order and be defined.Further, method provided in this embodiment is by each dimension data for the limited authority being collected into And corresponding authority information is when sequentially storing, and for the ease of searching, every number of the method provided in this embodiment also directed to storage Group is added to corresponding length information.In order to make it easy to understand, sequentially store limited authority each dimension data and corresponding permission Information, obtained permissions data can be as shown in Table 1 below.
Table 1
Buffer_Length TLV_Buffer Limits
Buffer_Length(0) TLV_Buffer(0) Limits(0)
Buffer_Length(1) TLV_Buffer(1) Limits(1)
Buffer_Length(2) TLV_Buffer(2) Limits(2)
…… …… ……
Wherein, Buffer_Length, TLV_Buffer and Limits be as an array element in subordinate ordered array, Buffer_Length is for identifying the data length stored in the array element, and TLV_Buffer is for storing limited authority Data, Limits are used to store the corresponding authority information of data of limited authority, use TLV(Type in TLV_Buffer Length Value, Type Length numerical value) format storage limited authority data.T field is type definition, specify the permission by Which kind of type is the data of limit correspond to, and for the ease of subsequent inquiry, which is indicated using binary bits bitmap.L word The length of the data of Duan Dingyi limited authority can also be indicated with binary bits bitmap.V field definition limited authority The specific value of data still can also be indicated with binary bits bitmap.
For example, still using the specific value of the data of limited authority as instant messaging number 36089*****, corresponding type Be 6, and the corresponding bit map of the type be 0110 for, then the corresponding T field of the data of the limited authority be 0110.And by Unified in the length of instant messaging number, then L can be regular length, since the length of instant messaging number 36089***** is 10, then L can be indicated with the binary bits bitmap of 4 bits, and be 1010.About the specific value of V, due to The binary bits bitmap of available 4 bits of each of instant messaging number is indicated, then V can use 40 bits Position is indicated, i.e., V value can be expressed as 0011011000010001001********************.Therefore, the permission Limited data are expressed as content with TLV format:
011010100011011000010001001********************
Further, in practical application, the corresponding bit map of T field of the data of each limited authority be can be in advance It is arranged.When it is implemented, several data types can be pre-defined, and it is corresponding that every kind of data type predetermined is arranged Bit map.Before determining the corresponding bit map of T field of the data of each limited authority, each limited authority is first determined Data which kind of data type predetermined corresponded to, using the corresponding bit map of correspondence data type predetermined as should The corresponding binary bits bitmap of the T field of the data of limited authority.The corresponding ratio of every kind of data type predetermined is set The mode of special bitmap includes but is not limited to following four kinds:
The first set-up mode: the number of species of data type predetermined are determined, and this is indicated with binary numeral Number of species, then determine the occupied number of bits of the binary numeral, the occupied number of bits of the binary numeral is made For the first number of bits that the corresponding bit map of every kind of data type predetermined occupies, every kind of data class predetermined Type is indicated with the binary numeral of the first number of bits, obtains the corresponding bit map of every kind of data type.
For example, pre-defining 4 kinds of data types, the number of species of data type are the corresponding binary system of 4,4 this numerical value Numerical value is 100, and the number of bits occupied is 3, therefore, in advance using the occupied number of bits of the binary numeral as every kind The first number of bits that the corresponding bit map of the data type of definition occupies, that is to say, that the first number of bits is 3, i.e., often Kind data type predetermined can be indicated with the binary numeral of 3 bits, to obtain corresponding bit Figure.Then the corresponding bit map of 4 kinds of data types predetermined is as shown in Table 2 below:
Table 2
Data type Bit map
1st kind of data type 001
2nd kind of data type 010
3rd kind of data type 011
4th kind of data type 100
Second of set-up mode: using the number of species of data type predetermined as every kind of data class predetermined The second number of bits that the corresponding bit map of type occupies, the corresponding bit of every kind of data type predetermined, every kind Data type predetermined value on other bits is different from the value on its corresponding bit come indicate every kind in advance The corresponding bit map of the data type of definition.
Still for having preset 4 kinds of data types, then the corresponding bit map of every kind of data type predetermined The second number of bits occupied is 4, and 4 kinds of data types predetermined respectively correspond to a bit in 4 bits, with Value on the corresponding bit of every kind of data type predetermined is 1, the value on other bits be 0 come indicate every kind in advance For the corresponding bit map of the data type of definition, then the corresponding bit map of 4 kinds of data types predetermined can be as follows Shown in face table 3:
Table 3
Data type Bit map
1st kind of data type 0001
2nd kind of data type 0010
3rd kind of data type 0100
4th kind of data type 1000
With the value on the corresponding bit of every kind of data type predetermined for 0, the value on other bits is 1 to carry out table For showing the corresponding bit map of every kind of data type predetermined, then the corresponding bit of 4 kinds of data types predetermined Bitmap can be as shown in Table 4 below:
Table 4
Data type Bit map
1st kind of data type 1110
2nd kind of data type 1101
3rd kind of data type 1011
4th kind of data type 0111
The third set-up mode: the numerical value after subtracting one for the number of species of data type predetermined is pre- as every kind The third number of bits that the corresponding bit map of the data type first defined occupies, the 1st kind of data type predetermined are corresponding Type bit map all bits on value it is identical, the corresponding bit of other every kind data type predetermined Position, other every kind data type predetermined carry out table with the value that the value on its corresponding bit is different from other bits Show the corresponding bit map of other every kind data type predetermined.
Still for having preset 4 kinds of data types, then the corresponding bit map of every kind of data type predetermined The second number of bits occupied is 3, on all bits of the corresponding type bit map of the 1st kind of data type predetermined Value it is identical, remaining the 2nd to the 4th kind of data type predetermined respectively correspond to 3 bits in a bit, then with Value on all bits of the corresponding type bit map of 1st kind of data type predetermined is for 0, then 4 kinds it is pre- The corresponding bit map of the data type first defined can be as shown in Table 5 below:
Table 5
Data type Bit map
1st kind of data type 000
2nd kind of data type 001
3rd kind of data type 010
4th kind of data type 100
Alternatively, equal with the value on all bits of the corresponding type bit map of the 1st kind of data type predetermined For 1, then the corresponding bit map of 4 kinds of data types predetermined can be as shown in Table 6 below:
Table 6
Data type Bit map
1st kind of data type 111
2nd kind of data type 001
3rd kind of data type 010
4th kind of data type 100
It should be noted that above-mentioned table 5 bit corresponding with the 2nd kind in table 6 to the 4th kind data type predetermined Figure is in addition to by taking the value on the corresponding bit of each data type predetermined is 1 as an example, each data class predetermined Value on the corresponding bit of type can also be 0, be not specifically limited to this present embodiment, guarantee every kind of data predetermined Type corresponds to different bit maps.
4th kind of set-up mode: the numerical value after subtracting one for the number of species of data type predetermined is pre- as every kind The third number of bits that the corresponding bit map of the data type first defined occupies, a kind of last data type pair predetermined Value on all bits for the type bit map answered is identical, the corresponding bit of other every kind data type predetermined Position, other every kind data type predetermined carry out table with the value that the value on its corresponding bit is different from other bits Show the corresponding bit map of other every kind data type predetermined.
Still for having preset 4 kinds of data types, then the corresponding bit map of every kind of data type predetermined The second number of bits occupied is 3, on all bits of the corresponding type bit map of the 4th kind of data type predetermined Value it is identical, the corresponding bit of the 1st kind to the 3rd kind data type predetermined, then with the 4th kind of data predetermined Value on all bits of the corresponding type bit map of type is for 0, then 4 kinds of data types predetermined are corresponding Bit map can be as shown in Table 7 below:
Table 7
Data type Bit map
1st kind of data type 001
2nd kind of data type 010
3rd kind of data type 100
4th kind of data type 000
Alternatively, equal with the value on all bits of the corresponding type bit map of the 4th kind of data type predetermined For 1, then the corresponding bit map of 4 kinds of data types predetermined can be as shown in Table 8 below:
Table 8
Data type Bit map
1st kind of data type 001
2nd kind of data type 010
3rd kind of data type 100
4th kind of data type 000
It should be noted that above-mentioned table 7 bit corresponding with the 1st kind in table 8 to the 3rd kind data type predetermined Figure is in addition to by taking the value on the corresponding bit of each data type predetermined is 1 as an example, each data class predetermined Value on the corresponding bit of type can also be 0, be not specifically limited to this present embodiment, guarantee every kind of data predetermined Type corresponds to different bit maps.
No matter using it is above-mentioned which kind of the corresponding bit map of data type predetermined is set by the way of, it is each determining When the T field of the data of limited authority, the corresponding type of the data of the limited authority can be first determined, determining type can at this time Think one-dimensional or multidimensional, if it is determined that the corresponding type of the data of limited authority is one-dimensional, then from the preparatory fixed of above-mentioned setting It is directly inquired in the corresponding bit map of data type of justice.If it is determined that the corresponding type of the data of limited authority is more Dimension, then can inquire every in multidimensional type respectively from the corresponding bit map of data type predetermined of above-mentioned setting The corresponding bit map of type is tieed up, then the bit map inquired is attached, obtains the T field of the data of limited authority. Wherein, when merging, for any one of the above set-up mode, the corresponding bit map of multiple types can directly be carried out Connection.For example, the corresponding bit map of the two types for inquiring the data of limited authority is respectively 010 and 100, then the permission The T field of limited data is 010100.
Optionally, for above-mentioned second of set-up mode, in addition to the corresponding bit map of multiple types directly can be carried out Outside the mode of connection, if in above-mentioned second of set-up mode on the corresponding bit of every kind of data type predetermined Value is 1, and the value on other bits is 0 to indicate the corresponding bit map of every kind of data type predetermined, then is inquiring To after the corresponding bit map of each type of the data of limited authority, the bit map inquired can be subjected to union, T field of the obtained operation result as the data of limited authority.Wherein, 1 corresponding authority of each of the operation result is limited One of data type.For example, the data of limited authority include the 1st kind of data type and the 3rd kind of data type, inquire The 1st kind of corresponding bit map of data type be 0001, the 3rd kind of corresponding bit map of data type is 0100, then will After 0001 and 0100 carries out union, obtained operation result is 0101, due to 1 corresponding 1st bit in the operation result Position and the 3rd bit, then it represents that the type of the data of the limited authority includes the 1st kind of data type and the 3rd kind of data type, with The practical type for including of the data of the limited authority is identical.
Optionally, if in above-mentioned second of set-up mode on the corresponding bit of every kind of data type predetermined Value be 0, the value on other bits is 1 to indicate the corresponding bit map of every kind of data type predetermined, then is looking into After the corresponding bit map of each type for asking the data of limited authority, the bit map inquired can be carried out and be transported It calculates, T field of the obtained operation result as the data of limited authority.Wherein, 0 corresponding authority of each of the operation result by One of data of limit type.For example, the data of limited authority include the 1st kind of data type and the 3rd kind of data type, inquiry The 1st kind of corresponding bit map of data type arrived is 1110, and the 3rd kind of corresponding bit map of data type is 1011, then will 1110 and 1011 carry out with the operation result after operation, obtained being 1010, due to 0 corresponding 1st bit in the operation result Position and the 3rd bit, then it represents that the type of the data of the limited authority includes the 1st kind of data type and the 3rd kind of data type, with The practical type for including of the data of the limited authority is identical.
Outside the method for determination of the T field for the data for having introduced limited authority, for the ease of searching, in subordinate ordered array The data of Buffer_Length, TLV_Buffer also can be used binary system and are indicated.For example, Buffer_Length can be adopted With 200 bits, then the length of TLV_Buffer is also 200 bits.Due to the Limits each limited authorities of expression The corresponding authority information of data, and the authority information can there are many, including but not limited to send the permission of message, reception disappears The permission of breath, the permission for adding good friend etc..And since the data of a limited authority can also correspond to multiple authority informations, because This, is managed authority information for the ease of subsequent, the data in Limits can equally be used binary bits bitmap It is indicated, specific representation includes but is not limited to two kinds.For example, Limits corresponds to 6 bits, each bit is corresponding One permission, specific value can be replaced with 0 and 1, if the numerical value of which bit is 1, it is corresponding to represent the bit Limited authority.For example, TLV_Buffer(1) in data do not send the permission of message, and the permission for sending message exists Third bit is corresponded in Limits, then numerical value of the data in Limits on third bit is 1.
It should be understood that the length of the data of the limited authority stored in TLV_Buffer can according to need and be set Fixed, the length of the TLV_Buffer in each array element can be the same or different, the data stored in TLV_Buffer Length also can be the same or different.Since the data of limited authority are using TLV format, but the data of each scene Dimension and type difference, cause the TLV_Buffer in each array element elongated, more troublesome for the processing of elongated data, If when subsequent lookup needs to calculate the current length of each array element directly with the storage of elongated data, lead to inquiry Complexity increases.For this purpose, improving inquiry velocity in order to simplify subsequent query process, being used in method provided in this embodiment The TLV_Buffer of fixed length.That is, the length of the TLV_Buffer in each array element is fixed length, but every number The length of the data of the limited authority of TLV_Buffer storage in group element can be the same or different.For example, every number The length of TLV_Buffer in group element is 100 bits, TLV_Buffer(1) in store is instant messaging number, deposit Store up occupied 86 bits in space;TLV_Buffer(2 what is stored in) is IP address, occupied 96 bits of memory space. It can be seen that although the length of the TLV_Buffer in each array element is 100 bits, the TLV_ in each array element The length of the data of Buffer storage can be Length discrepancy.
202: obtaining the corresponding type bit map of each dimension data of limited authority, and the limited each dimension that defines the competence The corresponding permission index information of data, each dimension of each dimension data of limited authority corresponding permission index information and limited authority Degree is corresponding according to the storage region in permissions data;
Wherein, by above-mentioned steps it is found that the available TLV format of the data of each limited authority is stored, and T, L and V Field can be indicated using binary bit again, i.e. the corresponding type bit map of each dimension data of limited authority For a string 0 and 1 code.The data that each limited authority has then been stored in the permissions data of above-mentioned steps building are corresponding Type bit map, then the step, can be direct in the corresponding type bit map of each dimension data for obtaining limited authority It is inquired from the permissions data obtained in above-mentioned steps 201.
Further, it is determined that when the corresponding permission index information of each dimension data of limited authority, the permission index information For identifying storage location of each dimension data of limited authority in permissions data, the start index information including storage location With end index information, then the corresponding permission index information of each dimension data of the limited authority can be each dimension of limited authority Degree is according to the corresponding address of storage region in permissions data, therefore, the corresponding permission rope of each dimension data of limited authority Fuse breath is corresponding with storage region of each dimension data of limited authority in permissions data.For example, if permissions data obtains It is stored in memory after taking, then the start index information in the corresponding permission index information of each dimension data of the limited authority can Think the initial memory address of each dimension data of limited authority in memory, the corresponding power of each dimension data of the limited authority Limiting the end index information in index information can be the end storage address of each dimension data of limited authority in memory.
203: sequentially storing the corresponding type bit map of each dimension data and permission index information of limited authority, obtain Permission index data;
For the step, the corresponding type bit map of each dimension data and permission index letter of limited authority are sequentially stored After breath, obtained permission index data can be stored with the mode of structural body.And for the ease of subsequent lookup, permission rope Argument other than the corresponding type bit map of each dimension data of storage limited authority and permission index information, may be used also in Number information is indexed with storage, to accelerate subsequent search speed.Wherein, permission index data is stored in a manner of structural body When, the first character section of structural body can be used to record current existing index number information, and field later is with the side of array Formula is used to store the corresponding type bit map of each dimension data and permission index information of limited authority.
The structure of permission index data in order to facilitate understanding is such as with the structure of permission index data in conjunction with above content For shown in the following table 9:
Table 9
In table 9, wUsedNum is current existing index number information in permission index data, has recorded permission index The number of the permission index information stored in data.DwTypeBitMap (m) represents the corresponding class of data of m-th of limited authority Type bit map.DwStartIndex (m) is that the starting in the permission index information of the data of m-th of limited authority indexes letter Breath.DwEndIndex (m) is the end index information in the permission index information of the data of m-th of limited authority.Wherein, m is Positive integer.
The position wUsedNum is the first field of permission index data, dwTypeBitMap (0), dwStartIndex (0) and (0) position dwEndIndex be permission index data the second field, dwTypeBitMap (1), DwStartIndex (1) and (1) position dwEndIndex are the third field of permission index data, dwTypeBitMap (2), dwStartIndex (2) and (2) position dwEndIndex are the 4th field of permission index data, and so on. Other fields in addition to the first field store permission index information and type bit map with array mode.Each array is deposited A type bit map and corresponding permission index information are stored up.It is right with type bit map in first array for 00001 For the permission index information answered is initial address 0 and end address 9, then it represents that the multidimensional number that type bit map is 00001 It is array element a [0]~a [9] according to the storage location in permissions data.Certainly, permission index information can also use other Format can also otherwise indicate storage location of the multidimensional data in permissions data, such as utilize the side of memory address Formula directly expresses the position that multidimensional data is stored in memory, specific as initial address is 0x00000F41, terminates ground Location is 0x00001FFF.In actual operation, it can be indexed according to storage mode authorization decision of the multidimensional data in permissions data The content of information, the present embodiment are not especially limited this.
It further, can be according to actual needs when using storage of array permission index information and type bit map Space is dynamically distributed, and is stored with the array without cavity, can so be made in array there is no empty element, when storage can Save segment space.
It should be noted that permission index data can also be stored using other way, a class can be such as constructed, Such specific object is a permission index data, and the present embodiment does not make specific limit to the storage mode of permission index data It is fixed.
It should be noted that in addition, the process of above-mentioned acquisition permission index data and permissions data is not to hold every time It will be executed when row method provided in this embodiment, that is to say, that when using above-mentioned steps 201 to step 203 acquisition permission rope After argument evidence and permissions data, if executing method provided in this embodiment again, the power that directly application has obtained only is needed Limit index data and permissions data.
204: obtaining the multidimensional data of permission to be checked, every dimension data includes at least corresponding data type information, data Length information and data content information;
Specifically, the present embodiment is not defined the mode for the multidimensional data for obtaining permission to be checked, equally not to obtaining The dimension of the multidimensional data for the permission to be checked got is defined.In concrete application, when user does an operation by terminal It afterwards, can be by collecting the multidimensional data of the relevant acquisition of information of operation permission to be checked.
For example, if user sends an information by instant messaging application program, it can be by the user in the Instant Messenger IP address of Instant Messenger signal and user's used terminal registered under news application program etc. is as the power to be checked got The multidimensional data of limit.Every dimension data in the multidimensional data of the permission to be checked has corresponding data type information, number According to length information and data content information.Instant Messenger signal with user's registration is 36980*****, and Instant Messenger signal is corresponding Data type is that the 1st kind of data type, IP address 111.123.123.123, and the corresponding data type of IP address are the 2nd kind Data type, the corresponding type bit map of the 1st kind of data type are 001, the corresponding type bit map of the 2nd kind of data type It is 010, then the multidimensional data of the permission to be checked is two-dimensional data, in multidimensional data of the 36980***** as permission to be checked The first dimension data, using 111.123.123.123 as the second dimension data for, the first dimension data and the second dimension data are distinguished It is converted into binary system, then the binary numeral after the conversion of the first dimension data is 00110110100110000000********************, the binary numeral after the conversion of the second dimension data are 000100010001.000100100011.000100100011.000100100011, then the corresponding data class of the first dimension data Type information is 001, and data length information is 40, and to be represented in binary as 101000, data content information is 00110110100110000000********************.The corresponding data type information of second dimension data is 010, number It is 110011 according to length information, data content information is 000100010001.000100100011.000100100011.000100100011。
205: the type bit map of multidimensional data is obtained according to the data type information of every dimension data;
Specifically, the step is in the type bit map for obtaining multidimensional data according to the data type information of every dimension data When, since the data type information of every dimension data can be indicated with the corresponding type bit map of every dimension data, then multidimensional The corresponding type bit map of every dimension data can be attached to obtain by the type bit map of data.
Wherein, if the data type information of every dimension data in the step corresponds to the first set-up mode in step 201, Then the data type information of every dimension data is directly attached.For example, the multidimensional data of permission to be checked is two dimensions According to respectively corresponding Instant Messenger signal and IP address, the corresponding data type information of Instant Messenger signal is 010, and IP address is corresponding Data type information is 100, then the type bit of the two-dimensional data got according to the data type information of every dimension data Figure is 010100.
Optionally, if the data type information of every dimension data in the step corresponds to second of setting side in step 201 Formula, the type bit map in addition to multidimensional data can be obtained by the way that the data type information of every dimension data to be directly attached Mode outside, if with the corresponding ratio of every kind of data type predetermined in second of set-up mode in above-mentioned steps 201 Value on special position is 1, and the value on other bits is 0 data type information to indicate every dimension data, then the step can will be more The data type information of every dimension data in dimension data carries out union, to obtain the type bit map of multidimensional data.Its In, a kind of corresponding data type of each of operation result 1.Optionally, if second of setting side in above-mentioned steps 201 With the value on the corresponding bit of every kind of data type predetermined for 0 in formula, the value on other bits is 1 to indicate every The data type information of dimension data, then can by the data type information of every dimension data in multidimensional data carry out and operation, thus Obtain the type bit map of multidimensional data.Wherein, the corresponding a kind of data type of each of operation result 0.
In order to make it easy to understand, with the value on the corresponding bit of every kind of data type predetermined for 1, other bits On value be 0 set-up mode be illustrated.For example, the multidimensional data of permission to be checked is two-dimensional data, respectively correspond Instant Messenger signal and IP address, the corresponding data type information of Instant Messenger signal are 001, the corresponding data type information of IP address It is 010, then when obtaining the type bit map of two-dimensional data according to the data type information of every dimension data, 001 and 010 is carried out Union, obtained operation result are the type bit map that 011,011 is the two-dimensional data.Due to the class of the two-dimensional data Corresponding 1st bit in the 1 of type bit map and the 2nd bit, then it represents that the data type of the multidimensional data includes the 1st kind of data Type and the 2nd kind of data type, the data type for including practical with the multidimensional data of permission to be checked are identical.
206: the type bit in permission index data obtained according to the type bit map of multidimensional data and in advance Scheme the sub-portfolio type bit map of determining multidimensional data, and inquires sub-portfolio type bit map pair in permission index data The permission index information answered;
Specifically, the type bit in permission index data obtained according to the type bit map of multidimensional data and in advance Bitmap can determine the sub-portfolio type bit map of multidimensional data, in the sub-portfolio type bit map for determining multidimensional data Afterwards, the corresponding permission index information of sub-portfolio type bit map can further be inquired.
Wherein, the type bit in permission index data obtained according to the type bit map of multidimensional data and in advance Scheme to determine that the sub-portfolio type bit map of multidimensional data can be carried out according to the following two kinds mode:
The first method of determination: by be worth for 1 bit correspond to a kind of data type for, by the type ratio of multidimensional data The type bit map stored in special bitmap and permission index data successively carries out and operation, if operation result and permission index number It is identical according to any kind bit map of middle storage, then using the type bit map as the sub-portfolio type bit of multidimensional data Bitmap.
For example, by taking the type bit map of multidimensional data is 00011 as an example, and first stored in permission index data Type bit map is 00010, and second type bit map is 01001, and so on.By the type bit of multidimensional data Figure is successively done with the type bit map stored in permission index data and operation, and 00011 does with 00010 and is with operation result 00010, the operation result is identical as first type bit map 00010, then illustrates store in permission index data first A type bit map 00010 is the sub-portfolio type bit map of multidimensional data.
Second of method of determination: by be worth for 0 bit correspond to a kind of data type for, by the type ratio of multidimensional data The type bit map stored in special bitmap and permission index data successively carries out union, if operation result and permission index number It is identical according to any kind bit map of middle storage, then using the type bit map as the sub-portfolio type bit of multidimensional data Bitmap.
For example, by taking the type bit map of multidimensional data is 11100 as an example, and first stored in permission index data Type bit map is 11101, and second type bit map is 10110, and so on.By the type bit of multidimensional data Figure successively does union with the type bit map stored in permission index data, and 11100 do with 11101 and are with operation result 11101, the operation result is identical as first type bit map 11101, then illustrates store in permission index data first A type bit map 11101 is the sub-portfolio type bit map of multidimensional data.
Certainly, the type bit in the permission index data obtained according to the type bit map of multidimensional data and in advance Bitmap determines that the mode of the sub-portfolio type bit map of multidimensional data in addition to above two method of determination, can also use other Method of determination, the present embodiment are not especially limited this.
It should be noted that during specific implementation, a type bit map in the index data that defines the competence is After the sub-portfolio type bit map of multidimensional data type bit map, the sub-portfolio class can be inquired in permission index data The corresponding permission index information of type bit map, and further inquiry is done into permissions data according to permission index information, without With all sub-portfolio type bit maps of the determining multidimensional data.
207: being looked into from the permissions data obtained in advance according to the corresponding permission index information of sub-portfolio type bit map Corresponding authority information is ask, and determines the permission of multidimensional data according to the authority information inquired;
Specifically, after the sub-portfolio type bit map that multidimensional data is determined in above-mentioned steps, according to determining subgroup Close the data that multidimensional data is split into sub-portfolio type by the data type in type bit map.According to sub-portfolio type bit The data storage location of limited authority in bitmap corresponding permission index information positioning permissions data, in permissions data permission by The data of limited authority identical with the data of sub-portfolio type after fractionation are searched within the scope of the data storage location of limit.If The data that limited authority identical with the data of sub-portfolio type after fractionation is found in permissions data, then inquire this and find Limited authority the corresponding authority information of data, and determine according to the authority information inquired the permission of multidimensional data.If The data for not finding limited authority identical with the data of sub-portfolio type after fractionation in permissions data, then execute step again Rapid 206 and step 207, with the type ratio in the permission index data that obtains according to the type bit map of multidimensional data and in advance Special bitmap determines another sub-portfolio type bit map of multidimensional data, and continues to inquire corresponding authority information, until power Until the type bit map whole retrieval stored in limit index data finishes.
Wherein, it is searched within the scope of the data storage location of limited authority in permissions data and the sub-portfolio type after fractionation The identical limited authority of data data when, since the data in permissions data are to be stored in an orderly manner, because This, which can be realized with binary chop algorithm, to improve the efficiency of lookup.It is, of course, also possible to be looked into using other Algorithm is looked for, the present embodiment is not especially limited this.
It should be noted that since current existing index being also stored in permission index data in permission index data Number information, therefore, by the type bit map stored in the type bit map of multidimensional data and permission index data successively into When capable and operation or union, progress and operation can be determined according to existing index number information current in permission index data Or the number of the type bit map of union.For example, can define the competence index number if the index number information is 6 6 type bit maps are stored in, are successively read in permission index data type in the 7th field of second field value The data of bit map, without reading other fields in permission index data again, so as to improve search efficiency.
Further, when through the above steps 201 establish permission index data and permissions data to step 203 after, this The method that embodiment provides further includes the process being updated to the data in permission index data and permissions data, specific to update Process can execute before or after the query process of above-mentioned steps 204 to step 207, about to permission index data and permission The time that data in data are updated, the present embodiment are not specifically limited.For ease of description, the present embodiment is only to hold The query process of row step 204 to step 207 carries out the data updating process in permission index data and permissions data later Example carries out detailed explanation to the data updating process in permission index data and permissions data, specifically sees below step Rapid 208:
208: obtaining data to be updated and update operation information, data to be updated are believed including at least corresponding data type Breath, data length information and data content information;
Specifically, the present embodiment is not defined the mode for obtaining data to be updated and update operation information, equally not The content of data to be updated and update operation information to acquisition is defined.In concrete application, when user does one by terminal After operation, collect the related data and operation information of this operation, using the related data that is collected into as get to More new data, using the operation information being collected into as the update operation information got.
209: the type bit map of data to be updated, and the power of inquiring are determined according to the data type information of data to be updated Limit the type bit map that whether there is data to be updated in index data;
Specifically, include corresponding data type information in data to be updated, this can be determined according to data type information Explanation is explained in detail in the type bit map of data to be updated, detailed process in step 205, and details are not described herein again.Really It, can be according to the type bit map of data to be updated in permission index data after the type bit map of fixed data to be updated It is inquired in all types bit map of storage, whether there is the type ratio of data to be updated in the index data that defines the competence Special bitmap.
210: according to the content in query result and update operation information renewal authority index data and permissions data.
For the step, according to query result and update in operation information renewal authority index data and permissions data Hold, including but not limited to following three kinds of situations:
The first situation: if query result is the type bit map that data to be updated are not present in permission index data, And update operation information and carry the corresponding authority information of data to be updated, then number to be updated is stored in the corresponding position of permissions data According to and corresponding authority information;It is deposited in permission index data according to data to be updated and the storage location of corresponding authority information Store up data to be updated type bit map and corresponding permission index information.
In the first case, the type bit map of data to be updated is not present in permission index data, then illustrates this When update operation be that data update operation, update operation information and carry the corresponding authority information of data to be updated.Therefore, it is necessary to A block space is newly opened up in permissions data to be used to store data to be updated and corresponding authority information.Due in permissions data Data sequentially store, therefore, the space newly opened up can according in the data and permissions data of update it is stored its The size orders of his data determines.
After carrying out the update of data and authority information to permissions data, it is also necessary to the permission in permission index data Index information is updated.Firstly, it is necessary to add an index entry, the type bit of the index entry in permission index data Figure is the type bit map of data to be updated, and corresponding permission index information is data to be updated and corresponding permission letter The storage location in permissions data is ceased, according to other permission index informations in the permission index information and permission index data The permission index information is inserted into corresponding position in permission index data by size relation.
Second situation: if query result be permission index data in there are the type bit maps of data to be updated, and It updates in operation information and carries the corresponding authority information of data to be updated, then inquire data to be updated in permission index data The corresponding permission index information of type bit map;Determine the memory block of the permission index information corresponding authority data inquired Domain, and search in storage region with the data of the consistent limited authority of data to be updated, if found and data to be updated The data of consistent limited authority are then looked into according to the corresponding authority information update of the data to be updated carried in update operation information The authority information corresponding with the data of the consistent limited authority of data to be updated found.If do not found and data to be updated The data of consistent limited authority are then inserted into data to be updated and corresponding authority information in the corresponding position of storage region, and Adjust the storage location of other content in permissions data;It is updated according to data to be updated and the storage location of corresponding authority information The corresponding permission index information of type bit map of data to be updated in permission index data, and according to permission number adjusted Permission index information corresponding in permission index data is updated according to the storage location of middle other content.
In second situation, there are the type bit maps of data to be updated in permission index data, this means that power May there be data identical with data to be updated in limit data.If there being number identical with data to be updated in permissions data According to being updated to the permission of multidimensional data identical with data to be updated in permissions data at this time.If in permissions data Data not identical with data to be updated, then be updated to the data in permissions data at this time.Therefore, in second of feelings It is divided into two kinds of situations again in condition, specifically:
The first situation: the permission of multidimensional data identical with data to be updated in permissions data is updated;Specifically Ground is found in permissions data after multidimensional data identical with data to be updated, according to update operation information in carry to more The corresponding authority information of new data, the authority information corresponding with the data of the consistent limited authority of data to be updated that will be found It is updated.
Wherein, authority information is updated can be increase to a few limited permission or reduce at least one by The permission of limit, the present embodiment do not make the content for updating the corresponding authority information of data to be updated carried in operation information specific It limits.The specific update mode of authority information can be determined according to the representation of authority information, and the present embodiment believes permission The update mode of breath is not especially limited, and is explained in detail about having in the expression way above-mentioned steps 202 of authority information Bright, details are not described herein again.
Second case: the data in permissions data are updated.Specifically, it is inserted into the corresponding position of storage region Data to be updated and corresponding authority information, and adjust the storage location of other content in permissions data;According to data to be updated And in the storage location renewal authority index data of corresponding authority information data to be updated the corresponding power of type bit map Index information is limited, and according to the storage location of other content in permissions data adjusted to corresponding power in permission index data Limit index information is updated.
When it is implemented, being first inserted into data to be updated and corresponding authority information in the corresponding position of storage region.Wherein, The position of data to be updated and the insertion of corresponding authority information can be determined with the following method:
The data of limited authority and corresponding authority information store Shi Douyong binary system to be stored, then in storage region The two links together as a string of binary zeros, 1 code, which represents a specific numerical value.Class according to this It pushes away, the data of corresponding every a pair of of the limited authority of a seed type bit map and corresponding authority information are all corresponding in permissions data A specific value, be ranked up according to the size of each numerical value, formed an orderly sequence.Data and correspondence to be updated Authority information equally correspond to a binary numeral, according to the numerical value in ordered sequence sort use binary chop it is true The position of fixed data to be updated and the insertion of corresponding authority information.It is, of course, also possible to determine data to be updated using other methods And the position of corresponding authority information insertion, the present embodiment are not especially limited this.
Due to insert new limited authority data and corresponding authority information, data and correspondence to be updated The data of the subsequent limited authority in authority information insertion position and the storage location of corresponding authority information can all change Become, thus needs to adjust the storage location of other content in permissions data according to the actual situation.Simultaneously as its in permissions data He is changed the storage location of content, and therefore, it is necessary to the storage locations according to other content in permissions data adjusted Permission index information corresponding in permission index data is updated.
For above-mentioned second situation, more according to the corresponding authority information of data to be updated carried in update operation information After the authority information corresponding with the data of the consistent limited authority of data to be updated newly found, further includes:
If updated authority information show in permissions data with the data of the consistent limited authority of data to be updated not by Limit, then deleted from permissions data with the data of the consistent limited authority of data to be updated and corresponding authority information, and adjust The storage location of other content in permissions data;
By permission index information corresponding with the data of the consistent limited authority of data to be updated in permissions data from permission It is deleted in index data, and according to the storage location of other content in permissions data adjusted in permission index data Corresponding permission index information is updated.
Specifically, in the operation being updated to authority information, if the operation updated is reduction, at least one is limited Permission, when all limited permissions of the data of the limited authority are all eliminated, then the data of the limited authority are not any Restricted rights, at this time the data of the limited authority do not have in permissions data then storage meaning, it is therefore desirable to by the permission by The data of limit are deleted from permissions data.It is deleted and data of the consistent limited authority of data to be updated and corresponding from permissions data Authority information after, the storage location of the data of the limited authority and the subsequent other content of corresponding authority information needs to carry out Before move.Wherein, the data of the other limited authorities of other content reference and corresponding authority information, need to adjust in permissions data The storage location of other content.
Since the data of permissions data others limited authority and the storage location of corresponding authority information are changed, Therefore, it is necessary to according to the storage location of other content in permissions data adjusted to permission rope corresponding in permission index data Fuse breath is updated.
The third situation: if query result be permission index data in there are the type bit maps of data to be updated, and It updates to carry in operation information and deletes instruction, then the type bit map for inquiring data to be updated in permission index data is corresponding Permission index information;Determine the storage region of the permission index information corresponding authority data inquired, and in storage region The data with the consistent limited authority of data to be updated are searched, if finding the number with the consistent limited authority of data to be updated According to, then according to update the deletion that carries in operation information indicate to delete from permissions data with the consistent permission of data to be updated by The data of limit and corresponding authority information, and adjust the storage location of other content in permissions data;Renewal authority index data In data to be updated the corresponding permission index information of type bit map, and according to other content in permissions data adjusted Storage location permission index information corresponding in permission index data is updated.
Wherein, when the storage location of other content is adjusted in permissions data, other contents refer to other permissions Limited data and corresponding authority information can be carried out according to the specific storage mode of the data of limited authority in permissions data Adjustment is stored in a manner of array as worked as the data of limited authority and corresponding authority information in permissions data, deletes one After the data of a limited authority and corresponding authority information, need all to move subsequent other contents forward one storage position It sets.In this way, the storage location that will lead to the limited data of subsequent authority and corresponding authority information changes, therefore, it is necessary to According to the storage location of other content in permissions data adjusted to permission index information corresponding in permission index data into Row updates.
If the data of the corresponding limited authority of a seed type bit map are complete in permissions data during deleting data Portion deletes and finishes, in addition to that need to adjust because in permissions data other than the storage location of other contents, also wanting caused by deleting data The type bit map corresponding authority index entry in permission index data is deleted.After deleting a permission index entry, need Subsequent permission index entry is moved forward, so that the storage location to updated permission index information be needed to re-start adjustment.
Method provided in this embodiment realizes multidimensional data by introducing type bit map and permission index information mechanism Permission inquiry, make entire query process without complicated functional operation, thus compared to by the way of Hash table search access right, Improve the permission search efficiency of multidimensional data.
Embodiment three
The embodiment of the invention provides a kind of permission inquiry units of multidimensional data, and referring to Fig. 3, which includes:
First obtains module 301, and for obtaining the multidimensional data of permission to be checked, every dimension data includes at least corresponding number According to type information, data length information and data content information;
Second obtains module 302, for obtaining the type bit of multidimensional data according to the data type information of every dimension data Bitmap;
First determining module 303, the permission index number for obtaining according to the type bit map of multidimensional data and in advance Type bit map in determines the sub-portfolio type bit map of multidimensional data;
First enquiry module 304, for inquiring the corresponding permission of sub-portfolio type bit map in permission index data Index information;
Second enquiry module 305, for being obtained according to the corresponding permission index information of sub-portfolio type bit map from advance Corresponding authority information is inquired in the permissions data taken;
Second determining module 306, for determining the permission of multidimensional data according to the authority information inquired.
As a kind of preferred embodiment, the first determining module 303, comprising:
Arithmetic element, for by the type bit map of multidimensional data and the type in the permission index data that in advance obtains Bit map successively carries out and operation or union;
Determination unit, for when operation result is identical as any kind bit map in permission index data, then will Sub-portfolio type bit map of any kind bit map as multidimensional data.
As a kind of preferred embodiment, the permission inquiry unit of the multidimensional data, further includes:
Third obtains module, the corresponding type bit map of each dimension data for obtaining limited authority;
Third determining module, for the corresponding permission index information of limited each dimension data that defines the competence, limited authority The corresponding permission index information of each dimension data and limited authority storage region phase of each dimension data in permissions data It is corresponding;
First memory module, the corresponding type bit map of each dimension data and permission for sequentially storing limited authority Index information obtains permission index data.
As a kind of preferred embodiment, the permission inquiry unit of the multidimensional data, further includes:
Collection module, for collecting each dimension data and corresponding authority information of limited authority;
Second memory module is weighed for sequentially storing each dimension data and corresponding authority information of limited authority Limit data;Wherein, in storage region of each dimension data of limited authority in permissions data and permission index data permission by The corresponding permission index information of each dimension data of limit is corresponding.
As a kind of preferred embodiment, the second enquiry module 305, comprising:
First determination unit obtains in advance for being determined according to the corresponding permission index information of sub-portfolio type bit map Permissions data in corresponding storage region;
Query unit, for inquiring data phase one corresponding with sub-portfolio type bit map in determining storage region The data of the limited authority of cause;
Second determination unit, for when inquire the consistent permission of data corresponding with sub-portfolio type bit map by When the data of limit, using authority information corresponding to the data of the limited authority inquired as the authority information inquired.
As a kind of preferred embodiment, the permission inquiry unit of the multidimensional data, further includes:
4th obtains module, and for obtaining data to be updated and updating operation information, data to be updated, which include at least, to be corresponded to Data type information, data length information and data content information;
Third enquiry module, for determining the type bit of data to be updated according to the data type information of data to be updated Bitmap, and whether there is the type bit map of data to be updated in search access right index data;
Update module, for according in query result and update operation information renewal authority index data and permissions data Content.
As a kind of preferred embodiment, update module, comprising:
First storage unit, for being the type bit that data to be updated are not present in permission index data when query result Bitmap, and when updating operation information and carrying the corresponding authority information of data to be updated, permissions data corresponding position storage to More new data and corresponding authority information;
Second storage unit, for according to data to be updated and the storage location of corresponding authority information in permission index number Type bit map and corresponding permission index information according to middle storage data to be updated.
As a kind of preferred embodiment, update module, comprising:
First query unit, for being that there are the type bits of data to be updated in permission index data when query result Figure, and update when carrying the corresponding authority information of data to be updated in operation information, it is inquired in permission index data to be updated The corresponding permission index information of the type bit map of data;
Second query unit, for the storage region of the determining permission index information corresponding authority data inquired, and The data with the consistent limited authority of data to be updated are searched in storage region;
First updating unit, for when finding the data with the consistent limited authority of data to be updated, according to update The corresponding authority information of the data to be updated carried in operation information update find with the consistent permission of data to be updated by The corresponding authority information of the data of limit.
As a kind of preferred embodiment, update module, further includes:
It is inserted into unit, for when not finding the data with the consistent limited authority of data to be updated, in storage region Corresponding position be inserted into data to be updated and corresponding authority information;
The first adjustment unit, for adjusting the storage location of other content in permissions data;
Second updating unit, for being indexed according to the storage location renewal authority of data to be updated and corresponding authority information The corresponding permission index information of type bit map of data to be updated in data, and according to other in permissions data adjusted The storage location of content is updated permission index information corresponding in permission index data.
As a kind of preferred embodiment, update module, further includes:
First delete unit, for when updated authority information show in permissions data with the consistent power of data to be updated When the limited data of limit are unrestricted, deleted from permissions data and data of the consistent limited authority of data to be updated and corresponding Authority information;
Second adjustment unit, for adjusting the storage location of other content in permissions data;
Second deletes unit, for by power corresponding with the data of the consistent limited authority of data to be updated in permissions data Limit index information is deleted from permission index data;
Third adjustment unit, for the storage location according to other content in permissions data adjusted to permission index number Corresponding permission index information is updated in.
As a kind of preferred embodiment, update module, comprising:
Third query unit, for being that there are the type bits of data to be updated in permission index data when query result Figure, and the type bit of data to be updated is inquired in permission index data when carrying deletion instruction in update operation information Scheme corresponding permission index information;
4th query unit, for the storage region of the determining permission index information corresponding authority data inquired, and The data with the consistent limited authority of data to be updated are searched in storage region;
Third deletes unit, for when finding the data with the consistent limited authority of data to be updated, according to update The deletion instruction carried in operation information is deleted and the data of the consistent limited authority of data to be updated and right from permissions data The authority information answered;
4th adjustment unit, for adjusting the storage location of other content in permissions data;
Third updating unit, the corresponding permission of type bit map for data to be updated in renewal authority index data Index information, and according to the storage location of other content in permissions data adjusted to corresponding permission in permission index data Index information is updated.
Device provided in this embodiment realizes multidimensional data by introducing type bit map and permission index information mechanism Permission inquiry, make entire query process without complicated functional operation, thus compared to by the way of Hash table search access right, Improve the permission search efficiency of multidimensional data.
Example IV
A kind of terminal is present embodiments provided, which can be used for executing the multidimensional data provided in above-described embodiment Permission querying method.Referring to fig. 4, which includes:
Terminal 400 may include RF(Radio Frequency, radio frequency) circuit 110, include one or more meter The memory 120 of calculation machine readable storage medium storing program for executing, input unit 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi(Wireless Fidelity, Wireless Fidelity) module 170, include one or more than one the processing of processing core The components such as device 180 and power supply 190.It will be understood by those skilled in the art that terminal structure shown in Fig. 4 is not constituted pair The restriction of terminal may include perhaps combining certain components or different component cloth than illustrating more or fewer components It sets.Wherein:
RF circuit 110 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base station After downlink information receives, one or the processing of more than one processor 180 are transferred to;In addition, the data for being related to uplink are sent to Base station.In general, RF circuit 110 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, uses Family identity module (SIM) card, transceiver, coupler, LNA(Low Noise Amplifier, low-noise amplifier), duplex Device etc..In addition, RF circuit 110 can also be communicated with network and other equipment by wireless communication.The wireless communication can make With any communication standard or agreement, and including but not limited to GSM (Global System of Mobile communication, entirely Ball mobile communcations system), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, wideband code division multiple access), LTE (Long Term Evolution, long term evolution), Email, SMS (Short Messaging Service, short message service) etc..
Memory 120 can be used for storing software program and module, and processor 180 is stored in memory 120 by operation Software program and module, thereby executing various function application and data processing.Memory 120 can mainly include storage journey Sequence area and storage data area, wherein storing program area can the (ratio of application program needed for storage program area, at least one function Such as sound-playing function, image player function) etc.;Storage data area, which can be stored, uses created number according to terminal 400 According to (such as audio data, phone directory etc.) etc..In addition, memory 120 may include high-speed random access memory, can also wrap Include nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts. Correspondingly, memory 120 can also include Memory Controller, to provide processor 180 and input unit 130 to memory 120 access.
Input unit 130 can be used for receiving the number or character information of input, and generate and user setting and function Control related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 130 may include touching Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad are collected and are used Family on it or nearby touch operation (such as user using any suitable object or attachment such as finger, stylus in touch-sensitive table Operation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional , touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is used The touch orientation at family, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller is from touch Touch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and can receive processor 180 The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves Realize touch sensitive surface 131.In addition to touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically, Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.), One of trace ball, mouse, operating stick etc. are a variety of.
Display unit 140 can be used for showing information input by user or the information and terminal 400 that are supplied to user Various graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof. Display unit 140 may include display panel 141, optionally, can use LCD (Liquid Crystal Display, liquid crystal Show device), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display panel 141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 detects touching on it or nearby After touching operation, processor 180 is sent to determine the type of touch event, is followed by subsequent processing device 180 according to the type of touch event Corresponding visual output is provided on display panel 141.Although touch sensitive surface 131 and display panel 141 are conducts in Fig. 4 Two independent components realize input and input function, but in some embodiments it is possible to by touch sensitive surface 131 and display Panel 141 is integrated and realizes and outputs and inputs function.
Terminal 400 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensings Device.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 141, and proximity sensor can close display when terminal 400 is moved in one's ear Panel 141 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect in all directions (generally Three axis) acceleration size, can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);Extremely In other sensors such as gyroscope, barometer, hygrometer, thermometer, the infrared sensors that terminal 400 can also configure, herein It repeats no more.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and terminal 400.Audio Electric signal after the audio data received conversion can be transferred to loudspeaker 161, be converted to sound by loudspeaker 161 by circuit 160 Sound signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, after being received by voicefrequency circuit 160 Audio data is converted to, then by after the processing of audio data output processor 180, such as another end is sent to through RF circuit 110 End, or audio data is exported to memory 120 to be further processed.Voicefrequency circuit 160 is also possible that earphone jack, To provide the communication of peripheral hardware earphone Yu terminal 400.
WiFi belongs to short range wireless transmission technology, and terminal 400 can help user's transceiver electronics by WiFi module 170 Mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 4 is shown WiFi module 170, but it is understood that, and it is not belonging to must be configured into for terminal 400, it can according to need completely Do not change in the range of the essence of invention and omits.
Processor 180 is the control centre of terminal 400, utilizes each portion of various interfaces and connection whole mobile phone Point, by running or execute the software program and/or module that are stored in memory 120, and calls and be stored in memory 120 Interior data execute the various functions and processing data of terminal 400, to carry out integral monitoring to mobile phone.Optionally, processor 180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modem processor, Wherein, the main processing operation system of application processor, user interface and application program etc., modem processor mainly handles nothing Line communication.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Terminal 400 further includes the power supply 190(such as battery powered to all parts), it is preferred that power supply can pass through electricity Management system and processor 180 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management system The functions such as management.Power supply 190 can also include one or more direct current or AC power source, recharging system, power supply event Hinder the random components such as detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal 400 can also include camera, bluetooth module etc., and details are not described herein.Specifically in this reality It applies in example, the display unit of terminal is touch-screen display, and terminal further includes having memory and one or more than one Program, perhaps more than one program is stored in memory and is configured to by one or more than one processing for one of them Device executes.The one or more programs include instructions for performing the following operations:
The multidimensional data of permission to be checked is obtained, every dimension data includes at least corresponding data type information, data length Information and data content information;
The type bit map of the multidimensional data is obtained according to the data type information of every dimension data;
The type bit in permission index data obtained according to the type bit map of the multidimensional data and in advance Figure determines the sub-portfolio type bit map of the multidimensional data, and the sub-portfolio class is inquired in the permission index data The corresponding permission index information of type bit map;
It is looked into from the permissions data obtained in advance according to the corresponding permission index information of the sub-portfolio type bit map Corresponding authority information is ask, and determines the permission of the multidimensional data according to the authority information inquired.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, in the memory of terminal, also include instructions for performing the following operations:
By the type bit map of the multidimensional data and the type bit map in the permission index data that in advance obtains Successively carry out and operation or union;
If operation result is identical as any kind bit map in the permission index data, by any kind Sub-portfolio type bit map of the bit map as the multidimensional data.
In the third the possible embodiment provided based on the first possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
The corresponding type bit map of each dimension data of limited authority is obtained, and determines each dimension of the limited authority The corresponding permission index information of data, the corresponding permission index information of each dimension data of the limited authority and the permission by Storage region of each dimension data of limit in the permissions data is corresponding;
The corresponding type bit map of each dimension data and permission index information for sequentially storing the limited authority, obtain Permission index data.
In the 4th kind of possible embodiment provided based on the first possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
Each dimension data and corresponding authority information of limited authority are collected, and sequentially stores each dimension of the limited authority Degree evidence and corresponding authority information, obtain permissions data;
Wherein, storage region of each dimension data of the limited authority in the permissions data and the permission index The corresponding permission index information of each dimension data of limited authority described in data is corresponding.
In the 5th kind of possible embodiment provided based on the 4th kind of possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
It is determined in the permissions data obtained in advance according to the corresponding permission index information of the sub-portfolio type bit map Corresponding storage region;
The permission that inquiry data corresponding with the sub-portfolio type bit map are consistent in determining storage region Limited data;
It, will if inquiring the data of the consistent limited authority of data corresponding with the sub-portfolio type bit map Authority information corresponding to the data of the limited authority inquired is as the authority information inquired.
The first to the 5th kind of possible embodiment any embodiment based on and provide the 6th kind It also include instructions for performing the following operations in the memory of terminal in possible embodiment
It obtains data to be updated and updates operation information, the data to be updated are believed including at least corresponding data type Breath, data length information and data content information;
The type bit map of the data to be updated is determined according to the data type information of the data to be updated, and is looked into Ask the type bit map that whether there is the data to be updated in the permission index data;
It is updated in the permission index data and the permissions data according to query result and the update operation information Content.
In the 7th kind of possible embodiment provided based on the 6th kind of possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
If query result is the type bit map that the data to be updated are not present in the permission index data, and institute It states and updates operation information and carry the corresponding authority information of data to be updated, then described in the corresponding position storage of the permissions data Data to be updated and corresponding authority information;
It is stored in the permission index data according to the data to be updated and the storage location of corresponding authority information The type bit map of the data to be updated and corresponding permission index information.
In the 8th kind of possible embodiment provided based on the 6th kind of possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
If query result is in the permission index data there are the type bit map of the data to be updated, and described It updates in operation information and carries the corresponding authority information of the data to be updated, then in the permission index data described in inquiry The corresponding permission index information of the type bit map of data to be updated;
Determine that the permission index information inquired corresponds to the storage region of the permissions data, and in the storage region The data with the consistent limited authority of data to be updated are searched, if found and the consistent permission of data to be updated Limited data are then updated according to the corresponding authority information of the data to be updated carried in the update operation information and are searched The authority information corresponding with the data of the consistent limited authority of data to be updated arrived.
In the 9th kind of possible embodiment provided based on the 8th kind of possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
If the data with the consistent limited authority of data to be updated are not found, in pair of the storage region It answers position to be inserted into the data to be updated and corresponding authority information, and adjusts the storage position of other content in the permissions data It sets;
Institute in the permission index data is updated according to the data to be updated and the storage location of corresponding authority information The corresponding permission index information of type bit map of data to be updated is stated, and according to other in the permissions data adjusted The storage location of content is updated corresponding permission index information in the permission index data.
In the tenth kind of possible embodiment provided based on the 6th kind of possible embodiment, terminal is deposited Also include instructions for performing the following operations in reservoir:
If updated authority information show in the permissions data with the consistent limited authority of data to be updated Data are unrestricted, then delete and data of the consistent limited authority of data to be updated and corresponding from the permissions data Authority information, and adjust the storage location of other content in the permissions data;
Permission corresponding with the data of the consistent limited authority of data to be updated in the permissions data is indexed and is believed Breath is deleted from the permission index data, and according to the storage location of other content in the permissions data adjusted Corresponding permission index information in the permission index data is updated.
The tenth provided based on the 9th kind of possible embodiment or the tenth kind of possible embodiment is a kind of Also include instructions for performing the following operations in the memory of terminal in possible embodiment:
If query result is in the permission index data there are the type bit map of the data to be updated, and described It updates to carry in operation information and deletes instruction, then inquire the type bit of the data to be updated in the permission index data The corresponding permission index information of bitmap;
Determine that the permission index information inquired corresponds to the storage region of the permissions data, and in the storage region The data with the consistent limited authority of data to be updated are searched, if found and the consistent permission of data to be updated Limited data, then according to the deletion that carries in the update operation information indicate to delete from the permissions data with it is described to The data of the consistent limited authority of more new data and corresponding authority information, and adjust depositing for other content in the permissions data Storage space is set;
The corresponding permission index information of type bit map of data to be updated described in the permission index data is updated, And according to the storage location of other content in the permissions data adjusted to corresponding permission in the permission index data Index information is updated.
Terminal provided in an embodiment of the present invention realizes multidimensional by introducing type bit map and permission index information mechanism The permission of data is inquired, and makes entire query process without complicated functional operation, thus compared to using Hash table search access right Mode improves the permission search efficiency of multidimensional data.
Embodiment five
The embodiment of the invention also provides a kind of computer readable storage medium, which be can be Computer readable storage medium included in memory in above-described embodiment;It is also possible to individualism, eventually without supplying Computer readable storage medium in end.The computer-readable recording medium storage has one or more than one program, this one A or more than one program is used to execute the permission issuer for realizing multidimensional data by one or more than one processor Method, this method comprises:
The multidimensional data of permission to be checked is obtained, every dimension data includes at least corresponding data type information, data length Information and data content information;
The type bit map of the multidimensional data is obtained according to the data type information of every dimension data;
The type bit in permission index data obtained according to the type bit map of the multidimensional data and in advance Figure determines the sub-portfolio type bit map of the multidimensional data, and the sub-portfolio class is inquired in the permission index data The corresponding permission index information of type bit map;
It is looked into from the permissions data obtained in advance according to the corresponding permission index information of the sub-portfolio type bit map Corresponding authority information is ask, and determines the permission of the multidimensional data according to the authority information inquired.
Assuming that above-mentioned is the first possible embodiment, then provided based on the first possible embodiment Second of possible embodiment in, the type bit map according to the multidimensional data and the permission rope obtained in advance Type bit map of the argument in determines the sub-portfolio type bit map of the multidimensional data, comprising:
By the type bit map of the multidimensional data and the type bit map in the permission index data that in advance obtains Successively carry out and operation or union;
If operation result is identical as any kind bit map in the permission index data, by any kind Sub-portfolio type bit map of the bit map as the multidimensional data.
In the third the possible embodiment provided based on the first possible embodiment, the basis Type bit map in the type bit map of the multidimensional data and the permission index data obtained in advance determines described more Before the sub-portfolio type bit map of dimension data, further includes:
The corresponding type bit map of each dimension data of limited authority is obtained, and determines each dimension of the limited authority The corresponding permission index information of data, the corresponding permission index information of each dimension data of the limited authority and the permission by Storage region of each dimension data of limit in the permissions data is corresponding;
The corresponding type bit map of each dimension data and permission index information for sequentially storing the limited authority, obtain Permission index data.
In the 4th kind of possible embodiment provided based on the first possible embodiment, the basis The permission index information is inquired before corresponding authority information from the permissions data obtained in advance, further includes:
Each dimension data and corresponding authority information of limited authority are collected, and sequentially stores each dimension of the limited authority Degree evidence and corresponding authority information, obtain permissions data;
Wherein, storage region of each dimension data of the limited authority in the permissions data and the permission index The corresponding permission index information of each dimension data of limited authority described in data is corresponding.
In the 5th kind of possible embodiment provided based on the 4th kind of possible embodiment, the basis The corresponding permission index information of the sub-portfolio type bit map inquires corresponding permission from the permissions data obtained in advance Information, comprising:
It is determined in the permissions data obtained in advance according to the corresponding permission index information of the sub-portfolio type bit map Corresponding storage region;
The permission that inquiry data corresponding with the sub-portfolio type bit map are consistent in determining storage region Limited data;
It, will if inquiring the data of the consistent limited authority of data corresponding with the sub-portfolio type bit map Authority information corresponding to the data of the limited authority inquired is as the authority information inquired.
The first to the 5th kind of possible embodiment any embodiment based on and provide the 6th kind In possible embodiment, the method also includes:
It obtains data to be updated and updates operation information, the data to be updated are believed including at least corresponding data type Breath, data length information and data content information;
The type bit map of the data to be updated is determined according to the data type information of the data to be updated, and is looked into Ask the type bit map that whether there is the data to be updated in the permission index data;
It is updated in the permission index data and the permissions data according to query result and the update operation information Content.
In the 7th kind of possible embodiment provided based on the 6th kind of possible embodiment, the basis Query result and the update operation information update the content in the permission index data and the permissions data, comprising:
If query result is the type bit map that the data to be updated are not present in the permission index data, and institute It states and updates operation information and carry the corresponding authority information of data to be updated, then described in the corresponding position storage of the permissions data Data to be updated and corresponding authority information;
It is stored in the permission index data according to the data to be updated and the storage location of corresponding authority information The type bit map of the data to be updated and corresponding permission index information.
In the 8th kind of possible embodiment provided based on the 6th kind of possible embodiment, the basis Query result and the update operation information update the content in the permission index data and the permissions data, comprising:
If query result is in the permission index data there are the type bit map of the data to be updated, and described It updates in operation information and carries the corresponding authority information of the data to be updated, then in the permission index data described in inquiry The corresponding permission index information of the type bit map of data to be updated;
Determine that the permission index information inquired corresponds to the storage region of the permissions data, and in the storage region The data with the consistent limited authority of data to be updated are searched, if found and the consistent permission of data to be updated Limited data are then updated according to the corresponding authority information of the data to be updated carried in the update operation information and are searched The authority information corresponding with the data of the consistent limited authority of data to be updated arrived.
It is described in institute in the 9th kind of possible embodiment provided based on the 8th kind of possible embodiment It states after searching the data with the consistent limited authority of data to be updated in storage region, further includes:
If the data with the consistent limited authority of data to be updated are not found, in pair of the storage region It answers position to be inserted into the data to be updated and corresponding authority information, and adjusts the storage position of other content in the permissions data It sets;
Institute in the permission index data is updated according to the data to be updated and the storage location of corresponding authority information The corresponding permission index information of type bit map of data to be updated is stated, and according to other in the permissions data adjusted The storage location of content is updated corresponding permission index information in the permission index data.
In the tenth kind of possible embodiment provided based on the 6th kind of possible embodiment, the basis The corresponding authority information of the data to be updated carried in the update operation information update find with it is described to be updated After the corresponding authority information of data of the consistent limited authority of data, further includes:
If updated authority information show in the permissions data with the consistent limited authority of data to be updated Data are unrestricted, then delete and data of the consistent limited authority of data to be updated and corresponding from the permissions data Authority information, and adjust the storage location of other content in the permissions data;By in the permissions data with it is described to be updated The corresponding permission index information of the data of the consistent limited authority of data is deleted from the permission index data, and according to The storage location of other content indexes permission corresponding in the permission index data and believes in the permissions data adjusted Breath is updated.
The tenth provided based on the 9th kind of possible embodiment or the tenth kind of possible embodiment is a kind of It is described according to query result and the update operation information updates the permission index data and described in possible embodiment Content in permissions data, comprising:
If query result is in the permission index data there are the type bit map of the data to be updated, and described It updates to carry in operation information and deletes instruction, then inquire the type bit of the data to be updated in the permission index data The corresponding permission index information of bitmap;
Determine that the permission index information inquired corresponds to the storage region of the permissions data, and in the storage region The data with the consistent limited authority of data to be updated are searched, if found and the consistent permission of data to be updated Limited data, then according to the deletion that carries in the update operation information indicate to delete from the permissions data with it is described to The data of the consistent limited authority of more new data and corresponding authority information, and adjust depositing for other content in the permissions data Storage space is set;
The corresponding permission index information of type bit map of data to be updated described in the permission index data is updated, And according to the storage location of other content in the permissions data adjusted to corresponding permission in the permission index data Index information is updated.
Computer readable storage medium provided in an embodiment of the present invention, by introducing type bit map and permission index letter Breath mechanism realizes that the permission of multidimensional data is inquired, and makes entire query process without complicated functional operation, thus compared to using Kazakhstan The mode of uncommon table search access right, improves the permission search efficiency of multidimensional data.
Embodiment six
The embodiment of the invention provides a kind of graphical user interface, the graphical user interface is used at the terminal, the end End includes touch-screen display, memory and one for executing one or more than one program or more than one Processor;The graphical user interface includes:
The multidimensional data of permission to be checked is obtained, every dimension data includes at least corresponding data type information, data length Information and data content information;
The type bit map of the multidimensional data is obtained according to the data type information of every dimension data;
The type bit in permission index data obtained according to the type bit map of the multidimensional data and in advance Figure determines the sub-portfolio type bit map of the multidimensional data, and the sub-portfolio class is inquired in the permission index data The corresponding permission index information of type bit map;
It is looked into from the permissions data obtained in advance according to the corresponding permission index information of the sub-portfolio type bit map Corresponding authority information is ask, and determines the permission of the multidimensional data according to the authority information inquired.
Graphical user interface provided in an embodiment of the present invention, by introducing type bit map and permission index information mechanism The permission inquiry for realizing multidimensional data, makes entire query process without complicated functional operation, thus compares and looked into using Hash table The mode for asking permission, improves the permission search efficiency of multidimensional data.
It should be understood that power of the permission inquiry unit of multidimensional data provided by the above embodiment in inquiry multidimensional data In limited time, only the example of the division of the above functional modules, it in practical application, can according to need and by above-mentioned function Distribution is completed by different functional modules, i.e., portion's structure of device is divided into different functional modules, to complete above description All or part of function.In addition, the permission inquiry unit of multidimensional data provided by the above embodiment and the power of multidimensional data Limit querying method embodiment belongs to same design, and specific implementation process is detailed in embodiment of the method, and which is not described herein again.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (22)

1. a kind of permission querying method of multidimensional data, which is characterized in that the described method includes:
The multidimensional data of permission to be checked is obtained, every dimension data includes at least corresponding data type information, data length information And data content information;
The type bit map of the multidimensional data is obtained according to the data type information of every dimension data;
The type bit map in permission index data obtained according to the type bit map of the multidimensional data and in advance is true The sub-portfolio type bit map of the fixed multidimensional data, and the sub-portfolio type ratio is inquired in the permission index data The corresponding permission index information of special bitmap;
It is inquired from the permissions data obtained in advance pair according to the corresponding permission index information of the sub-portfolio type bit map The authority information answered, and determine according to the authority information inquired the permission of the multidimensional data.
2. the method according to claim 1, wherein the type bit map according to the multidimensional data and The type bit map in permission index data obtained in advance determines the sub-portfolio type bit map of the multidimensional data, packet It includes:
Successively with the type bit map in the permission index data that in advance obtains by the type bit map of the multidimensional data It carries out and operation or union, wherein when corresponding to a kind of data type to be worth for 1 bit, by the multidimensional data Type bit map in type bit map and the permission index data obtained in advance successively carries out and operation, when with value When corresponding to a kind of data type for 0 bit, by the type bit map of the multidimensional data and the power obtained in advance Type bit map in limit index data successively carries out union;
If operation result is identical as any kind bit map in the permission index data, by any kind bit Sub-portfolio type bit map of the bitmap as the multidimensional data.
3. the method according to claim 1, wherein the type bit map according to the multidimensional data and The type bit map in permission index data obtained in advance determine the multidimensional data sub-portfolio type bit map it Before, further includes:
The corresponding type bit map of each dimension data of limited authority is obtained, and determines each dimension data of the limited authority Corresponding permission index information, the corresponding permission index information of each dimension data of the limited authority and the limited authority Storage region of each dimension data in the permissions data is corresponding;
The corresponding type bit map of each dimension data and permission index information for sequentially storing the limited authority, obtain permission Index data.
4. the method according to claim 1, wherein it is described according to the permission index information from obtaining in advance It is inquired in permissions data before corresponding authority information, further includes:
Each dimension data and corresponding authority information of limited authority are collected, and sequentially stores each number of dimensions of the limited authority According to and corresponding authority information, obtain permissions data;
Wherein, storage region of each dimension data of the limited authority in the permissions data and the permission index data Described in limited authority the corresponding permission index information of each dimension data it is corresponding.
5. according to the method described in claim 4, it is characterized in that, described corresponding according to the sub-portfolio type bit map Permission index information inquires corresponding authority information from the permissions data obtained in advance, comprising:
It is determined according to the corresponding permission index information of the sub-portfolio type bit map corresponding in the permissions data obtained in advance Storage region;
The limited authority that inquiry data corresponding with the sub-portfolio type bit map are consistent in determining storage region Data;
It, will inquiry if inquiring the data of the consistent limited authority of data corresponding with the sub-portfolio type bit map To limited authority data corresponding to authority information as the authority information inquired.
6. the method according to claim 1, which is characterized in that the method also includes:
It obtains data to be updated and updates operation information, the data to be updated include at least corresponding data type information, number According to length information and data content information;
The type bit map of the data to be updated is determined according to the data type information of the data to be updated, and inquires institute State the type bit map that whether there is the data to be updated in permission index data;
The content in the permission index data and the permissions data is updated according to query result and the update operation information.
7. according to the method described in claim 6, it is characterized in that, it is described according to query result and the update operation information more Content in the new permission index data and the permissions data, comprising:
If query result be the permission index data in be not present the data to be updated type bit map, and it is described more New operation information carries the corresponding authority information of data to be updated, then described to more in the corresponding position storage of the permissions data New data and corresponding authority information;
Described in being stored in the permission index data according to the data to be updated and the storage location of corresponding authority information The type bit map of data to be updated and corresponding permission index information.
8. according to the method described in claim 6, it is characterized in that, it is described according to query result and the update operation information more Content in the new permission index data and the permissions data, comprising:
If query result is in the permission index data there are the type bit map of the data to be updated, and the update The corresponding authority information of the data to be updated is carried in operation information, then is inquired in the permission index data described to more The corresponding permission index information of the type bit map of new data;
It determines that the permission index information inquired corresponds to the storage region of the permissions data, and is searched in the storage region With the data of the consistent limited authority of data to be updated, if found and the consistent limited authority of data to be updated Data, then updated and to be found according to the corresponding authority information of the data to be updated carried in the update operation information Authority information corresponding with the data of the consistent limited authority of data to be updated.
9. according to the method described in claim 8, it is characterized in that, it is described in the storage region search with it is described to be updated After the data of the consistent limited authority of data, further includes:
If the data with the consistent limited authority of data to be updated are not found, in the correspondence position of the storage region It sets and is inserted into the data to be updated and corresponding authority information, and adjust the storage location of other content in the permissions data;
According to the data to be updated and the storage location of corresponding authority information update described in the permission index data to The corresponding permission index information of the type bit map of more new data, and according to other content in the permissions data adjusted Storage location corresponding permission index information in the permission index data is updated.
10. according to the method described in claim 8, it is characterized in that, described according to the institute carried in the update operation information It states the corresponding authority information of data to be updated and updates the data pair with the consistent limited authority of data to be updated found After the authority information answered, further includes:
If updated authority information shows the data in the permissions data with the consistent limited authority of data to be updated It is unrestricted, then it is deleted and the data and corresponding permission of the consistent limited authority of data to be updated from the permissions data Information, and adjust the storage location of other content in the permissions data;
By permission index information corresponding with the data of the consistent limited authority of data to be updated in the permissions data from It is deleted in the permission index data, and according to the storage location of other content in the permissions data adjusted to institute Corresponding permission index information in permission index data is stated to be updated.
11. according to the method described in claim 6, it is characterized in that, described according to query result and the update operation information Update the content in the permission index data and the permissions data, comprising:
If query result is in the permission index data there are the type bit map of the data to be updated, and the update It is carried in operation information and deletes instruction, then inquire the type bit map of the data to be updated in the permission index data Corresponding permission index information;
It determines that the permission index information inquired corresponds to the storage region of the permissions data, and is searched in the storage region With the data of the consistent limited authority of data to be updated, if found and the consistent limited authority of data to be updated Data, then according to the deletion that carries in the update operation information indicate to delete from the permissions data with it is described to be updated The data of the consistent limited authority of data and corresponding authority information, and adjust the storage position of other content in the permissions data It sets;
Update the corresponding permission index information of type bit map of data to be updated described in the permission index data, and root Permission corresponding in the permission index data is indexed according to the storage location of other content in the permissions data adjusted Information is updated.
12. a kind of permission inquiry unit of multidimensional data, which is characterized in that described device includes:
First obtains module, and for obtaining the multidimensional data of permission to be checked, every dimension data includes at least corresponding data type Information, data length information and data content information;
Second obtains module, for obtaining the type bit of the multidimensional data according to the data type information of every dimension data Figure;
First determining module, in the permission index data for obtaining according to the type bit map of the multidimensional data and in advance Type bit map determine the sub-portfolio type bit map of the multidimensional data;
First enquiry module, for inquiring the corresponding permission of the sub-portfolio type bit map in the permission index data Index information;
Second enquiry module, for according to the sub-portfolio type bit map corresponding permission index information from obtaining in advance Corresponding authority information is inquired in permissions data;
Second determining module, for determining the permission of the multidimensional data according to the authority information inquired.
13. device according to claim 12, which is characterized in that first determining module, comprising:
Arithmetic element, for by the type bit map of the multidimensional data and the type in the permission index data that in advance obtains Bit map successively carries out and operation or union, wherein when corresponding to a kind of data type to be worth for 1 bit, by institute The type bit map and the type bit map in the permission index data obtained in advance for stating multidimensional data successively carry out With operation, when corresponding to a kind of data type to be worth for 0 bit, by the type bit map of the multidimensional data with it is described The type bit map in permission index data obtained in advance successively carries out union;
Determination unit, for when operation result is identical as any kind bit map in the permission index data, then will Sub-portfolio type bit map of any kind bit map as the multidimensional data.
14. device according to claim 12, which is characterized in that described device, further includes:
Third obtains module, the corresponding type bit map of each dimension data for obtaining limited authority;
Third determining module, the corresponding permission index information of each dimension data for determining the limited authority, the permission Each dimension data of the corresponding permission index information of limited each dimension data and the limited authority is in the permissions data Storage region it is corresponding;
First memory module, the corresponding type bit map of each dimension data and permission for sequentially storing the limited authority Index information obtains permission index data.
15. device according to claim 12, which is characterized in that described device, further includes:
Collection module, for collecting each dimension data and corresponding authority information of limited authority;
Second memory module is weighed for sequentially storing each dimension data and corresponding authority information of the limited authority Limit data;Wherein, storage region of each dimension data of the limited authority in the permissions data and the permission index The corresponding permission index information of each dimension data of limited authority described in data is corresponding.
16. device according to claim 15, which is characterized in that second enquiry module, comprising:
First determination unit obtains in advance for being determined according to the corresponding permission index information of the sub-portfolio type bit map Permissions data in corresponding storage region;
Query unit, for inquiring data phase one corresponding with the sub-portfolio type bit map in determining storage region The data of the limited authority of cause;
Second determination unit, for when inquire the consistent permission of data corresponding with the sub-portfolio type bit map by When the data of limit, using authority information corresponding to the data of the limited authority inquired as the authority information inquired.
17. device described in any claim in 2 to 16 according to claim 1, which is characterized in that institute's device, further includes:
4th obtains module, and for obtaining data to be updated and updating operation information, the data to be updated, which include at least, to be corresponded to Data type information, data length information and data content information;
Third enquiry module, for determining the type of the data to be updated according to the data type information of the data to be updated Bit map, and the type bit map that whether there is the data to be updated is inquired in the permission index data;
Update module, for updating the permission index data and the permission according to query result and the update operation information Content in data.
18. device according to claim 17, which is characterized in that the update module, comprising:
First storage unit, for being the type that the data to be updated are not present in the permission index data when query result Bit map, and when the update operation information carries data to be updated corresponding authority information, in pair of the permissions data Position is answered to store the data to be updated and corresponding authority information;
Second storage unit, for the storage location according to the data to be updated and corresponding authority information in the permission rope Argument according in store the data to be updated type bit map and corresponding permission index information.
19. device according to claim 17, which is characterized in that the update module, comprising:
First query unit, for being that there are the type ratios of the data to be updated in the permission index data when query result Special bitmap, and when carrying the corresponding authority information of the data to be updated in the update operation information, it is indexed in the permission The corresponding permission index information of type bit map of the data to be updated is inquired in data;
Second query unit, for determining that the permission index information that inquires corresponds to the storage region of the permissions data, and The data with the consistent limited authority of data to be updated are searched in the storage region;
First updating unit, for when finding the data with the consistent limited authority of data to be updated, according to described Update the corresponding authority information of the data to be updated carried in operation information update it is finding with the data to be updated The corresponding authority information of the data of consistent limited authority.
20. device according to claim 19, which is characterized in that the update module, further includes:
It is inserted into unit, for when not finding the data with the consistent limited authority of data to be updated, in the storage The corresponding position in region is inserted into the data to be updated and corresponding authority information;
The first adjustment unit, for adjusting the storage location of other content in the permissions data;
Second updating unit, for updating the permission according to the storage location of the data to be updated and corresponding authority information The corresponding permission index information of type bit map of data to be updated described in index data, and according to the power adjusted The storage location of other content is updated corresponding permission index information in the permission index data in limit data.
21. device according to claim 19, which is characterized in that the update module, further includes:
First delete unit, for when updated authority information show it is consistent with the data to be updated in the permissions data Limited authority data it is unrestricted when, delete from the permissions data with the consistent limited authority of data to be updated Data and corresponding authority information;
Second adjustment unit, for adjusting the storage location of other content in the permissions data;
Second deletes unit, for will be corresponding with the data of the consistent limited authority of data to be updated in the permissions data Permission index information deleted from the permission index data;
Third adjustment unit, for the storage location according to other content in the permissions data adjusted to the permission rope Argument corresponding permission index information in is updated.
22. device according to claim 19, which is characterized in that the update module, comprising:
Third query unit, for being that there are the type ratios of the data to be updated in the permission index data when query result Special bitmap, and inquired in the permission index data described to be updated when carrying deletion instruction in the update operation information The corresponding permission index information of the type bit map of data;
4th query unit, for determining that the permission index information that inquires corresponds to the storage region of the permissions data, and The data with the consistent limited authority of data to be updated are searched in the storage region;
Third deletes unit, for when finding the data with the consistent limited authority of data to be updated, according to described Update the deletion that carries in operation information indicate to delete from the permissions data with the consistent permission of data to be updated by The data of limit and corresponding authority information;
4th adjustment unit, for adjusting the storage location of other content in the permissions data;
Third updating unit, the type bit map for updating data to be updated described in the permission index data are corresponding Permission index information, and according to the storage location of other content in the permissions data adjusted to the permission index data In corresponding permission index information be updated.
CN201310452309.XA 2013-09-27 2013-09-27 The permission querying method and device of multidimensional data Active CN104516888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310452309.XA CN104516888B (en) 2013-09-27 2013-09-27 The permission querying method and device of multidimensional data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310452309.XA CN104516888B (en) 2013-09-27 2013-09-27 The permission querying method and device of multidimensional data

Publications (2)

Publication Number Publication Date
CN104516888A CN104516888A (en) 2015-04-15
CN104516888B true CN104516888B (en) 2019-03-26

Family

ID=52792207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310452309.XA Active CN104516888B (en) 2013-09-27 2013-09-27 The permission querying method and device of multidimensional data

Country Status (1)

Country Link
CN (1) CN104516888B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10652248B2 (en) * 2016-07-28 2020-05-12 Molecula Corp. Systems and methods of managing data rights and selective data sharing
CN109857747B (en) * 2018-12-18 2021-07-13 百度在线网络技术(北京)有限公司 Data synchronous updating method, system and computer equipment
CN111552520B (en) * 2020-04-10 2021-07-27 武汉思普崚技术有限公司 User-defined application identification method and system
CN112115175B (en) * 2020-09-21 2023-04-28 成都知道创宇信息技术有限公司 Cloud service product processing method and device, electronic equipment and storage medium
CN112578356B (en) * 2020-12-25 2024-05-17 上海商汤临港智能科技有限公司 External parameter calibration method and device, computer equipment and storage medium
CN113032768B (en) * 2021-03-31 2021-11-16 广州锦行网络科技有限公司 Authentication method, device, equipment and computer readable medium
CN113938716B (en) * 2021-09-29 2024-03-22 北京风行在线技术有限公司 Video authentication method and system based on bitmap storage
CN117874314B (en) * 2024-03-13 2024-05-10 时粤科技(广州)有限公司 Information visualization method and system based on big data processing

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593260A (en) * 2009-07-03 2009-12-02 杭州华三通信技术有限公司 A kind of application process of privileges of management system and device
CN101621518A (en) * 2009-07-20 2010-01-06 厦门敏讯信息技术股份有限公司 Method for managing permission
CN101894231A (en) * 2010-07-19 2010-11-24 上海三零卫士信息安全技术有限公司 Permission expansion control system and method thereof
CN102904877A (en) * 2012-09-11 2013-01-30 曙光信息产业(北京)有限公司 Binary serialization role permission management method based on cloud storage

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8913596B2 (en) * 2008-02-01 2014-12-16 Orange Method and device for regulating sending in a wireless telecommunication network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101593260A (en) * 2009-07-03 2009-12-02 杭州华三通信技术有限公司 A kind of application process of privileges of management system and device
CN101621518A (en) * 2009-07-20 2010-01-06 厦门敏讯信息技术股份有限公司 Method for managing permission
CN101894231A (en) * 2010-07-19 2010-11-24 上海三零卫士信息安全技术有限公司 Permission expansion control system and method thereof
CN102904877A (en) * 2012-09-11 2013-01-30 曙光信息产业(北京)有限公司 Binary serialization role permission management method based on cloud storage

Also Published As

Publication number Publication date
CN104516888A (en) 2015-04-15

Similar Documents

Publication Publication Date Title
CN104516888B (en) The permission querying method and device of multidimensional data
CN104967679B (en) Information recommendation system, method and device
CN106202367B (en) A kind of processing method and processing device of object information
US20170091335A1 (en) Search method, server and client
CN104253740B (en) Picture is registered method, Apparatus and system
CN104035948A (en) Geographic position display method and device
CN106708554B (en) Program operating method and device
CN104699973A (en) Method and device for controlling logic of questionnaires
CN106612250A (en) Resource utilization authority judgment system and method
CN106202441A (en) Data processing method based on relevant database, device and system
CN110019840A (en) The method, apparatus and server that entity updates in a kind of knowledge mapping
CN107040610A (en) Method of data synchronization, device, storage medium, terminal and server
CN108809805B (en) Information interaction method and system and public account client
CN103491245A (en) Method and device for storing short messages and terminal equipment
CN110597793A (en) Data management method and device, electronic equipment and computer readable storage medium
CN104239316B (en) Search the method and device of object
CN104281610B (en) The method and apparatus for filtering microblogging
CN104134043A (en) Method and device for hiding contents, method and device for unhiding contents, and terminals
CN106682189A (en) Filename display method and device
CN110069446A (en) Mobile terminal document management method, mobile terminal, device and storage medium
CN106708500B (en) Unload the display methods and device at interface
CN111274463A (en) Information display method and device based on IM contact person grouping setting and storage medium
CN108270660A (en) The quickly revert method and device of message
CN115065609A (en) B-end SaaS system hybrid deployment method and system
CN104424321A (en) File directory obtainment method and file directory obtainment device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant