Summary of the invention
The technical matters that the application will solve for a large amount of renewal and the regular quantity of huge number of users, consequent user and can upgrade quantity situation huge equally, improve the efficiency of user data update, realize second level/Millisecond calculate the real-time query of crowd's rule that user meets in real time, and the result of acquisition is supplied to audience objective in more high efficiency mode.
In view of this, the application provide a kind of user of renewal the method for rule that meets, wherein, comprising:
Obtain the user data of user to be updated, according to the attribute of described user data, described user data is divided into different classes of multiple user tag;
According to the classification information of described user tag, update process is carried out to described user tag, with search change user tag and recalculate the user tag of described change the rule that meets.
Preferably, wherein, the classification information of described user tag comprises dynamically, and described dynamic user tag is the user tag that attribute changes with environmental change
Further, update process is carried out to described user tag, also comprises:
Set up described mapping relations, comprise regular expression and hit to the bitmap whether mapping relations of clause's expression formula, user and clause's expression formula hit the mapping relations that relation and user hit regular expression to the mapping relations of regular expression, dynamic user tag to the mapping relations of clause's expression formula, clause's expression formula;
The user data of the user data of user to be updated and original customer data base is compared, searching the dynamic user tag of change, as do not found, returning, as found, entering next step;
Search some clause's expression formulas that the dynamic user tag of described change is corresponding in described dynamic user tag to the mapping relations of clause's expression formula;
For some clause's expression formulas of described correspondence, carry out the traversal whether described user to be updated hit clause's expression formula and calculate, obtain the hit relation of described user to be updated and described corresponding some clause's expression formulas;
By described hit relation and described travel through calculate before the described bitmap relation of hit compare, find the hit relation of change;
Hit relation for described change is not hit from hitting to become, then search this clause's expression formula corresponding to hit relation in described clause's expression formula to some regular expressions corresponding to the mapping relations of regular expression, and some regular expressions of described correspondence are deleted from the mapping relations of the regular expression of described user's hit to be updated;
Hit relation for described change becomes hit from not hitting, then the bitmap of the clause's expression formula corresponding to described user to be updated and this hit relation being hit renewal is uploaded in described bitmap hit relation, and search this clause's expression formula corresponding to hit relation in described clause's expression formula to some regular expressions corresponding to the mapping relations of regular expression, some regular expressions of described correspondence are increased in the mapping relations of the regular expression of described user's hit to be updated.
Preferably, carry out update process to described user tag also to comprise:
According to described dynamic user tag content, described dynamic user tag is divided into can enumerate class, can not enumerate can index class and can not enumerate can not index class;
Attribute storage of array is set up to described enumerable dynamic user tag, and adopts filtering query method to inquire about; To can not enumerating but the dynamic user tag of index can setting up search tree and store, and indexing method is adopted to inquire about; To can not enumerating and the dynamic user tag of index can not dividing range storage, and storage is numbered to scope, and adopt can search index method and can filtering query method query composition.
Preferably, each described dynamic user tag has the timestamp of record latest update time.
Further, carry out update process to described user tag also to comprise:
Receive Policy Updates requests, contrast by carrying out classified inquiry to described dynamic user tag, set up user the new mapping relations of rule that meet.
Preferably, the classification information of described user tag also comprises position, and the user tag of described position is the user tag that attribute is relevant to Time and place position.
Further, carry out update process to described user tag also to comprise:
Spatial index numbering is set up to all users, the mapping relations that the unique global identity setting up described user and the spatial index stating foundation are numbered;
Transmit the user data of user to be updated, distribute local identification code to described user to be updated, set up the mapping relations of spatial index numbering and local identification code;
The user data of described user to be updated and original customer data base are compared, if described user to be updated did not exist in the past, then set up new spatial index numbering, if described user to be updated is original user, then check whether described spatial index numbering changes, described spatial index is numbered to the attribute information then upgrading the user tag of the position of described user to be updated do not changed, described spatial index is numbered to the original local identification code of the described user to be updated of then deletion changed, set up new local identification code, and upgrade the mapping relations that local identification code and described spatial index number.
Further, in the user data process of described transmission user to be updated, adopt Distributed Message Queue mode to carry out Data Update decoupling zero to described user data, and by key signature character, cutting is carried out to the data of described user data.
Preferably, hibert curve is adopted to set up spatial index numbering to all users.
Further, set up spatial index to the user tag of described position also to comprise:
Carry out again delivery to the spatial index numbering of described foundation to divide.
Preferably, carry out update process to described user tag to comprise:
Be stored in by the attribute information of the user tag of described position in continuous print buffer memory, described buffer memory has a skew Compass being following table with local identification code.
Preferably, carry out update process to described user tag also to comprise:
According to the frequent degree of variation of the user tag of the position of described user to be updated, dynamically setting upgrades threshold values, upgrades when the variation of the user tag of the position of described user to be updated exceedes described renewal threshold values again.
Preferably, in the process of the update process method of the user tag to described position, also comprise, supported data is expired, by dynamic setting data expiration period, deletes the data exceeding data expiration period and upgrade not yet.
Preferably, the classification of described user tag is also comprised to the user tag of slip, the user tag of described slip is the constant but user tag changed with environmental change of attribute itself.
Preferably, carry out update process to described user tag also to comprise:
Adopt different storage mode in order to upgrading and inquiry according to the frequent degree of user tag of sliding, the user tag for the high slip of frequent degree adopts matrix storage mode; User tag for the low slip of frequent degree adopts storage of linked list mode.
Preferably, the classification information of described user tag also comprises context and static state, described contextual user tag is that attribute is with the simultaneous user tag of condition, the user tag of described static state is the user tag that attribute is fixed, contextual user tag described in the process of function determining method is set up in employing, adopts and sets up user tag static described in indexing means process.
Present invention also provides a kind of user of renewal the system of rule that meets, wherein, comprising:
First device, in order to obtain the user data of user to be updated, according to the attribute of described user data, is divided into different classes of multiple user tag by described user data;
Second device, according to the classification information of described user tag, carries out update process to described user tag, with search change user tag and recalculate the user tag of described change the rule that meets.
Preferably, the classification information of described user tag comprises dynamically, and described dynamic user tag is the user tag that attribute changes with environmental change.
Preferably, described dynamic engine server second device comprises the first engine, and described first engine carries out update process to described dynamic user tag:
Set up described mapping relations, comprising: regular expression hits to the bitmap whether the inverted list mapping relations of clause's expression formula, user and clause's expression formula hit the inverted list mapping relations that relation and user hit regular expression to the inverted list mapping relations of regular expression, dynamic user tag to the mapping relations of clause's expression formula, clause's expression formula;
The user data of the user data of user to be updated and original customer data base is compared, searching the dynamic user tag of change, as do not found, returning, as found, entering next step;
Search some clause's expression formulas that the dynamic user tag of described change is corresponding in described dynamic user tag to the mapping relations of clause's expression formula;
For some clause's expression formulas of described correspondence, carry out the traversal whether described user to be updated hit clause's expression formula and calculate, obtain the hit relation of described user to be updated and described corresponding some clause's expression formulas;
By described hit relation and described travel through calculate before the described bitmap relation of hit compare, find the hit relation of change;
Hit relation for described change is not hit from hitting to become, then search this clause's expression formula corresponding to hit relation in described clause's expression formula to some regular expressions corresponding to the mapping relations of regular expression, and delete the mapping relations of the regular expression that some regular expressions of described correspondence are hit from the user of described user to be updated;
Hit relation for described change becomes hit from not hitting, then the bitmap of the clause's expression formula corresponding to described user to be updated and this hit relation being hit renewal is uploaded in described bitmap hit relation, and search this clause's expression formula corresponding to hit relation in described clause's expression formula to some regular expressions corresponding to the mapping relations of regular expression, some regular expressions of described correspondence are increased in the mapping relations of the regular expression of user's hit of described user to be updated.
Further, described first engine carries out update process to described user tag, also comprises:
According to described dynamic user tag content, described dynamic user tag is divided into can enumerate class, can not enumerate can index class and can not enumerate can not index class;
Attribute storage of array is set up to described enumerable dynamic user tag, and adopts filtering query method to inquire about; To can not enumerating but the dynamic user tag of index can setting up search tree and store, and indexing method is adopted to inquire about; To can not enumerating and the dynamic user tag of index can not dividing range storage, and storage is numbered to scope, and adopt can search index method and can filtering query method query composition.
Preferably, each described dynamic user tag corresponding stored has the timestamp of a record latest update time.
Further, described first engine carries out update process to described user tag, also comprises:
Receive Policy Updates requests, contrast by carrying out classified inquiry to the dynamic user tag of user, set up user the new mapping relations of rule that meet.
Preferably, the classification information of described user tag comprises position, and the user tag of described position is the user tag that attribute is relevant to Time and place position.
Preferably, described second device also comprises some second engines, and in order to process the user tag of described position, the framework of described second engine comprises:
First module, in order to receive and to transmit the user data of described user to be updated;
Second module, in order to transmit and to distribute the user data of described user to be updated;
3rd module, in order to transmission also dispatch user inquiry request Sum fanction update request; And
Four module, in order to upgrade the user tag of described position and to return results.
Further, the user tag of described four module to described position upgrades and the process returned results, and comprising:
Spatial index numbering is set up to all users, sets up the mapping relations that unique global identity of described user and described spatial index are numbered;
Transmit the user data of user to be updated, distribute local identification code to described user to be updated, set up the mapping relations of spatial index numbering and local identification code;
The user data of described user to be updated and original customer data base are compared, if described user to be updated did not exist in the past, then set up new spatial index numbering, if described user to be updated is original user, then check whether described spatial index numbering changes, described spatial index is numbered to the attribute information then upgrading the user tag of the position of described user to be updated do not changed, described spatial index is numbered to the original local identification code of the described user to be updated of then deletion changed, set up new local identification code, and upgrade the mapping relations that local identification code and described spatial index number.
Further, described some first modules adopt Distributed Message Queue mode to carry out Data Update decoupling zero to the user tag of described position, and carry out cutting by key signature character to the data of the user tag of position.
Preferably, set up in the process of spatial index in the user tag of described second engine to described position, four module adopts the user tag of hibert curve to described position to set up spatial index numbering.
Further, set up in the process of spatial index in the user tag of described second engine to described position, also comprise and delivery division is carried out to the spatial index numbering of described foundation again.
Preferably, described second engine carries out update process to described user tag and also comprises:
Be stored in by the attribute information of the user tag of described position in continuous print buffer memory, described buffer memory has a skew Compass being following table with local identification code.
Preferably, described second engine carries out update process to described user tag and also comprises:
According to the frequent degree of variation of the user tag of the position of described user to be updated, dynamically setting upgrades threshold values, upgrades when the variation of the user tag of the position of described user to be updated exceedes described renewal threshold values again.
Preferably, at described second engine in the process of the update process method of the user tag of described position, also comprise, dynamic setting data expiration period, delete the data exceeding data expiration period and upgrade not yet.
Preferably, the classification information of described user tag also comprises slip, and the user tag of described slip is the user tag that attribute is relevant to Time and place position.
Preferably, described second device also comprises some 3rd engines, described 3rd engine, to the update process method of the user tag of described slip, comprises described 3rd engine and adopts different storage mode in order to upgrading and inquiry according to the frequent degree of user tag of sliding: the user tag for the high slip of frequent degree adopts matrix storage mode; User tag for the low slip of frequent degree adopts storage of linked list mode.
Preferably, described renewal user the system of rule that meets also comprise some mirror nodes, each described first engine, each described second engine and each described 3rd engine have at least one mirror nodes to provide service.
Preferably the classification information of described user tag also comprises context and static state, described contextual user tag be attribute with the simultaneous user tag of condition, the user tag of described static state is the fixing user tag of attribute.
Optionally, described system also comprises the 3rd device, and described 3rd device adopts sets up user tag static described in indexing means update process, and context information label described in the direct update process of described first device also returns result.
Preferably, described second device divides duty and is absorbed in the user tag being responsible for process correspondence.
Compared with prior art, renewal user described in the application the method for rule that meets by according to the data activity degree of user tag and content, user tag is divided into dynamic user tag, the user tag of position and the user tag of slip etc. are without the label of class, and adopt different update process methods for inhomogeneous label, especially update process method is fast and effectively adopted to upgrading the most dynamic user tag, improve processing power and the processing speed of system of users update request, and then raising user meets the real-time update of rule and inquires about with the efficiency improving user data update,
Further, described in the application to the update process method of described dynamic user tag by setting up some mapping relations, utilize mapping relations to carry out inquiring about and calculating, be equivalent to carry out buffer memory from fine granularity to query count result, therefore significantly accelerate calculating; Simultaneously by calculating relevant clause's expression formula of dynamic user tag, beta pruning has been carried out from calculating, therefore significantly decrease calculated amount, and then significantly improve counting yield, improve user further and meet the real-time update of rule and inquire about with the efficiency improving user data update.
In addition, the application by set up described renewal user the system of rule that meets, adopt distributed rule computing architecture, comprise the Computational frame to the Distributed Architecture of division and user tag setting up user tag and the user tag of position, achieve reasonable distribution and the process in real time of user tag, improve the processing speed of user's update request further.
Embodiment
In the application one typically configuration, the equipment of terminal, service network and trusted party include one or more processor (CPU), input/output interface, network interface and internal memory.
Internal memory may comprise the volatile memory in computer-readable medium, and the forms such as random access memory (RAM) and/or Nonvolatile memory, as ROM (read-only memory) (ROM) or flash memory (flashRAM).Internal memory is the example of computer-readable medium.
Computer-readable medium comprises permanent and impermanency, removable and non-removable media can be stored to realize information by any method or technology.Information can be computer-readable instruction, data structure, the module of program or other data.The example of the storage medium of computing machine comprises, but be not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic RAM (DRAM), the random access memory (RAM) of other types, ROM (read-only memory) (ROM), Electrically Erasable Read Only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc ROM (read-only memory) (CD-ROM), digital versatile disc (DVD) or other optical memory, magnetic magnetic tape cassette, magnetic disk stores or other magnetic storage apparatus or any other non-transmitting medium, can be used for storing the information can accessed by computing equipment.According to defining herein, computer-readable medium does not comprise non-temporary computer readable media (transitorymedia), as data-signal and the carrier wave of modulation.
The core concept of the application is, calculate in real time be in order to mass data-namely number of users, regular quantity and renewal quantity huge data-this basis on, the data changed in real time in short time are calculated fast, return results in real time, help audience (such as advertiser or seller) to inquire rapidly and meet crowd.The data wherein changed in real time comprise user tag (such as positional information, turnover etc.) real-time update and to the real-time establishment of crowd's rule and renewal.
In conjunction with above-mentioned core concept, embodiments provides in the application's one real time updating method and the real-time update system that a kind of user of providing meets rule.By the attribute according to user tag, comprise the particular content of data and the active degree of data and the content etc. of user tag storage, user tag is divided into dynamic user tag, the user tag of position and the user tag of slip etc. are without the label of classification, and adopt different update process methods for different classes of label, especially update process method is fast and effectively adopted to the user tag of the position upgrading the most dynamic user tag and content relative complex, thus significantly improve the processing speed of user's update request, and then raising user meets the real-time update of rule and inquires about with the efficiency improving user data update, audience is supplied in more high efficiency mode, realize audience crowd's rule that level/nearest user of Millisecond real-time query meets in second.
Particularly, below in conjunction with drawings and the specific embodiments, the application is described in further detail.
In of the application, provide the real time updating method that a kind of user meets rule, comprising: the user data obtaining user to be updated, according to the attribute of described user data, described user data is divided into different classes of multiple user tag; According to the classification information of described user tag, update process is carried out to described user tag, with search change user tag and recalculate the user tag of described change the rule that meets.
In the one side of the application, the user data of each user comprises a global identity and multiple user tag, when user proposes update request book, obtains multiple user tag of user to be updated.Wherein, in the preferred embodiment of the application's optimum, according to the attribute of described user data, can classify to described user tag, described user tag classification information comprise dynamic user tag, position user tag and, the user tag of sliding, contextual user tag and static state user tag etc.At least comprise dynamic user tag to the classification of described user tag, wherein said dynamic user tag is the user tag that attribute changes with environmental change.In preferred embodiment; The classification of described user tag is also comprised, the user tag of position and, the user tag of sliding, the user tag of described position is the user tag that attribute is relevant to Time and place position; The user tag of described slip is the constant but user tag changed with environmental change of attribute itself.; In other embodiments, can also comprise the classification of described user tag, the user tag of contextual user tag and static state., described contextual user tag be attribute with the simultaneous user tag of condition, the user tag of described static state is the fixing user tag of attribute.
Fig. 4 is the division schematic diagram to user tag according to the application aspect, illustrate below in conjunction with Fig. 4, describe the specific descriptions of user tag attribute different classes of in the better preferred embodiment of the application one in detail, in the application one preferred embodiment, described user tag 100 is divided into following a few class: dynamic user tag 101, the user tag 103 of position, the user tag 105 of sliding, contextual user tag 107 and static user tag 109, the user tag 100 that described dynamic user tag 101 changes with environmental change for attribute, the commodity that such as user buys, the subscription information etc. of user, the user tag 103 of described position is the user tag 100 that attribute is simultaneously relevant to Time and place position, such as User Activity position etc., the user tag 103 of described position was because both linked up with the time, also link up with user's self space position, therefore the account form of the user tag 103 of position is different from dynamic user tag 101, the user tag 105 of described slip label slippage is that property value itself is constant, but the user tag 100 changed with environmental change attribute, such as pass in time, (in a period of time, transaction stroke count attribute is constant for transaction stroke count in user's nearest a period of time, but the numerical value of transaction stroke count changes in time) etc.Described contextual user tag 107 is that attribute is with the simultaneous user tag 100 of condition, attribute occurs along with condition simultaneously, such as user enjoys that certain are preferential different with the difference of the modes of payments, and the user tag 100 that the user tag 109 of described static labels static state is fixed for attribute, in the indeclinable or relatively long time, indeclinable user tag 100 all can incorporate the user tag 109 into static labels static state into, the age, sex, name etc. of such as user.Wherein all need to calculate in real time to the user tag 103 of described dynamic user tag 101, position, the user tag 105 of sliding and the user tag 105 of sliding.The user tag 109 of described contextual user tag 107 and static state is not high to real-time calculation requirement.
All be described for this mode classification in subsequent embodiment, certain those skilled in the art will be understood that the description of above-mentioned tag types is only citing, other divisions user tag 100 or user data carried out according to data activity degree and content and adopt different processing modes to carry out method and the modification thereof of update process, or other dividing mode, such as comprise dynamic user tag 101, the user tag 105 of sliding in conjunction with the division methods etc. of other tag types well-known to those skilled in the art, all within the thought range of the application.Can be consulted to determine by audience and developer to according to above-mentioned category division in which classification concrete as concrete user tag 100, repeat no more.
In user tag 100, described dynamic user tag 101 is that memory data output is maximum, the class user tag 100 that data variation frequency is the highest, therefore the key technical problem that the real-time update of dynamic user tag 101 and real-time query become the application can how be realized, in in of the embodiment of the present application, to the core concept that the update process method of described dynamic user tag 101 is be: by setting up some mapping relations, some described dynamic user tag 101 and regular expression, hit relation between clause's expression formula and between described regular expression and described clause's expression formula or the mapping relations of corresponding relation, utilize described mapping relations, find clause's expression formula that the described dynamic user tag 101 of change is relevant, and the regular expression finding described relevant clause's expression formula corresponding, the situation of change of relation is hit according to described relevant clause's expression formula, to the dynamic user tag of described change the rule of the described correspondence of rule that meets upgrade.
In preferred embodiment, the update process method of described dynamic user tag 101 is specifically comprised:
Step S01: set up some mapping relations, comprises regular expression and hits to the bitmap whether mapping relations of clause's expression formula, user and clause's expression formula hit the mapping relations that relation and user hit regular expression to the mapping relations of regular expression, dynamic user tag to the mapping relations of clause's expression formula, clause's expression formula;
Step S02: compared by the user data of the user data of user to be updated and original customer data base, searching the dynamic user tag of change, as do not found, returning, as found, entering next step;
Step S03: search some clause's expression formulas that the dynamic user tag of described change is corresponding in described dynamic user tag to the mapping relations of clause's expression formula;
Step S04: for some clause's expression formulas of described correspondence, carries out the traversal whether described user to be updated hit clause's expression formula and calculates, obtain the hit relation of described user to be updated and described corresponding some clause's expression formulas;
Step S05: by described hit relation and described travel through calculate before the described bitmap relation of hit compare, find the hit relation of change;
Step S06: the hit relation for described change is not hit from hitting to become, then search this clause's expression formula corresponding to hit relation in described clause's expression formula to some regular expressions corresponding to the mapping relations of regular expression, and delete the mapping relations of the regular expression that some regular expressions of described correspondence are hit from the user of described user to be updated;
Step S07: the hit relation for described change becomes hit from not hitting, then the bitmap of the clause's expression formula corresponding to described user to be updated and this hit relation being hit renewal is uploaded in described bitmap hit relation, and search this clause's expression formula corresponding to hit relation in described clause's expression formula to some regular expressions corresponding to the mapping relations of regular expression, some regular expressions of described correspondence are increased in the mapping relations of the regular expression of user's hit of this user to be updated.
Update process method described in the application supports the real-time update of the dynamic user tag 101 of user, support the real-time query from the user tag (Field) of user (User) to rule (Group), each user is made up of a unique identity code (ID) and multiple user tag 100, the regular expression (Gid) that user meets comprises multiple and (AND) structured query sentence (SQL, StructuredQuery, SQL statement in regular expression can split into one or more clause's expression formula (Cid), that is: gid->{cid}+, each clause's expression formula only comprises a relation, clause's expression formula (Cid) wherein in numerous regular expression is much what repeat, such as { ' sex ': ' man ' }, { ' age ', ' 15 ~ 20 ' } etc., query count amount is saved by setting up mapping relations, wherein, in the following description, mapping relations comprise corresponding corresponding table and corresponding inverted list etc.
Particularly, table one is the update process method false code schematic diagram of described dynamic user tag 101, for making description more accurately clear, below with reference to table one, is described further the update process method of described dynamic user tag 101:
In described step S01, set up described mapping relations, described mapping relations comprise: regular expression is to the correspondence table (Gid->Cids) of clause's expression formula, clause's expression formula is to the inverted list (Cid->Gids) of regular expression, dynamic user tag 101 is to the inverted list (Field->Cids) of clause's expression formula, bitmap hit relation (User+Cid->Bitmap) whether user and clause's expression formula hit and user hit the inverted list (User->Gids) of regular expression,
In described step S02, after receiving user (User) update request, the user data of the user data of user to be updated and original customer data base is compared, search the dynamic user tag 101 (Field) of one or more change, as do not found, returning, as found, entering step S13;
In described step S03, for the dynamic user tag 101 of described change, search some clause's expression formulas (Cid) that the dynamic user tag 101 of described change is corresponding in described dynamic user tag 101 to the inverted list (Field->Cids) of clause's expression formula, form clause's expression formula set (CidSet);
In described step S04, to the inner corresponding some clause's expression formulas (Cid) of described clause's expression formula set (CidSet), carry out the traversal whether described user to be updated hit clause's expression formula and calculate (Cid+User), obtain the hit relation (the hit relation of User+Cid) of this user and the clause's expression formula in the set of described relevant clause's expression formula;
In described step S04, ((User+Cid->Bitmap) carries out correlation ratio pair to the hit bitmap of this user obtained by described step S14 corresponding dynamic user tag 101 and clause's expression formula before calculating with traversal to the hit relation of the hit relation (the hit relation of User+Cid) of the clause's expression formula in the set of described relevant clause's expression formula, find the hit relation of change, if hit relation from before hit become and do not hit now (relation of hitting is from True>False), then hit relationship change and be labeled as T, if hit relation from before do not hit and become present hit (hit relation from False->True), then hit relationship change and be labeled as F,
In described step S06, described hit relationship change is labeled as to corresponding clause's expression formula of T, the inverted list (Cid->Gids) of clause's expression formula to regular expression is searched to each clause's expression formula, obtain corresponding some regular expressions (Gid), composition rule expression formula set (Gidset), hits each regular expression in regular expression set (Gidset) described in each inverted list (User->Gids) of regular expression from described user and deletes;
In described step S07, described hit relationship change is labeled as to the clause of F, then the bitmap of the clause's expression formula corresponding to described user to be updated and this hit relation is hit renewal to be uploaded to described bitmap and to hit relation (in (User+Cid->Bitmap), and search this clause's expression formula corresponding to hit relation in described clause's expression formula to some regular expressions (Cid->Gids) corresponding to the inverted list of regular expression, some regular expressions of described correspondence are increased in the inverted list (User->Gids) of the regular expression of user's hit of described user to be updated.
In sum, described in the application to the update process method of described dynamic user tag 101 by a regular expression is split into multiple clause's expression formula, and set up some mapping relations, mapping relations are utilized to carry out inquiring about and calculating, be equivalent to carry out buffer memory from fine granularity to query count result, therefore significantly accelerate calculating; Simultaneously by calculating relevant clause's expression formula of dynamic user tag 101, carrying out beta pruning from calculating, therefore significantly having decreased calculated amount, and significantly having improve counting yield.
Those skilled in the art will be understood that the description of the above-mentioned update process method to described dynamic user tag 101 is only citing, other modification of carrying out according to the intention of the update process method of the dynamic user tag 101 of the application, comprise the change or corresponding table of comparisons title etc. of false code, programming language, all within the thought range of the application.
Table one: the update process method false code schematic diagram of described dynamic user tag
In the application one embodiment another aspect, the update process method of described dynamic user tag is also comprised: store according to described dynamic user tag 101 classifying content, specifically comprise: described dynamic user tag 101 is divided into can enumerate class, can not enumerate can index class and can not enumerate can not index class; Attribute storage of array is set up to described enumerable dynamic user tag 101, and adopts filtering query method to inquire about; To can not enumerating but the dynamic user tag 101 of index can setting up search tree and store, and indexing method is adopted to inquire about; To can not enumerating and the dynamic user tag 101 of index can not dividing range storage, and storage is numbered to scope, and adopt can search index method and can filtering query method query composition.
Further, in the particular embodiment, for described enumerable dynamic user tag 101, obtain numerical value by dictionary, such as, for men and women's attribute, 0 and 1 can be set, then using an attribute that this 0 and 1 numerical value records as dynamic user tag 101, be put in attribute array, can storage be merged for enumerable dynamic user tag 101, and then save internal memory.For can not to enumerate but can the dynamic user tag 101 of index, by setting up search tree (B+tree), the key (Key) of search tree is field value, and value (Value) is hit value, forms hit list (Postinglist).Because B+ tree supports the upper limit (Lower_bound), lower limit is searched (Upper_bound), and natural support range query (Rangequery), also can support that boolean queries (Booleanquery) is therefore inquired about fast easy.For can not to enumerate and can not the dynamic user tag 101 of index, stroke count of such as such as concluding the business, first by carrying out range number to scope, can do concrete range filter after being filtered by range number again, thus saves computing cost, reduces computing time.
In addition, in the application one preferred embodiment, each described dynamic user tag 101 has the timestamp of record latest update time, the order upgraded due to dynamic user tag 101 may be indefinite, therefore by configuring the timestamp of a record latest update time for each described dynamic user tag 101, the latest update time of each label can be recorded, to prevent from being covered by old update request.Wherein, in preferred embodiment, set a timestamp to each dynamic user tag 101, wherein timestamp can be made up of an array, and can deposit continuously.
Upgrade described in the application user the method for rule that meets, also comprise the request of real-time reception Policy Updates, by carrying out classified inquiry contrast to the dynamic user tag 101 of user, obtain the mapping table set up and meet the user of new regulation.When Policy Updates, according to new Rule content, adopt the dynamic user tag 101 that different querying method inquiry storage modes is different, obtain the dynamic user tag 101 meeting the user of new rule and gather.By setting up different storage modes to different dynamic user tag 101 and inquiry mode can save internal memory in a large number, and reduce query count amount in a large number, and then lower query time, improve real-time.
Those skilled in the art will be understood that and are above-mentionedly only citing to during described Policy Updates to the description of the disposal route of dynamic user tag 101, other according to the application to during described Policy Updates to the modification that the disposal route of dynamic user tag 101 is carried out, comprise false code, the change of programming language, memory attribute numerical value and memory word name section etc., all within the thought range of the application.
In the application one preferred embodiment, to the process of the update process of the described user tag in position, comprise the following steps:
S11: spatial index numbering is set up to all users, and the mapping relations setting up that the global identity of described user and described spatial index number;
S12: the user data transmitting user to be updated, distributes local identification code to described user to be updated, sets up the mapping relations of spatial index numbering and local identification code;
S13: the user data of described user to be updated and original customer data base are compared, if described user to be updated did not exist in the past, then set up new spatial index numbering, if described user to be updated is original user, then check whether described spatial index numbering changes, described spatial index is numbered to the attribute information then upgrading the user tag 103 of the position of described user to be updated do not changed, described spatial index is numbered to the original local identification code of the described user to be updated of then deletion changed, set up new local identification code, and upgrade the mapping relations that local identification code and described spatial index number.
The positional information (such as longitude and latitude, road name etc.) of real-time update user can be met in the update process method of the user tag 103 of position, crowd's quantity of the energy a certain position of real-time query described in the application.The process to the update process of the described user tag 103 in position described in the application is described in detail below in conjunction with specific embodiment.
In described step S11, the mapping relations that global identity (UserID) and the described spatial index of setting up spatial index numbering and described user to all users are numbered, in preferred embodiment, hibert curve can be have employed spatial index numbering (Key) is set up to all users.To comparatively stablizing user data, such as sex, possession, age bracket can use filtrator (Filter) to filter.In addition; delivery can also be carried out to each spatial index numbering to divide again; according to the central processing unit number of system; some piecemeals (Block) can be divided into; parallel amount can be strengthened; such as according to the central processing unit number of system; some piecemeals (Block) can be divided into; at each piecemeal; in order to parallel amount can be strengthened; carry out delivery division again to data, be such as divided into 10 block (concrete numeral can be determined according to system processing power), each block is responsible for Data Update and the inquiry of 1/10 of a piecemeal.Wherein, in the index stores first order of described Block, tree table (Btreemap) can be used to store, Key is spatial index key, value (Value) is skew (Offset) pointed hit list (Postinglist), and described method can high search index efficiency.
In described step S12, transmit the user data of user to be updated, distribute local identification code (Localid) to described user to be updated, set up spatial index and number the corresponding table (Key->Localid) with local identification code.In preferred embodiment, the user data transmitting user to be updated can adopt described second module 305 and described 3rd module 304 to distribute to described processing node process, also described first module 309 can be utilized to adopt the user tag 103 of Distributed Message Queue (MetaQ) mode to described position to carry out Data Update decoupling zero, and carry out cutting by the data of key signature character (Tag) to the user tag 103 of position, in an alternate embodiment of the invention, different key signature characters can be set by identity code (ID) delivery to each user, different back end is responsible for processing a part of key signature character information, thus accomplish dilatation and the capacity reducing of back end easily, and then improve the treatment effeciency of user's update request.
Further, described user has unique overall identity code, a local identification code (localid) increased from 0 can be assigned with after the user tag 103 of the described position of user enters a four module 307, length can be 4 bytes (Bytes), set up described local identification code and described overall identity code mapping relations one to one simultaneously, hit list in spatial index table adopts local identification code to store, by the attribute store of the user tag 103 of described position in continuous print buffer memory, it is lower target skew Compass that described buffer memory has with described local identification code.
In described step S13, when upstream send user more new data time, the user data of described user to be updated and original customer data base are compared, if described user to be updated did not exist in the past, then set up new spatial index numbering (Key), if described user to be updated is original user, then check whether described spatial index numbering (Key) changes, to the attribute information then upgrading the user tag 103 of the position of described user to be updated that described spatial index numbering (Key) does not change, the attribute information of the user tag 103 of described position is stored in a continuous print buffer memory, the attribute information of the user tag 103 of correspondence position can be found by calling skew Compass that the local identification code (Localid) of described buffer memory is following table, thus the attribute information of user is upgraded, to the original local identification code (Localid) of the described user to be updated of then deletion that described spatial index numbering (Key) changes, set up new local identification code, and upgrade the mapping relations that local identification code and described spatial index number.
In preferred embodiment, user tag 103 content of the content of the user tag 103 of the position of reception and the position of original customer data base is compared and upgrades, also comprise in the process upgraded that user tag 103 content of the content of the user tag 103 of the position of reception and the position of original customer data base is compared, according to the frequent degree of variation of the user tag 103 of described position, dynamic setting upgrades threshold values, and upgrade precision according to loading condition setting, upgrade according to the user tag 103 of renewal precision to position.Select to upgrade precision according to the loading condition of system, such as: generally, the variation being greater than 1 meter all upgrades; If the flow of user data is large, the variation that can be greater than more than 5 meters upgrades again; If the data traffic of user is very large, then can be greater than 20 meters and just upgrades.Renewal described here refers to the renewal to spatial index (Key), and the positional information such as latitude and longitude information of user can upgrade as the attribute of the user tag 103 of position always, and affects the accuracy of user data.In addition the longitude and latitude of user has changed, and under certain situation, the spatial index of user does not need to upgrade, and therefore upgrades by described dynamic setting the load pressure that threshold value can alleviate system, improves the processing speed of system.
Those skilled in the art will be understood that the above-mentioned description to described dynamic setting renewal threshold value is only citing, other dynamically set the modification upgrading threshold value and carry out according to the application, comprise and upgrade the scope of threshold value, the change etc. of update mode, all within the thought range of the application.
In the process of the update process method of the user tag 103 to described position, also comprise, supported data is expired, by dynamic setting data expiration period, deletes the data exceeding data expiration period and upgrade not yet.In the particular embodiment, if such as a user has reported primary information, but upload never again (such as turning off application, network loss etc.), the information of so existing reporting of user may be expired invalid over time, therefore needs to remove these data.In concrete realization, a thread can be set up and scan each piecemeal (Block) successively, check that whether every bar record is expired, if expired, user data set can be deleted, and Resource recovery.
In an alternate embodiment of the invention, to the update process method of the user tag 105 of described slip, comprise and adopt different storage mode in order to upgrading and inquiry according to the frequent degree of the user tag 105 of sliding, comprise: the user tag 105 for the high slip of frequent degree adopts matrix storage mode, adopt matrix storage mode array can be used can to travel through fast, to support stochastic searching and to sue for peace to user data when unique user is very frequent; User tag 105 for the low slip of frequent degree adopts storage of linked list mode, does not have the time window of behavior not store, and saves and stores, also save query script.
In addition, in an alternate embodiment of the invention, described update process system also comprises the 3rd device 207, contextual user tag 107 and static user tag 109 can also be comprised to the classification of described user tag 100, set up function determining method get final product update process because described contextual user tag 107 can directly adopt, real-time calculating is simple, therefore can by described first device 204 directly in order to process and to return result.The user tag 109 of described static state can adopt sets up indexing means process, off-line index search can be carried out, described in the user tag 109 of described static state, the 3rd device 207 processes, and described 3rd device 207 pairs of real time handling requirement are not high, can reduce system load and improve treatment effeciency.
In sum, described in the application by according to the data activity degree of user tag 100 and content, user tag 100 is divided into dynamic user tag 101, user tag 103 and the label of user tag 105 grade of sliding without class of position, and adopt different update process methods for inhomogeneous label, especially update process method is fast and effectively adopted to upgrading the most dynamic user tag 101, improve processing power and the processing speed of system of users update request, and then raising user meets the real-time update of rule and inquires about with the efficiency improving user data update, further, described in the application to the update process method of described dynamic user tag 101 by setting up some mapping relations, utilize mapping relations to carry out inquiring about and calculating, be equivalent to carry out buffer memory from fine granularity to query count result, therefore significantly accelerate calculating, simultaneously by calculating relevant clause's expression formula of dynamic user tag 101, beta pruning has been carried out from calculating, therefore significantly decrease calculated amount, and then significantly improve counting yield, improve user further and meet the real-time update of rule and inquire about with the efficiency improving user data update.
In addition, present invention also offers a kind of user of renewal the system of rule that meets, wherein, comprising:
First device, in order to obtain the user data of user to be updated, according to the attribute of described user data, is divided into different classes of multiple user tag by described user data;
Second device, in order to the classification information according to described user tag, carries out update process to described user tag, with search change user tag and recalculate the user tag of described change the rule that meets.
Fig. 5 for upgrade described in the application one embodiment user the described renewal user of the system of rule that meets the system framework schematic diagram of rule that meets; As shown in Figure 5, described renewal user the system of rule that meets comprise first device 204 and the second device 205, wherein:
Described first device 204 is in order to obtain the user data of user to be updated, according to the difference of the attribute of described user data, classify to described user tag 100 and distribute, classification comprises dynamic user tag, the user tag of position, slip user tag etc.;
Described second device 205 receives the user tag 100 that described first device 204 distributes, described different engines is distributed to inhomogeneous user tag 100, adopt different update process methods to carry out renewal to inhomogeneous user tag 100 to return results, wherein said second device 205 at least comprises some first engines 235, described first engine 235 is in order to process described dynamic user tag 101, the update process method of wherein said first engine 235 to dynamic user tag 101 is: set up some described dynamic user tag 101 and regular expression, hit relation between clause's expression formula and between described regular expression and described clause's expression formula or the mapping relations of corresponding relation, utilize described mapping relations, find clause's expression formula that the described dynamic user tag 101 of change is relevant, and the regular expression finding described relevant clause's expression formula corresponding, the situation of change of relation is hit according to described relevant clause's expression formula, to described user to be updated and user the set of rule that meets upgrade.
Described renewal user the system of rule that meets also comprises user's update request interface 201, rule query interface 203, described user's update request interface 201 in order to real-time reception user update request, and obtains the user data comprising a global identity and multiple user tag 100 of user to be updated; Described rule query interface 203 receives real-time rule query request and exports the result of described first device 204 merger in real time return.
In an alternate embodiment of the invention, described update process system can also comprise the 3rd device 207, can also comprise contextual user tag 107 and static user tag 109 to the classification of described user tag 100.Described contextual user tag 107 can adopt sets up the process of function determining method, real-time calculating is simple, and the user tag 109 of described static state can adopt and sets up indexing means process, off-line index search can be carried out, therefore described contextual user tag 107 can directly be processed by first device 201, the 3rd device 207 that the user tag 109 of described static state can utilize real time handling requirement not high processes, and reduces system load and improves treatment effeciency.
Those skilled in the art will be understood that the above-mentioned description to described 3rd device 207 is only citing, other according to the application to during described Policy Updates to the modification that the user tag 109 of contextual user tag 107 and described static state is carried out, comprise the change such as title, memory address, all within the thought range of the application.
In preferred embodiment, each engine in described second device 205 divides duty and is absorbed in is responsible for user tag 100 corresponding to process.Because the variation of user tag 100, when supporting user to use, described real time processing system needs to support the label that hundreds of is thousands of in the future, by setting up the differentiated services supporting user tag 100, user tag 100 is made to accomplish horizontal extension, independent maintenance, system has good extendability and maintainability, can also support different types of tag computation optimization.Therefore, the engine that each label is corresponding only processes the label that oneself is responsible for, if rule does not comprise the label that engine is responsible for, then this engine will not be processed; Equally, if user property does not comprise the user tag that engine is responsible for, do not need to carry out upgrading and calculating with regard to this engine yet, accomplish that each engine is ultimate attainment absorbed responsible.Meanwhile, be coordinate the focusing on task at hand of engine, set up and have unified entrance to application layer, engine can select the user tag oneself called, thus real time processing system is done unified support, without the need to building proprietary system for specific user.
In the embodiment of optimum, described second device 205 has multiple engine, and the user tag that different engine type process is different at least comprises the first engine 235, and described first engine 235 is in order to process described dynamic user tag 101.In preferred embodiment, described second device 205 can also comprise the second engine 215 and the 3rd engine 255, and described second engine 215 is in order to process the user tag 103 of described position, and described 3rd engine 255 is in order to process the user tag 105 of described slip.The user tag 103 of described dynamic user tag 101, position, the definition of user tag 105 of sliding and attribute description thereof and described user meet the definition of the identical user tag 100 in regular real time updating method and attribute description identical, repeat no more.
In the application one preferred embodiment, described second device 205 will be divided into following a few class: the first engine 235, second engine 215, the 3rd engine 255.All be described for this mode classification below in an example, certain those skilled in the art will be understood that the description of above-mentioned tag types is only citing, other divisions described second device 205 carried out according to data activity degree and content and process method and the modification thereof that different user tag carries out update process, such as be divided into the division methods etc. of the first engine 235, second engine 215 in conjunction with other tag types well-known to those skilled in the art, all within the thought range of the application.As for concrete some second devices 205, how which user tag of allocation process 100 can be consulted to determine by audience and developer, repeats no more.
In user tag 100, described dynamic user tag 101 is that memory data output is maximum, the class user tag 100 that data variation frequency is the highest, therefore described first engine 235 how can be utilized to realize key technical problem that the real-time update of dynamic user tag 101 and real-time query become the application, in in of the embodiment of the present application, the method described in real time updating method that described first engine 235 adopts user described in the application to meet rule carries out update process to described dynamic user tag 101.
In sum, first engine 235 described in the application to the update process method of described dynamic user tag 101 by a regular expression is split into multiple clause's expression formula, and set up some mapping relations, mapping relations are utilized to carry out inquiring about and calculating, be equivalent to carry out buffer memory from fine granularity to query count result, therefore significantly accelerate calculating; Simultaneously by calculating relevant clause's expression formula of dynamic user tag 101, carrying out beta pruning from calculating, therefore significantly having decreased calculated amount, and significantly having improve counting yield.
Fig. 6 for user described in the application one embodiment meet the real-time update system update user of rule the block schematic illustration of the second engine in the system of rule that meets.Composition graphs 6, in preferred embodiment, described renewal user the system of rule that meets comprise the second engine 215, the framework of described second engine 215 comprises the first module 309, second module 305, the 3rd module 304 and four module 307, and wherein said first module 309 is in order to transmit the user data of described request user user to be updated; Described some first modules 305 are in order to transmit and to distribute the user data of described request user user to be updated, and described 3rd module 304 gives some processing nodes in order to described user's inquiry request Sum fanction update request; And four module 307 is in order to upgrade the user tag 103 of position and to return results.Wherein, described four module 307 sets up to all users the mapping relations that spatial index numbering and described global identity and described spatial index number, the user data of transmission request user user to be updated, distributes local identification code to described request user user to be updated, sets up the mapping relations of spatial index numbering and local identification code, the user data of user to be updated for described request user and original customer data base are compared, if described request user user to be updated did not exist in the past, then set up new spatial index numbering, if described request user user to be updated is original user, then check whether described spatial index numbering changes, to the attribute information then upgrading the user tag 103 of the position of described request user user to be updated that described spatial index numbering does not change, described spatial index is numbered to the original local identification code of then deletion described request user user to be updated changed, set up new local identification code, and upgrade the mapping relations that local identification code and described spatial index number.
The framework of described second engine 215 can also comprise renewal user data interface 301 and retrieval user interface 303, and described renewal user data interface 301 is in order to receive the user data of request user user to be updated; Described retrieval user interface 303 is in order to receive retrieval user inquiry request Sum fanction update request.
In the present embodiment, described first module 205, described 3rd module 304 and four module 307 are all connected with the service platform 313 of outside, such as comprehensive service operation and management platform (OSS), in order to Graphics Processing state, statistical report upgrades result and managing process.
Second engine 215 described in the application can meet process in real time and upgrade the positional information (such as longitude and latitude, road name etc.) of user, and crowd's quantity of the energy a certain position of real-time query.The process of the update process of the user tag 103 of described second engine 215 pairs of positions described in the application is described in detail below in conjunction with specific embodiment.
The renewal of the user tag 103 of second engine 215 pairs of positions described in the application, particularly, the mapping relations that spatial index is numbered and described global identity (UserID) is numbered with described spatial index are set up to all users, in preferred embodiment, hibert curve can be have employed spatial index numbering (Key) is set up to all users.To comparatively stablizing user data, such as sex, possession, age bracket can use filtrator (Filter) to filter.In addition; delivery can also be carried out to each spatial index numbering to divide again; according to the central processing unit number of system; some piecemeals (Block) can be divided into; parallel amount can be strengthened; such as according to the central processing unit number of system; some piecemeals (Block) can be divided into; at each piecemeal; in order to parallel amount can be strengthened; carry out delivery division again to data, be such as divided into 10 block (concrete numeral can be determined according to system processing power), each block is responsible for Data Update and the inquiry of 1/10 of a piecemeal.Wherein, in the index stores first order of described Block, tree table (Btreemap) can be used to store, Key is spatial index key, value (Value) is skew (Offset) pointed hit list (Postinglist), and described method can high search index efficiency.
In described step S12, transmit the user data of user to be updated, distribute local identification code (Localid) to described user to be updated, set up the mapping relations (Key->Localid) of spatial index numbering and local identification code.In preferred embodiment, the user data transmitting user to be updated can adopt the first module 309 to distribute to described four module 307 and process, also the user tag 103 of Distributed Message Queue (MetaQ) mode to described position can be adopted to carry out Data Update decoupling zero, and carry out cutting by the data of key signature character (Tag) to the user tag 103 of position, in an alternate embodiment of the invention, different key signature characters can be set by identity code (ID) delivery to each user, different back end is responsible for processing a part of key signature character information, thus accomplish dilatation and the capacity reducing of back end easily, and then improve the treatment effeciency of user's update request.
Further, described user has unique overall identity code, a local identification code (localid) increased from 0 can be assigned with after the user tag 103 of the described position of user enters a four module 307, length can be 4 bytes (Bytes), set up described local identification code and described overall identity code mapping relations one to one simultaneously, hit list in spatial index table adopts local identification code to store, by the attribute store of the user tag 103 of described position in continuous print buffer memory, it is lower target skew Compass that described buffer memory has with described local identification code.
In described step S13, when upstream send user more new data time, the user data of described user to be updated and original customer data base are compared, if described user to be updated did not exist in the past, then set up new spatial index numbering (Key), if described user to be updated is original user, then check whether described spatial index numbering (Key) changes, to the attribute information then upgrading the user tag 103 of the position of described user to be updated that described spatial index numbering (Key) does not change, the attribute information of the user tag 103 of described position is stored in a continuous print buffer memory, the attribute information of the user tag 103 of correspondence position can be found by calling skew Compass that the local identification code (Localid) of described buffer memory is following table, thus the attribute information of user is upgraded, to the original local identification code (Localid) of the described user to be updated of then deletion that described spatial index numbering (Key) changes, set up new local identification code, and upgrade the mapping relations that local identification code and described spatial index number.
In preferred embodiment, user tag 103 content of the content of the user tag 103 of the position of reception and the position of original customer data base is compared and upgrades, also comprise in the process upgraded that user tag 103 content of the content of the user tag 103 of the position of reception and the position of original customer data base is compared, according to the frequent degree of variation of the user tag 103 of described position, dynamic setting upgrades threshold values, and upgrade precision according to loading condition setting, upgrade according to the user tag 103 of renewal precision to position.Select to upgrade precision according to the loading condition of system, such as: generally, the variation being greater than 1 meter all upgrades; If the flow of user data is large, the variation that can be greater than more than 5 meters upgrades again; If the data traffic of user is very large, then can be greater than 20 meters and just upgrades.Renewal described here refers to the renewal to spatial index (Key), and the positional information such as latitude and longitude information of user can upgrade as the attribute of the user tag 103 of position always, and affects the accuracy of user data.In addition the longitude and latitude of user has changed, and under certain situation, the spatial index of user does not need to upgrade, and therefore upgrades by described dynamic setting the load pressure that threshold value can alleviate system, improves the processing speed of system.
Those skilled in the art will be understood that the above-mentioned description to described dynamic setting renewal threshold value is only citing, other dynamically set the modification upgrading threshold value and carry out according to the application, comprise and upgrade the scope of threshold value, the change etc. of update mode, all within the thought range of the application.
In the process of the update process method of the user tag 103 to described position, also comprise, supported data is expired, by dynamic setting data expiration period, deletes the data exceeding data expiration period and upgrade not yet.In the particular embodiment, if such as a user has reported primary information, but upload never again (such as turning off application, network loss etc.), the information of so existing reporting of user may be expired invalid over time, therefore needs to remove these data.In concrete realization, a thread can be set up and scan each piecemeal (Block) successively, check that whether every bar record is expired, if expired, user data set can be deleted, and Resource recovery.
In an alternate embodiment of the invention, to the update process method of the user tag 105 of described slip, comprise and adopt different storage mode in order to upgrading and inquiry according to the frequent degree of the user tag 105 of sliding, comprise: the user tag 105 for the high slip of frequent degree adopts matrix storage mode, adopt matrix storage mode array can be used can to travel through fast, to support stochastic searching and to sue for peace to user data when unique user is very frequent; User tag 105 for the low slip of frequent degree adopts storage of linked list mode, does not have the time window of behavior not store, and saves and stores, also save query script.
In preferred embodiment, described renewal user the system of rule that meets also be provided with mirror nodes, in described second device 205, each computing engines has at least one mirror nodes to provide service, data and the service of serving multiple mirror nodes of a computing engines are impartial, such as, in one embodiment, each computing engines is furnished with three mirror nodes, data and the service of each mirror nodes are impartial, if therefore one of them mirror nodes breaks down, another two mirror nodes can provide same service.Concrete, the information of described mirror nodes is kept in ZK framework, and path naming rule can be: root/ partition number/mirror image number, and the contents value that wherein said ZK frame joint stores is a protobuf object, comprises the information such as rpcip/port.Mirror nodes needs to keep ZK heartbeat, in time inquiring about, inquires about, if a mirror nodes does not connect, so can inquire about the mirror nodes that the next one lives according to mirror nodes information.
Wherein, described protocolbuf object (hereinafter referred to as PB) is the form of a kind of exchanges data of Google, and it is independent of language, independent of platform.Google provides the realization of three kinds of language: java, c++ and python, and each realizes the compiler and the library file that all contain corresponding language.Because it is a kind of binary form, carry out exchanges data than use xml many soon.Can it for the data communication between Distributed Application or the exchanges data under isomerous environment.As a kind of efficiency and compatible all very outstanding binary data transmission form, may be used for the numerous areas such as such as Internet Transmission, configuration file, data storage.
Those skilled in the art will be understood that the above-mentioned description to described mirror nodes is only citing, the modification that the function of other mirror nodes according to the application is carried out, comprise the storage mode of employing, use the change etc. of framework, all within the thought range of the application.
In sum, the application by set up described renewal user the system of rule that meets, adopt distributed rule computing architecture, to the Distributed Architecture process of user tag, according to the data activity degree of user tag 100 and content, user tag 100 is divided into dynamic user tag 101, user tag 103 and the label of user tag 105 grade of sliding without class of position, set up the second device 205, described second device 205 comprises some first engines 235, second engine 215 and the 3rd engine 255, different disposal routes is adopted to inhomogeneous user tag, achieve reasonable distribution and the process in real time of user tag, the processing speed of further raising user update request.
Simultaneously, upgrade described in the application user the system of rule that meets propose a kind of framework of the second engine 215, described second engine 215 receives the update request and user data that upgrade user and retrieval user, distribution processor is carried out to user, and employing is set up spatial index to each user and is stored according to described spatial index, when needs carry out location updating, call spatial index and update process is carried out to the user tag of the position of user, and then improve processing power and the treatment effeciency of the second engine 215.
Obviously, those skilled in the art can carry out various change and modification to the application and not depart from the spirit and scope of the application.Like this, if these amendments of the application and modification belong within the scope of the application's claim and equivalent technologies thereof, then the application is also intended to comprise these change and modification.
It should be noted that the application can be implemented in the assembly of software and/or software restraint, such as, special IC (ASIC), general object computing machine or any other similar hardware device can be adopted to realize.In one embodiment, the software program of the application can perform to realize step mentioned above or function by processor.Similarly, the software program of the application can be stored in computer readable recording medium storing program for performing (comprising relevant data structure), such as, and RAM storer, magnetic or CD-ROM driver or flexible plastic disc and similar devices.In addition, some steps of the application or function can adopt hardware to realize, such as, as coordinating with processor thus performing the circuit of each step or function.
In addition, a application's part can be applied to computer program, such as computer program instructions, when it is performed by computing machine, by the operation of this computing machine, can call or provide the method according to the application and/or technical scheme.And call the programmed instruction of the method for the application, may be stored in fixing or moveable recording medium, and/or be transmitted by the data stream in broadcast or other signal bearing medias, and/or be stored in the working storage of the computer equipment run according to described programmed instruction.At this, an embodiment according to the application comprises a device, this device comprises the storer for storing computer program instructions and the processor for execution of program instructions, wherein, when this computer program instructions is performed by this processor, trigger this plant running based on the method for aforementioned multiple embodiments according to the application and/or technical scheme.
To those skilled in the art, obvious the application is not limited to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit or the essential characteristic of the application, can realize the application in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, the scope of the application is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the application.Any Reference numeral in claim should be considered as the claim involved by limiting.In addition, obviously " comprising " one word do not get rid of other unit or step, odd number does not get rid of plural number.Multiple unit of stating in device claim or device also can be realized by software or hardware by a unit or device.First, second word such as grade is used for representing title, and does not represent any specific order.